next up previous contents
Next: Debugging tools Up: Compiling and Running C Previous: Running Programs

Execution Monitoring

ps command:

If you type ps at the cheetah command prompt and type enter you get a list of processes which belong to you and are currently alive.

If you type ps -ef at the prompt you get a complete listing of all the processes currently alive in the system which will not all belong to you. Some are system processes while others are those initiated by other users.

To isolate processes while using ps -ef which belong to you use ps -u user_id

In the output of the above commands we specifically get information about the process id which is of importance to us. Try to identify the pids of the processes by referring the corresponding command cols. Refer to the man pages for an explanation of other details shown.

kill command:

The kill command can be used to terminate processes you identified using ps, because of a variety of reasons, primarily because they are erroneous, requiring debugging.

To use kill first obtain the process ids using ps by matching the PID column with the COMMAND column. Assuming that you have a PID of a process which you want to kill, type in the following command and press enter kill -9 PID. The -9 option stands for sure kill. Others are discussed in the man pages.

top command:

The top command displays information about the top cpu processes alive at anytime. To use top, type top at the cheetah prompt and press enter. Type q to quit. Top displays the top 30 processes and ranks them according to raw cpu percentage usage.

Read the man pages to get more details on ps, kill and top.



Sushil Prasad
Fri Oct 9 10:28:36 EDT 1998