Access to background process's /proc

MonikaGShah

New Member
Generally, /proc do not display folder for background processes.

How can I view /proc/[pid]/stat for background processes?
I would like to use in a program to get complete system information
 


CptCharis

Well-Known Member
Hello @MonikaGShah

You can try
Code:
readlink -e /proc/<PID>/cwd
or

Code:
lsof -p <PID> | grep cwd
to find out the current working directory (CWD) of a running process .
 

MonikaGShah

New Member
Sir,
it is not showing directory in /proc for such processes.
All processes returned by 'ps -A' does not have directory in /proc.
 



Staff online

Members online


Latest posts


Top