for my Computing Controlled Assessment I am looking into some of the basic commands for the Linux OS Debian. For the final question I have to write a short essay on using the
top is used for displaying a list of processes, and by default, is sorted by the amount of CPU usage it's using - so in your case, it's a handy tool to see if a specific process is taking up most of the CPU usage and causing the system to run slower. It also displays the process ID (PID) as well as the user running it. Think of it like the Linux equivalent of Task Manager in Windows.
ps is similar to top, but instead of constantly refreshing, it spews out all of the current processes running on the server, as well as the PID (important). Usually this is used as
ps aux, or to be more specfic you could use this with grep to search for a specific process, e.g.
ps aux | grep httpd to display the current Apache processes running.
kill is used to kill process running on the system, so if you had a script on the system taking up most of the resources and you want to forcefully kill the process, you'd use
kill. You can also use the
killall command to kill all processes with a matching string, e.g.
The steps I'd take to investigate a misbehaving system would be to:
ps to locate the process taking up the most resources, and remember the process ID.
2) If I wanted to kill the process, I'd use:
kill <process ID>.
If you need anything else clarifying or explaining - feel free to comment!
EDIT: http://serverfault.com/ - This may be the best place to post future questions like this.