Important Linux Monitoring Command

Posted byShailesh Posted onJanuary 13, 2013 Comments0

1) netstat -rn
2 )netstat -plan | grep :80 | awk ‘{print $5}’ | cut -d: -f 1 | sort | uniq -c | sort -n
3) netstat -plan | grep :25 | awk ‘{print $5}’ | cut -d: -f 1 | sort | uniq -c | sort -n
4) pstree -paul
5) cd /tmp
6) rm -f dos-* sess_* .spamassassin*
7) find . -user nobody -exec rm -f ‘{}’ \;
8) ps -C exim -fH ewww
9) ps -C exim -fH eww |grep home
10) netstat -ntu | grep ‘:’ | awk ‘{print $5}’ | awk ‘{sub(“::ffff:”,””);print}’ | cut -f1 -d ‘:’ | sort | uniq -c | sort -n
11) mysqladmin proc |grep Sleep |awk {‘print $4′}|cut -d_ -f 1|sort|uniq -c|sort -nk 1
12) ps -C exim -fH ewww
13) for i in `ipcs -s | awk ‘{print $2}’`; do (ipcrm -s $i); done
14) for i in `mysqladmin proc |grep Sleep |cut -d ” ” -f 2`; do mysqladmin kill $i; done
15) exim -bp |grep “*** frozen ***” |awk ‘{print $3}’ |xargs exim -Mrm
16) exiqgrep -z -i | xargs exim -Mrm;exiqgrep -o 432000 -i | xargs exim -Mrm

Category

Leave a Comment