November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

List number of file handles (open files) for each process

List number of file handles (open files) for each process

Here is a simple script that will show you a number of file handles (open files) used by each process on your Linux system:

ps -e|grep -v TTY|awk {‘print “echo -n \”Process: “$4″\tPID: “$1″\tNumber of FH: \”; lsof -p “$1″|wc -l”‘} > out; . ./out

1 comment to List number of file handles (open files) for each process

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>