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
: Ratio of the process's resident set size to the physical memory on the machine, expressed as a percentage.