ps vs ps -ef


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers ps vs ps -ef
# 1  
Old 11-07-2011
ps vs ps -ef

Hi,

when I type

Code:
ps

I only get 3 or 4 current processes but with switch of -ef I get few pages of processes. can somebody tell me why this happens?

cheers,
m
# 2  
Old 11-07-2011
ps will display only your terminal processes currently running ..

If you go with -ef option then will display all. Hope it clears ..

Code:
$ tty
/dev/pts/34
$ ps
   PID TTY      TIME CMD
  9584 pts/34   0:00 ksh
 22729 pts/34   0:00 ps

This User Gave Thanks to jayan_jay For This Post:
# 3  
Old 11-07-2011
To see every process on the system using standard syntax:
Code:
ps -e
ps -ef
ps -eF
ps -ely

To see every process on the system using BSD syntax:
Code:
ps ax
ps axu

To print a process tree:
Code:
ps -ejH
ps axjf

To get info about threads:
Code:
ps -eLf
ps axms

To get security info:
Code:
ps -eo euser,ruser,suser,fuser,f,comm,label
ps axZ
ps -eM

To see every process running as root (real & effective ID) in user format:
Code:
ps -U root -u root u

To see every process with a user-defined format:
Code:
ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm
ps -eopid,tt,user,fname,tmout,f,wchan

Print only the process IDs of syslogd:
Code:
ps -C syslogd -o pid=

Print only the name of PID 42:
Code:
ps -p 42 -o comm=

This User Gave Thanks to h@foorsa.biz For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question