Monthly Archives: September 2008

//September
­
8 09, 2008

To kill Dead process

By |September 8th, 2008|Scripts|0 Comments

for i in `ps ax | grep D | awk {'print $1'}`;do kill -9 $(cat /proc/${i}/status | grep PPid | awk {'print $2'});done

8 09, 2008

To kill Zombie process

By |September 8th, 2008|Scripts|0 Comments

for i in `ps ax | grep Z | awk {'print $1'}`;do kill -9 $(cat /proc/${i}/status | grep PPid | awk {'print $2'});done

8 09, 2008

To find ddos attack

By |September 8th, 2008|Scripts|0 Comments

netstat -an |grep 80 netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1 netstat -plan|grep :25|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1 watch -n 5 'w; ls -alS /usr/local/apache/domlogs/ '

8 09, 2008

Top memory consuming processes

By |September 8th, 2008|Scripts|0 Comments

ps aux | head -1;ps aux --no-headers| sort -rn +3 | head

8 09, 2008

Number of exim connections

By |September 8th, 2008|Scripts|0 Comments

tail -1000 /var/log/exim_mainlog |grep '[' |cut -d[ -f2 |cut -d] -f1|sort -n |uniq -c |sort -n

Load More Posts