Professional Documents
Culture Documents
Every Program,which runs on linux system, we call it as process.Each process will have its own
unique process id. We can find out which process currently it is running on the system using
PS command.
With PS command,we can find out how many resources it is using like memory and
cpu.Sometimes,few processes will take more amount of resources which leads to System slow
Problems.One can identify these kind of problems using the PS command.
SLTMachine: # ps
It is basic usage of ps,it displays information about PID ( process id),TTY(machine where it is
executed),TIME(how long it is running),CMD(What command it is running).
SLTMachine: # ps -e
1 ? 00:00:02 init
2 ? 00:00:09 migration/0
3 ? 00:00:00 ksoftirqd/0
Usage 3:Print every process launched by the user srinivas on the machine.
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
Usage 4:Print every process launched by the group called administrators on the machine.
It will give the information about processes launched by the group administrators only.
Usage 5: print only name of the pid 5678
SLTMachine # ps -f -p 6800
Each process is identified by its unique id.with the above command,i am trying find out the
process which has process id 6800
SLTMachine # ps -f --ppid 1
Every process will create sub process,it it is required.Like root process will kick start all the
other applications on the machine.
In the above command,i am trying to find out processes launched by root process 1.
(or)
(or)
SLTMachine # ps -p 2230 -L
The above command output refresh for every one second and its display the top 5 rows.Most
useful command for administrators.
the above command search for process called java construct a tree
Usage 14: find process information of all the process ids available in set of process ids.
SLTMachine # ps -p 2001,2002,3001
Above command displays information about the process id is equal to 2001,2002 and 3001
SLTMachine # ps -e -o
pid,uname=USERNAME,pcpu=CPU_CONSUMPTION,pmem=MEMORY,comm=COMMAND
SLTMachine # ps -e -o pid,etime
PID ELAPSED
1 75-13:24:23
2 75-13:24:21
3 75-13:24:21
4 75-13:24:21
5 75-13:24:21
SLTMachine ## ps ax
( Or )
SLTMachine ## ps -ef
we can use either of the command to display all the processes which are running.
Above command searches for the process in the list of all available processes.
Please run the above command,if you want to know,who is logged into the machine and what is
the process id of the process which he launched.
SLTMachine## ps T
SLTMachine## ps -ef
Usage 22: Print Full listing information of the processes using page by page using more
Usage 23: Print Full listing information of the processes using page by page using less