ps Command

Written by Jahangir on October 23, 2008 – 7:04 am -

What is ps command?

The ps command [Process Status] is a tool to display the running processes and identifying the programs that are running on the [Unix/Linux] system and the resources they are using, including their process identification numbers (PIDs).
It’s same like you see your running process using “Task-Manager” on your windows system.
The ps command displays information about the current workstation.

Advantage of ps command is that system admins will be able to see where the memory/cpu is used. ps will show the percentage of memory/cpu resource that is used by each process or task running in the system, With this command its easy to identified top memory/cpu hogging processes on system.

Here are some basic syntax and example of ps.

* ps r :- Shows only running processes.

* ps f :- Generates a full listing.

* ps e :- Shows the command environment for each process. This is useful in a situation where a program works for one user but not for another or works on one machine but not on another.

* ps -t pts/1 :- Shows processes associated with the specified tty. This is a useful to find out the process running on remote machine and for how long.

* ps aux :- aux is the options for ps command to see every process on the system.

To see only the memory resources occupied by each category of processes, such as Apache httpd, MySQL mysqld or Java, use the following command:

ps aux | awk ‘{print $4″\t”$11}’ | sort | uniq -c | awk ‘{print $2″ “$1″ “$3}’ | sort -nr


Tags: , , , ,
Posted in Dedicated Server Hosting |

One Comment to “ps Command”

  1. memory status Says:

    [...] that run in the Safari web browser, plus Native 3rd party apps, mods, hacks and software for the …ps Command | Advantage of ps command | PS used fo find memory …The ps command [Process Status] is a tool to display the running processes and identifying the [...]

Leave a Comment

RSS

  • Subscribe Me

  • Tag Cloud

  • Archives