This shows you the differences between two versions of the page.

Link to this comparison view

tech:linux:check_swap [2015/02/10 06:51] (current)
Line 1: Line 1:
 +====== Check pswpin and pswpout ======
 +Script to check ''​pswpin''​ and ''​pswpou''​t for non-zero values and log/email.
 +<code 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
 +Cron entry
 +0,​10,​20,​30,​40,​50 * * * * /​path/​to/​script

QR Code
QR Code tech:linux:check_swap (generated for current page)