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
| cat /proc/sys/fs/file-max 或 sysctl -a|grep fs.file-max
vi /etc/sysctl.conf fs.file-max=3244084 sysctl -p
ulimit -n
vim /etc/security/limits.conf * soft nofile 65535 * hard nofile 65535
find /proc -print | grep -P '/proc/\d+/fd/'| awk -F '/' '{print $3}' | uniq -c | sort -rn | head -10
lsof -n|awk '{print $2}'|sort|uniq -c|sort -nr|head -10
ps -efT|grep java|awk '{print $2}'|sort|uniq -c|sort -nr|head -10
lsof -n -i tcp | awk '{print $2}'|sort|uniq -c|sort -nr|head -10
ls /proc/32484/fd -l | wc -l
ps huH p 25439 | wc -l
ss -tan|grep CLOSE-WAIT|wc -l
|