[ARGUS] Patch for ragraph

Steve McInerney spm at healthinsite.gov.au
Wed Aug 4 21:31:32 EDT 2004


All,

To help get around those irritating :
/usr/local/bin/ragraph: unable to update `/tmp/fileNcFxKU.rrd': 
conversion of '1090764300.000000' to long not complete: tail '.000000'

or

/usr/local/bin/ragraph: unable to create `/tmp/filex6EqS5.rrd': start 
time: unparsable time:


In essence, use -p0 if getting the 1st error message above (as mentioned 
in previous days? weeks?); This should then give you the 2nd error. The 
problem is caused that the RegEx for extracting the start time is 
expecting a decimal point in the start (and end) times. One doesn't 
exist, hence they fail and end up with undef values.
Circa line # 133 in ragraph from argus-clients-2.0.6.fixes.1

The fix simply makes the decimal point optional; and all appears to work.

Example ragraph calls:
ragraph bytes dport -N 20 -M 300 -p0 -w 1.gif -r ra.2004-07-26 -

To show (hopefully...) the top 20 ports by bytes, by 5 minute intervals.

Tested on Fedora Core2, rrdtool 1.0.48


Enjoy!


- Steve


Patch: Be careful of the line wraps.

*** ragraph.pl  Sat Dec  6 03:47:17 2003
--- /usr/local/bin/ragraph      Thu Aug  5 11:14:02 2004
***************
*** 130,138 ****
         if (my $data = <SESAME>) {
            if ( ($k, $v) = $data =~ m/(\w+)=(.*)/ ) {
               for ($k) {
!                /StartTime/ and do {(($START, $FRAC) = $v =~ 
m/(\d*)\.(.*)/) ;};
!                /StopTime/  and do {(($END, $FRAC) = $v =~ 
m/(\d*)\.(.*)/) ;};
!                /BinSize/   and do {(($STEP, $FRAC) = $v =~ 
m/(\d*)\.(.*)/) ;};
                  /Columns/   and do { $COLUMNS = $v;};
                  /Bins/      and do {$RUNS = $v;};
                  /Protos/    and do {$PROTOS = $v;};
--- 130,138 ----
         if (my $data = <SESAME>) {
            if ( ($k, $v) = $data =~ m/(\w+)=(.*)/ ) {
               for ($k) {
!                /StartTime/ and do {(($START, $FRAC) = $v =~ 
m/(\d*)\.*(.*)/) ;};
!                /StopTime/  and do {(($END, $FRAC) = $v =~ 
m/(\d*)\.*(.*)/) ;};
!                /BinSize/   and do {(($STEP, $FRAC) = $v =~ 
m/(\d*)\.*(.*)/) ;};
                  /Columns/   and do { $COLUMNS = $v;};
                  /Bins/      and do {$RUNS = $v;};
                  /Protos/    and do {$PROTOS = $v;};



More information about the argus mailing list