Checking open file descriptors ============================== Public domain ******************************************************************************** ### General # cat /proc/sys/fs/file-max 309551 # cat /proc/sys/fs/file-nr 1309 0 309551 | | | | | | | | maximum open file descriptors | total free allocated file descriptors total allocated file descriptors (the number of file descriptors allocated since boot) # lsof | wc -l 2110 ******************************************************************************** ### Per PID # ps -A | grep squid 2458 ? 00:00:00 squid 2460 ? 00:01:42 squid # netstat -tunapo | grep squid | tail -n 1 udp 0 0 0.0.0.0:3401 0.0.0.0:* 2460/(squid) off (0.00/0/0) # lsof | grep 2460 | wc -l 1050 # ls -l /proc/2460/fd/ | wc -l 1099 ******************************************************************************** _BY: Pejman Moghadam_ _TAG: filedescriptor_ _DATE: 2007-11-09 19:07:13_