Differences between version 18 and predecessor to the previous major change of ProcessNotes.
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 18 | Last edited on Monday, August 23, 2004 1:16:06 pm | by PerryLorier | Revert |
Older page: | version 17 | Last edited on Thursday, April 29, 2004 8:44:20 pm | by JohnMcPherson | Revert |
@@ -138,4 +138,12 @@
variables to find out what they currently hold, for example __print argc__ will
tell you the contents of argc. Of course, __quit__ or [[Ctrl][[d] will exit
gdb. For more information about the [GNU] debugger see gdb(1). For more
information about this procedure see DeBugging.
+
+!!Help I'm running out of file handles, what's using them all?
+ lsof | awk '{print $2}' | uniq -c | sort -n +1 | join -12 -21 - <(ps ax -o pid,command | sort -n) | sort -n +1
+This one liner lists processes in the form "pid,number of open files,command" with the process using the most files at the end.
+You can use this to determine which process on your system is leaking file handles, then use strace(1) to figure out why.
+
+----
+CategoryNotes