network_graph () { last_x="$1" net_dev="$2" if [ -f $rrd_dbpath/interface/if_octets-$net_dev.rrd ] then /usr/bin/rrdtool graph /srv/www/img/network-$net_dev-$last_x.png --title "Network $net_dev - $last_x" \ --imginfo 'Network' \ $rrd_width $rrd_height $rrd_common_opts --watermark "$rrd_watermark" \ --end now --start end-${last_x} \ --vertical-label "Bytes/s" \ --font "WATERMARK:8" \ $rrd_grid_background \ DEF:rx=$rrd_dbpath/interface/if_octets-$net_dev.rrd:rx:AVERAGE \ DEF:tx=$rrd_dbpath/interface/if_octets-$net_dev.rrd:tx:AVERAGE \ LINE1:rx$rrd_col_green:"RX \n" \ LINE1:tx$rrd_col_red_light:"TX \n" \ COMMENT:"Letztes update\:\t$rrd_last_update" else show_error "$_MN_err" "no rrd-database for $net_dev" fi }