0

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' ?

user3477465
  • 183
  • 2
  • 2
  • 6

2 Answers2

1

You could use

  pmap $PID

or perhaps

  cat /proc/$PID/maps

and/or

  cat /proc/$PID/status

See proc(5) for details.

Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547
1

ps -o pmem h -p processID

pmem: Ratio of the process's resident set size to the physical memory on the machine, expressed as a percentage.

Cyrus
  • 84,225
  • 14
  • 89
  • 153