Difference between revisions of "Centos Oneliners"
From Brian Nelson Ramblings
(→Apache Oneliners) |
(→Apache Oneliners) |
||
Line 9: | Line 9: | ||
===Apache Oneliners=== | ===Apache Oneliners=== | ||
Check the Number of IP's Connecting over Port 80 | Check the Number of IP's Connecting over Port 80 | ||
− | netstat -tn | grep :80 | awk '{print $5}'| cut -d: -f1 | uniq -c | sort - | + | netstat -tn | grep :80 | awk '{print $5}'| cut -d: -f1 | uniq -c | sort -rn | head |
+ | |||
+ | Check what IP's are getting the most traffic | ||
+ | netstat -tn | grep EST | grep :80 | awk '{print $4}' |cut -d: -f1 | uniq -c | sort -rn | ||
===Mysql Oneliners=== | ===Mysql Oneliners=== | ||
===Qmail Oneliners=== | ===Qmail Oneliners=== |
Revision as of 15:07, 10 December 2013
Contents
Centos Oneliners
This will be a place to save my oneliners
Centos Oneliners
kill all pts
for x in $(ps aux | grep pts| awk '{print $2}'); do kill $x; done
Apache Oneliners
Check the Number of IP's Connecting over Port 80
netstat -tn | grep :80 | awk '{print $5}'| cut -d: -f1 | uniq -c | sort -rn | head
Check what IP's are getting the most traffic
netstat -tn | grep EST | grep :80 | awk '{print $4}' |cut -d: -f1 | uniq -c | sort -rn