查看内存使用情况
free -m total used free shared buffers cached Mem: 7999 7100 898 0 348 5982 -/+ buffers/cache: 769 7229 Swap: 2047 1 2046
- used=total-free 即 total=used+free
- 实际内存占用:used-buffers-cached 即 total-free-buffers-cached
- 实际可用内存:buffers+cached+free
- 可见-buffers/cache(used)反映的是被程序实实在在吃掉的内存,而+buffers/cache(free)反映的是可以挪用的内存总和
转自:https://www.cnblogs.com/pengdonglin137/p/3315124.html
查看一个进程可以打开的文件句柄数 ulimit -a |grep files 65535
查看当前19010端口一共有多少连接 netstat -na |grep ESTAB |grep 19010 | wc -l
查看当前80端口一共有多少连接(只匹配80端口) netstat -na |grep ESTAB |grep -w 80 | wc -l
查看当前端口被哪个进程占用
netstat -tlnp |grep 19010