Script to check pswpin
and pswpou
t for non-zero values and log/email.
#!/bin/bash cd /home/senthil/temp_files/pswp TS=$(date +%Y%m%d_%H%M%S); cat /proc/vmstat|grep pswp > log/pswp_${TS}.txt PSZ=`grep -c "^pswpin 0$" log/pswp_${TS}.txt` if [ $PSZ -eq 0 ]; then cat log/pswp_${TS}.txt | mailx -s "Non-zero pswpin" system@example.org fi
Cron entry
0,10,20,30,40,50 * * * * /path/to/script