#! /usr/bin/perl # # # use GDBM_File; $arg=$ARGV[0]; $MB=1024*1024; $total_datafile="/home/wleiden/stats/mrtg/total_stats.gdbm"; tie %TOTAL_DATA,'GDBM_File',"$total_datafile", &GDBM_READER, 0640|| die "Could not open file: $total_datafile\n"; $in=$TOTAL_DATA{"$arg-in"}; $out=$TOTAL_DATA{"$arg-out"}; untie(%TOTAL_DATA); printf "%.0f\n",abs($in); printf "%.0f\n",abs($out); printf "%.0f\n"; printf "Wleiden.NET\n";