[BlueOnyx:10120] Re: Bandwidth
Dogsbody
dan at dogsbody.org
Thu Apr 12 18:40:29 -05 2012
> Have a simple question, maybe a stupid question, but is there somewhere in /
> on BO5106 where I can see how much bandwidth the server as a whole is using
> on a monthly basis for all processes?
Historically I use iptables and MRTG to do this. For iptables...
LOCALIPS=`/sbin/ifconfig | grep "inet addr" | cut -f 2 -d":" | cut -f 1
-d" "`
for IP in $LOCALIPS; do
/sbin/iptables -A acctin -d $IP
/sbin/iptables -A acctout -s $IP
done
... and MRTG...
INDATA=`/sbin/iptables -xvn -L acctin | grep " $IP" | head -1 | awk
'{print $2}'`
OUTDATA=`/sbin/iptables -xvn -L acctout | grep " $IP" | head -1 | awk
'{print $2}'`
... although, as Chris says, any enterprise switch or ISP should be able
to give you this data nowadays.
Dan
--
Find me online : http://www.dogsbody.info/
More information about the Blueonyx
mailing list