Dave's Brain

Browse - Computer Tips - How can I get a custom output for ps ?

Date: 2012aug22
OS: Linux
Keywords: program status

Q.  How can I get a custom output for ps ?

A.  Use the -o or --format option.  Usually used with -e for everything.

To get security info:
ps -eo euser,ruser,suser,fuser,f,comm,label
To see every process with a user-defined format:
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 -eo pid,tt,user,fname,tmout,f,wchan

Add a comment

Sign in to add a comment
Copyright © 2008-2018, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.