[Orca-users] Re: graph problems

Blair Zajac blair at gps.caltech.edu
Mon Apr 23 21:59:32 PDT 2001


Pete,

There's a bug in Orca where the file sorting routine to load input
data files will sort the input files randomly.  Then when Orca loads
the data in the randomly sorted files into RRD, RRD will ignore any
data older than the latest inserted data, so it won't store all of
the data.  

I'm attaching a patch to apply to Orca.  Then delete all of the state
files and rerun Orca.  Let me know if this helps.

Regards,
Blair

pete at bignicolet.com wrote:
> I have orca runnin from my personal login on our nfs host.  The data
> is populated automatically by rsync daemon process which runs on the
> nfs host.  The ownership on the files is nobody:nobody.  Everything
> was running fine, until I had to move the data from one nfs host to
> another and some of the html files got munged.  I had 2 weeks of
> gzip'd data now for each host.  I cleared the state files and removed
> everything form html_dir and rrd_dir so that everything would be
> rebuilt clean.  Now I only get the last day's worth of info.  I just
> ran the orca program on one of the systems.  The state file has all
> the gzip file entries in it, but the only data displed in html is the
> data from today which is unzipped.  My orcallator*.cfg files are
> configured to handle .gz files.  Any ideas?
> 
> pete stoneberg
-------------- next part --------------
--- ../orca-0.26/src/orca.pl.in	Thu Mar  9 14:49:59 2000
+++ src/orca.pl.in	Wed Feb  7 16:40:57 2001
@@ -965,17 +965,26 @@
 
     # Create a new list of filenames sorted by subgroup name and
     # inside each subgroup sorted using the filename_compare
-    # configuration option function or by the Perl cmp function.  This
-    # will cause the created plots to appear in subgroup order.  The
-    # compare subroutine expects the input in the $a and $b package
-    # variables.  Since the subroutine was eval'ed in the Orca::Config
-    # package, the sort subroutine needs be in that package.
+    # configuration file function or by the default compare function
+    # that uses cmp to compare filenames.  This will cause the created
+    # plots to appear in subgroup order.  Note that the FIDs are not
+    # being sorted, but the filename the FID references.
+    #
+    # The compare subroutine expects the input in the $a and $b
+    # package variables and since the compare subroutine was eval'ed
+    # in the Orca::Config package it will look for these variables in
+    # Orca::Config.  Also, since sort cannot be passed a reference to
+    # a sorting subroutine stored in a hash (i.e. sort $a{b} @c), use
+    # a temporary variable.  Some versions of Perl will complain that
+    # fc is used only once, so declare the variable and set it in two
+    # separate statements.
     @fids = ();
     {
-      local *Orca::Config::fc = $config_groups{$group_name}{filename_compare};
+      package Orca::Config;
+      local *fc;
+      *fc = $config_groups{$group_name}{filename_compare};
       foreach my $subgroup (sort keys %tmp_fids_by_subgroup) {
-        push(@fids,
-             sort Orca::Config::fc @{$tmp_fids_by_subgroup{$subgroup}});
+        push(@fids, sort fc @{$tmp_fids_by_subgroup{$subgroup}});
       }
     }
 


More information about the Orca-users mailing list