[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.
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
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment