Admin-Ahead Community

General Category => General Discussion => Topic started by: rohitj on November 16, 2013, 09:59:53 pm

Title: Checking network connections in a server
Post by: rohitj on November 16, 2013, 09:59:53 pm
Checking network connections in a server

In order to view all the current connections and the IP

-----------
netstat -anp | grep 80 | awk ‘{print $5}’ | cut -f1 -d: | sort | uniq -c | sort -n
-----------

To detect syn flood attack

-----------
netstat -plan | grep :80 | grep SYN_RECV | wc -l
-----------

Max child process size can be determined using the command :

--------
ps -ylC httpd –sort:rss
---------

The total memory usage for the webserver can be determined using the command :

----------
ps -ylC httpd –sort:rss | awk ‘{a+=$8}END{print a}’
----------