Quantcast
Channel: CNode:Node.js专业中文社区
Viewing all articles
Browse latest Browse all 14821

nodejs 脚本,非shell脚本,内存泄漏问题

$
0
0

今天在跑node 写的shell脚本的时候,遇到一个比较严重的问题,内存爆了,脚本被Killed了, 然后我查询node进程的时候,查到了N个sh /mnt/www/Resource_Monitor/node_capstats.sh进程,如图,从这些进程的名称来看的话,应该是资源监测器什么的,有没有大神指导一下。 TIM图片20170612111252.png补充一下,/mnt/www/Resource_Monitor/node_capstats.sh脚本内容如下:

#!/bin/bash  
# script to capture system statistics   
OUTFILE=/home/cpumem.doc
pid=`pgrep node | tr "\\n" "," | sed 's/,$//'`
cpu=`top -p $pid -b -n 600 -d 1`
echo "$pid">>$OUTFILE

Viewing all articles
Browse latest Browse all 14821

Trending Articles