Friday, May 14, 2010

How to use PS command in Linux Rhel5 show Process status in Red hat Linux

Linux Ps commands it will show information about current active process. Ps aux it will show the process by the specified user x. BSD-style show the process status. This BSD_style also select it will also edit process selection to the other terminal.
Option U in ps Linux command it will list out specified user
[alex@rhel5 /]$ ps U alex
PID TTY STAT TIME COMMAND
3301 pts/0 S 0:00 -bash
3330 pts/0 R+ 0:00 ps U alex
It has the four arguments. First one process id PID and the second one is terminal, next is time final one is command.
[alex@rhel5 /]$ ps -aualex
PID TTY TIME CMD
3300 pts/0 00:00:00 su
3301 pts/0 00:00:00 bash
3349 pts/0 00:00:00 info
3352 pts/0 00:00:00 locate
3355 pts/0 00:00:00 man
3358 pts/0 00:00:00 sh
3359 pts/0 00:00:00 sh
3364 pts/0 00:00:00 less
3383 pts/0 00:00:00 ps
ps –ejH it show the process tree
[alex@rhel5 /]$ ps -ejH
PID PGID SID TTY TIME CMD
1 1 1 ? 00:00:01 init
2 1 1 ? 00:00:00 migration/0
3 1 1 ? 00:00:00 ksoftirqd/0
4 1 1 ? 00:00:00 watchdog/0
5 1 1 ? 00:00:00 events/0
6 1 1 ? 00:00:00 khelper
7 1 1 ? 00:00:00 kthread
10 1 1 ? 00:00:00 kblockd/0
11 1 1 ? 00:00:00 kacpid
72 1 1 ? 00:00:00 cqueue/0
75 1 1 ? 00:00:00 khubd
77 1 1 ? 00:00:00 kseriod
139 1 1 ? 00:00:00 pdflush
140 1 1 ? 00:00:00 pdflush
141 1 1 ? 00:00:00 kswapd0

0 comments:

Flag counter

free counters