Software >> OS >> Unix >> Shell >> How to display the output of ps command in custom format selecting only specific columns

ps -o space-separated-list-of-columns

where columns can be any of the following

  • user
  • ruser
  • group
  • rgroup
  • uid
  • ruid
  • gid
  • rgid
  • pid
  • ppid
  • pgid
  • sid
  • taskid
  • ctid
  • pri
  • opri
  • pcpu
  • pmem
  • vsz
  • rss
  • osz
  • nice
  • class
  • time
  • etime
  • stime
  • zone
  • zoneid
  • f
  • s
  • c
  • lwp
  • nlwp
  • psr
  • tty
  • addr
  • wchan
  • fname
  • comm
  • args
  • prjid
  • project
  • pset