A small script, see how many bags in your machine

xiaoxiao2021-03-06  41

A small script, see how many bags in your machine have joined and out #! / Bin / sh ###################################################################################################################################################################################################################### ###################### #count packages and uptime #flydragon (pkkingsong) cnfreeos@163.com #http://www.cnfreeos.org #oicq: 42560779 ############################################################### #### intfnum = `netstat -inb | grep link # | wc -l` Up =` uptime | awk '{print "uptime Total:" $ 3 $ 4 $ 5}' `Echo $ UP Echo the Macheine Have $ INTFNUM Interfaces INTFNUM = `EXPR $ INTFNUM 1` counter = 1 while [$ counter -lt $ intfnum] do l1 =` netstat -inb | grep link # $ counter | awk '{print "interface" $ 1 ":" "" "" "" "" " / 1048576 "mbytes // out pkg" $ 10/1048576 "mbytes"} '`Echo $ l1 counter =` expr $ counter 1` Done Exit

转载请注明原文地址:https://www.9cbs.com/read-53888.html

New Post(0)