# create RRD. RRA sizes and step sizes should be adjusted, # see man rrdcreate rrdtool create -s 5 eth0.rrd DS:bytes:ABSOLUTE:10:U:U \ DS:packets:ABSOLUTE:10:U:U RRA:AVERAGE:.5:12:60 RRA:AVERAGE:.5:720:17280 # continuously update nohup tcpstat -i eth0 -F -o 'update eth0.rrd -t bytes:packets %S:%N:%n\n' | rrdtool - 2>&1 >/dev/null & # run this periodically to generate a graph rrdtool graph eth0.png -s -3600 \ DEF:b=eth0.rrd:bytes:AVERAGE \ DEF:p=eth0.rrd:packets:AVERAGE AREA:b#ff0000 LINE1:p#0000ff