process management
ps is short for process status, which is similar to the top command. It’s used to show currently running processes and their PID.
A process ID is a unique number that identifies a process, with that you can kill or terminate a running program on your server (see kill command).
ps -ef | more – to view current running processes
ps -efH | more – to view current running processes in a tree structure
ps U username – shows processes for a certain user
ps aux – shows all system processes
ps aux –forest – shows all system processes like the above but organizes in a hierarchy that’s very useful!
kill: terminate a system process
kill -9 431 – kill -9 PID EG
kill 10550 – kill PID
Use top or ps ux to get system PIDs (Process IDs) “”
find / -type f -size +20000k -exec ls -lh {} \; | awk ‘{ print $9 “: ” $5 }’ – gives you info on disk space being used
tail /etc/psa/.psa.shadow (retrieve Admin password via ssh)
ps axl | grep mysql – check if any processes active if mysql dies a horrible and bloody death
vi /etc/sysconfig/network-scripts/ifcfg-eth0 – check DNS servers are in this file
ps wwauxf – if apache cant start check whats listening to port
sync; echo 3 > /proc/sys/vm/drop_caches – clear ram cache
mysql -uadmin -p`cat /etc/psa/.psa.shadow` – see sql connections
tail -f /var/log/httpd/access_log – check IP connections so its connections from same IP then its DDosed