Skip to content

查看句柄数

Terminal window
$ ulimit -a
Maximum size of core files created (kB, -c) 0
Maximum size of a process’s data segment (kB, -d) unlimited
Maximum size of files created by the shell (kB, -f) unlimited
Maximum size that may be locked into memory (kB, -l) unlimited
Maximum resident set size (kB, -m) unlimited
Maximum number of open file descriptors (-n) 256
Maximum stack size (kB, -s) 8192
Maximum amount of cpu time in seconds (seconds, -t) unlimited
Maximum number of processes available to a single user (-u) 2784
Maximum amount of virtual memory available to the shell (kB, -v) unlimited
Terminal window
lsof|awk '{print $2}'|wc -l

根据打开文件句柄的数量降序排列

Section titled “根据打开文件句柄的数量降序排列”
Terminal window
lsof|awk '{print $2}'|sort|uniq -c|sort -nr|more