1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
$ lsof -p <pid> | wc -l
$ lsof -u root
$ lsof -n|awk '{print $2}'|sort|uniq -c|sort -nr|more
$ lsof -p <pid>| awk '{print $4}' |grep "^[0-9]" |wc -l
$ ls /proc/<pid>/fd | wc -l
$ cat /proc/sys/fs/file-nr 896 0 9223372036854775807
$ cat /proc/sys/fs/file-max 9223372036854775807
$ ulimit -a real-time non-blocking time (microseconds, -R) unlimited core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 15395 max locked memory (kbytes, -l) 497139 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 15395 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited $ ulimit -n 1024
$ cat /proc/<pid>/limits
|