Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. disk_check:
  2. # testing if some disk has at least 4Go available space
  3. df | sed '1d' | awk '{print $$4}' | sort -n | tail -n 1 | xargs test 4000000 -lt
  4.  
  5.  
  6. memory_check:
  7. # testing if there is at least 3Go available ram
  8. free -l | head -n 2 | tail -n 1 | awk '{print $$7}' | xargs test 3000000 -lt
  9.  
  10.  
  11. time_check:
  12. # checking if system have more or less 5 seconds delay with universal time
  13. ntpdate -q fr.pool.ntp.org | grep -E -o 'offset.+sec$' | awk '{print int($2)}' | tr -d - | xargs test 5 -gt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement