#!/bin/sh
#set -x
echo "">total_handler
psid=`ps -ef|grep $1|head -1|awk '{print $2}'`
count=0
while [ $count -lt 60 ]
do
lsof -p $psid | wc -l >> total_handler
sleep 1
count=`expr $count + 1`
done
用lsof统计程序打开的句柄数量
最新推荐文章于 2023-10-10 16:11:35 发布