terminal file descriptor?
Hi Everybody,
How would we come to know what is the file desciptors of the terminals... Thanks Danish |
To find the fd's used by a PID try "lsof -d 0-100 -a -p $PID".
|
I did
#lsof -d 0-100 -a -p 4100 but the promt just came back without any kind of output.... Danish |
Which could mean the PID was either too short-lived for Lsof to find any open fd's or it didn't use any fd's?
Say (stupid example) you would want to find fd's zero to hundred for all instances of Apache. You could get a list of pids, knowing Apache is called "httpd", and feed it to xargs which in turn will run lsof: Code:
pgrep -f httpd|xargs -iP lsof -d 0-100 -a -p 'P' |
All times are GMT -5. The time now is 07:21 AM. |