Friday, October 30, 2020

Check the open files limit and current for a process

> for p in $(pidof java); do printf "$p: "; ls -l /proc/$p/fd |wc -l; done
54055: 93
54008: 9


> for p in $(pidof java); do printf "$p: "; cat /proc/$p/limits |grep open; done
54055: Max open files            65536                65536                files
54008: Max open files            65536                65536                files

No comments:

Post a Comment