Script to see if NFS is mounted
#!/usr/bin/env bash MP=’/mnt/remote’HOSTNAME=hostname -sFILE=/tmp/is_it_mounted.txt if grep -qs $MP /proc/mounts; thenecho “OK $MP mounted on $HOSTNAME” > /dev/nullelseecho “NOK $MP not mounted on $HOSTNAME” > $FILEfi if then/usr/sbin/sendmail -t << EOFFrom:…
Find whats using swap
If you need to find which process is using swap, as root on your command line run. for file in /proc/*/status ; do awk ‘/VmSwap|Name/{printf $2 ” ” $3}END{ print…