Some of the useful commands on Linux if you are facing a sudden DDOS attack
Count the number of HTTP processes (it helps to know what your normal count is for comparison):
ps -aux|grep -i HTTP|wc -l
Executing the following command will show the IPs arranged in order of established connections
netstat -lpn|grep :80|awk '{print $5}'|sort
It will show a list of the current active connections by IP address and the offending IP is usually the one with a high number of connections:
netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n