[wev@wad03 logs]$ /usr/sbin/lsof -p 21336 | perl -MData::Dumper -ne 'BEGIN { my %x=();} {@s=split /\s+/;$x{$s[4]}++;} END { print Dumper(\%x); }'
$VAR1 = {
'IPv6' => 3,
'unix' => 1,
'DIR' => 2,
'TYPE' => 1,
'CHR' => 4,
'0000' => 1,
'REG' => 463,
'sock' => 1
};
[wev@wad03 logs]$
Rants and ravings of a semi-autistic developer who has a hard time remembering idiotic nonsense details. Why remember it, when you know where to find it.
Showing posts with label open files. Show all posts
Showing posts with label open files. Show all posts
Friday, January 20, 2012
Where Are My Open Files Go? lsof++
So where are my IO handles (open files) are being spend... here a oneliner
First get the PID and ram everything of lsof thru the parser....
Labels:
linux,
lsof,
oneliner,
open files
Friday, February 4, 2011
lsof: poor mans list open files
list open files per process
ps aux | grep weblogic.Name | grep -v grep | perl -ne '@x=split;my(@c)=glob("/proc/$x[1]/fd/*");printf "%5d %s open files.\n",$x[1],scalar @c;'
Labels:
linux,
lsof,
open files
Subscribe to:
Posts (Atom)