Linux PS Command Example

Source: Internet
Author: User

EXAMPLES
Every process on the system using the syntax:
Ps-e
Ps-ef
Ps-ef
ps-ely

Every process on the system using BSD syntax:
PS AX
PS Axu

To print a process tree:
Ps-ejh
PS AXJF

To get info about threads:
Ps-elf
PS AXMS

To get security Info:
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:
Ps-u Root-u Root U

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-ao Pid,tt,user,fname,tmout,f,wchan

Print only the process IDs of SYSLOGD:
Ps-c Syslogd-o pid=

Print only the name of PID 42:
Ps-q 42-o comm=

Linux PS Command Example

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.