简体   繁体   中英

How to get the information of a specific process given its process ID using the command 'ps' in Linux

How to get the information of a specific process given its process ID using the command 'ps' in Linux. I also want to get the proportion of memory the process occupies.

Is that ' ps processID ' ?

You could use

  pmap $PID

or perhaps

  cat /proc/$PID/maps

and/or

  cat /proc/$PID/status

See proc(5) for details.

ps -o pmem h -p processID

pmem :进程的常驻集大小与计算机上物理内存的比率,以百分比表示。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM