Timeline for How to display open file descriptors but not using lsof command
Current License: CC BY-SA 3.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 19, 2015 at 15:57 | comment | added | Thorsten Staerk | you are right, I verified this with a test program, pasted to linuxintro.org/wiki/Ulimit | |
| May 19, 2015 at 12:51 | comment | added | Gilles 'SO- stop being evil' |
@ThorstenStaerk All settings of setrlimit (the system call underlying the ulimit shell command) are per-process. They affect only the process that makes the call (and indirectly the processes that it later forks).
|
|
| May 19, 2015 at 12:49 | comment | added | Thorsten Staerk | @Gilles, do you have any reference for your statement? I looked into the man page and it explicitely states for -v that it is a per-process limitation but does NOT state this for -n. | |
| May 19, 2015 at 12:43 | comment | added | Gilles 'SO- stop being evil' |
@ThorstenStaerk file-nr is the total number of open files across the system. ulimit -n sets the maximum number of files open by each process.
|
|
| May 19, 2015 at 12:24 | comment | added | Thorsten Staerk | /proc/sys/fs/file-nr gives me 3872 (and two other numbers). How can this be the count of files I have open if ulimit -n shows me 1024? | |
| May 14, 2014 at 14:40 | comment | added | PlasmaHH | Note that file-nr outputs the amount of allocated filedescriptors, not the actual amount of used and opened ones. | |
| Feb 27, 2013 at 1:55 | comment | added | dimas | Just use ls -l but i'll experiment with readlink. I tried other /proc/PID/maps and other options as specified here kernel.org/doc/man-pages/online/pages/man5/proc.5.html. Thanks again for the additional info. | |
| Feb 27, 2013 at 1:44 | comment | added | Gilles 'SO- stop being evil' |
@dimas /proc/*/fd directories contain symbolic links to the open files. For visual inspection, use ls -l. For automated treatment, use readlink to extract the link target.
|
|
| Feb 27, 2013 at 1:40 | vote | accept | dimas | ||
| Feb 27, 2013 at 1:40 | comment | added | dimas | Hi thanks for giving a good explanation Gilles. I tried ls /proc/*/fd and got all the open fd's at that time. Its producing an output with some color coding, I'll just have to look at the manual. | |
| Feb 27, 2013 at 1:07 | history | answered | Gilles 'SO- stop being evil' | CC BY-SA 3.0 |