圆月山庄资源网 Design By www.vgjia.com
复制代码 代码如下:
#!/bin/sh
clear
while ((1>0))
do
NET=$(netstat -anp | grep 1000 | grep EST | wc -l)
PRC=$(ps aux | grep thread1 | grep -v grep | grep -v SCREEN | awk '{ print " CPU: " $3 "%, MEM: " $4 "%, RSS: " $6/1024 "M, VSZ: " $5/1024 "M, PID: " $2 ""}')
tput sc; echo -n -e "\b"; tput rc;
echo "SRV: thread1, NET: $NET, $PRC"
echo ""
NET=$(netstat -anp | grep 1011 | grep EST | wc -l)
PRC=$(ps aux | grep thread2 | grep -v grep | grep -v SCREEN | awk '{ print " CPU: " $3 "%, MEM: " $4 "%, RSS: " $6/1024 "M, VSZ: " $5/1024 "M, PID: " $2 ""}')
tput sc; echo -n -e "\b"; tput rc;
echo "SRV: thread2, NET: $NET, $PRC"
echo ""
NET=$(netstat -anp | grep 1022 | grep EST | wc -l)
PRC=$(ps aux | grep thread3 | grep -v grep | grep -v SCREEN | awk '{ print " CPU: " $3 "%, MEM: " $4 "%, RSS: " $6/1024 "M, VSZ: " $5/1024 "M, PID: " $2 ""}')
tput sc; echo -n -e "\b"; tput rc;
echo "SRV: thread3, NET: $NET, $PRC"
echo ""
NET=$(netstat -anp | grep 1033 | grep EST | wc -l)
PRC=$(ps aux | grep thread4 | grep -v grep | grep -v SCREEN | awk '{ print " CPU: " $3 "%, MEM: " $4 "%, RSS: " $6/1024 "M, VSZ: " $5/1024 "M, PID: " $2 ""}')
tput sc; echo -n -e "\b"; tput rc;
echo "SRV: thread4, NET: $NET, $PRC"
echo ""
NET=$(netstat -anp | grep beam.smp | grep EST | grep 222.222.18.222:800 | wc -l)
PRC=$(ps aux | grep thread | grep -v grep | awk '{CPU += $3} {MEM += $4} {RSS += $6} {VSZ += $5} END {print "CPU: " CPU "%, MEM: " MEM "%, RSS: " RSS/1024 "M, VSZ: " VSZ/1024 "M, " " "}' | awk 'END {print}')
tput sc; echo -n -e "\b"; tput rc;
echo "SRV: All, NET: $NET, $PRC"
echo ""
sleep 0.5
tput cup 0 0
done
#!/bin/sh
clear
while ((1>0))
do
NET=$(netstat -anp | grep 1000 | grep EST | wc -l)
PRC=$(ps aux | grep thread1 | grep -v grep | grep -v SCREEN | awk '{ print " CPU: " $3 "%, MEM: " $4 "%, RSS: " $6/1024 "M, VSZ: " $5/1024 "M, PID: " $2 ""}')
tput sc; echo -n -e "\b"; tput rc;
echo "SRV: thread1, NET: $NET, $PRC"
echo ""
NET=$(netstat -anp | grep 1011 | grep EST | wc -l)
PRC=$(ps aux | grep thread2 | grep -v grep | grep -v SCREEN | awk '{ print " CPU: " $3 "%, MEM: " $4 "%, RSS: " $6/1024 "M, VSZ: " $5/1024 "M, PID: " $2 ""}')
tput sc; echo -n -e "\b"; tput rc;
echo "SRV: thread2, NET: $NET, $PRC"
echo ""
NET=$(netstat -anp | grep 1022 | grep EST | wc -l)
PRC=$(ps aux | grep thread3 | grep -v grep | grep -v SCREEN | awk '{ print " CPU: " $3 "%, MEM: " $4 "%, RSS: " $6/1024 "M, VSZ: " $5/1024 "M, PID: " $2 ""}')
tput sc; echo -n -e "\b"; tput rc;
echo "SRV: thread3, NET: $NET, $PRC"
echo ""
NET=$(netstat -anp | grep 1033 | grep EST | wc -l)
PRC=$(ps aux | grep thread4 | grep -v grep | grep -v SCREEN | awk '{ print " CPU: " $3 "%, MEM: " $4 "%, RSS: " $6/1024 "M, VSZ: " $5/1024 "M, PID: " $2 ""}')
tput sc; echo -n -e "\b"; tput rc;
echo "SRV: thread4, NET: $NET, $PRC"
echo ""
NET=$(netstat -anp | grep beam.smp | grep EST | grep 222.222.18.222:800 | wc -l)
PRC=$(ps aux | grep thread | grep -v grep | awk '{CPU += $3} {MEM += $4} {RSS += $6} {VSZ += $5} END {print "CPU: " CPU "%, MEM: " MEM "%, RSS: " RSS/1024 "M, VSZ: " VSZ/1024 "M, " " "}' | awk 'END {print}')
tput sc; echo -n -e "\b"; tput rc;
echo "SRV: All, NET: $NET, $PRC"
echo ""
sleep 0.5
tput cup 0 0
done
标签:
cpu,内存,使用率
圆月山庄资源网 Design By www.vgjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
圆月山庄资源网 Design By www.vgjia.com
暂无评论...
更新日志
2024年11月13日
2024年11月13日
- 刘欢《雨中的树(新歌加精选)2CD》德国HD24K金碟[WAV+CUE]
- 郑源 《世间情歌》6N纯银SQCD[WAV+CUE][1G]
- 群星《粤潮2HQII》头版限量编号[低速原抓WAV+CUE][991M]
- 群星《2023好听新歌21》十倍音质 U盘音乐[WAV分轨][1G]
- 《热血传奇》双11感恩回馈 超值狂欢30天
- 原神5.2版本活动汇总 5.2版本活动有哪些
- 张敬轩.2010-NO.ELEVEN【环球】【WAV+CUE】
- 黄丽玲.2006-失恋无罪【艾回】【WAV+CUE】
- 阿达娃.2024-Laluna【W8VES】【FLAC分轨】
- 宝可梦大集结段位等级划分表大全 大集结段位一览
- 龙腾世纪影障守护者工坊与装备如何升级 工坊与装备升级说明
- 龙腾世纪影障守护者全成就攻略分享 龙腾世纪4全成就列表一览
- 《剑星》更新四套全新战衣!
- 卡普空老将伊津野英昭宣布入职腾讯光子 开发3A动作
- 38岁梅根·福克斯官宣怀孕:将迎来第四个孩子