如何知道当前进程打开了多少个文件句柄呢?下面一段小脚本可以帮你查看:`kf DPZ2c0
- lsof -n |awk '{print $2}'|sort|uniq -c |sort -nr|more
- 查看CPU 个数:
-
cat /proc/cpuinfo |grep "processor"|sort -u|wc -l
定时查看某个结果:
watch-d -n 1 'wc -l subscribe_*.txt '
打开core文件生成开关:
ulimit -cunlimited
启动 nginx与spawn-fcgi 进行通讯:
upstream frontserver {
server 127.0.0.1:8088;
}
server {
listen 80;
server_name localhost;
location ~ ^/lbtest {
fastcgi_pass frontserver;
}
}
启动 某个进程与spawn-fcgi 进行通讯:
${fcgiPath}/spawn-fcgi -F 1 -a 127.0.0.1 -p 8088 -f ${appPath} test_app