[Orca-users] Re: Orca

Blair Zajac bzajac at geostaff.com
Wed Aug 11 18:37:28 PDT 1999


Hello Bernard,

Apply the attached patch to Orca and it should work.  I just tried a similar
configuration myself and it worked.

Blair

PS Glad you liked Orca.


Bernard Hubbard wrote:
> 
> Dr. Blair Zajac
>         Hi, I am presently looking at orca for monitoring equipment at Deakin
> University and am impressed with what I've seen so far.  However I have
> tried a number of things to achieve plotting all the network interfaces
> from each of our machines on one graph per machine but have been unsucessful.
> 
> The best I have bee able to do is to get one graph per interface per machine.
> 
> The error message I get is that I have an "undefined array" and orca exits.
>  however that only occurs when I include different names in the one plot
> definition.  For example.
> 
> plot {
> title   %g Bits per Second:  All
> .
> data   1024 * 8 * le0InKB/s
> data   1024 * 8 * le0OuKB/s
> data   1024 * 8 * le1InKB/s
> data   1024 * 8 * le1OuKB/s
> .
> }
> 
> This I put down to the interface names being different.  If I remove either
> name it works for the remaining interface on its own.  It doesn't matter
> which one is left.
> 
> The plots already in the orcallator.cfg file for le0 and le1 run fine.
> 
> Although I hashed them out so that I wouldn't have duplicate references for
> le0 and le1 "Bits per Second" plots while I experimented.   We have several
> machines and they don't all have the same interface names.  ie:  not all
> have le1 for example.
> 
> I have orca running on one machine (sun equipment) and orcallator running
> on all of them.  I have the orcallator data dircetories nfs shared to the
> orca host.
> 
> I hope I've been reasonably clear for you.
> 
> I would greatly appreciate any advice on how to configure this.
> 
> Regards
> Bernard Hubbard
> Systems Administrator
> Deakin University
-------------- next part --------------
*** orca-0.23 Wed Aug 11 18:30:29 1999 --- orca Wed Aug 11 18:11:20 1999 *************** *** 89,95 **** $bottom = '' unless defined $bottom; local *FD; ! open(FD, "> $filename") or return; print FD < --- 91,97 ---- $bottom = '' unless defined $bottom; local *FD; ! open(FD, "> $filename.tmp") or return; print FD < *************** *** 142,149 **** END close($self->{_handle}) or ! warn "$0: warning: cannot close `$self->{_filename}': $!\n"; } package Orca::OpenFileHash; --- 144,154 ---- END + my $filename = "$self->{_filename}"; close($self->{_handle}) or ! warn "$0: warning: cannot close `$filename.tmp': $!\n"; ! rename("$filename.tmp", $filename) or ! warn "$0: cannot rename `$filename.tmp' to `$filename': $!\n"; } package Orca::OpenFileHash; *************** *** 1435,1445 **** my
@group_name; for (my $j=0; $j<@datas; ++$j) { ! my $expr = "@{$datas[$j]}"; my $sub_expr_sub = undef; my $data_name = join('_', @{$plot->{data}[$j]}); if (defined $datas[$j]) { my $sub_expr = "sub {\n return $expr;\n}\n"; my $sub_expr_md5 = md5($sub_expr); --- 1449,1460 ---- my @group_name; for (my $j=0; $j<@datas; ++$j) { ! my $expr = undef; my $sub_expr_sub = undef; my $data_name = join('_', @{$plot->{data}[$j]}); if (defined $datas[$j]) { + $expr = "@{$datas[$j]}"; my $sub_expr = "sub {\n return $expr;\n}\n"; my $sub_expr_md5 = md5($sub_expr); *************** *** 2456,2466 **** } # Strip special characters from key names. ! sub strip_key_name { my $name = shift; $name =~ s/:/_/g; $name =~ s:/:_per_:g; $name =~ s:\s+:_:g; $name =~ s:%:_percent_:g; $name =~ s:#:_number_:g; $name =~
s:_{2,}:_:g; --- 2471,2482 ---- } # Strip special characters from key names. ! sub old_strip_key_name { my $name = shift; $name =~ s/:/_/g; $name =~ s:/:_per_:g; $name =~ s:\s+:_:g; + $name =~ s:\*:_times_:g; $name =~ s:%:_percent_:g; $name =~ s:#:_number_:g; $name =~ s:_{2,}:_:g; *************** *** 2471,2476 **** --- 2487,2517 ---- $name; } + # Replace special characters from key names, remove redundant characters, + # and shorten the names so the maximum path name is not exceeded. + sub strip_key_name { + my $name = shift; + + $name =~ s/:/_/g; + $name =~ s:/:_per_:g; + $name =~ s:\s+:_:g; + $name =~ s:%:_pct_:g; + $name =~ s:#:_num_:g; + $name =~ s:\*:_X_:g; + + # Trim anything containing orcallator, orca. + $name =~ s:orcallator:o:g; + $name =~ s:orca:o:g; + + # Remove trailing _'s. +
$name =~ s:_+$::; + $name =~ s:_+,:,:g; + + $name =~ s:_{2,}:_:g; + + $name; + } + # Return an list of the unique elements of a list. sub unique { my %a; *************** *** 2922,2927 **** --- 2963,2978 ---- $plot->{plot_width} = 500 unless $plot->{plot_width}; $plot->{plot_height} = 125 unless $plot->{plot_height}; + # Make sure the base is either 1000 or 1024. + if (defined $plot->{base} && length($plot->{base})) { + if ($plot->{base} != 1000 and $plot->{base} != 1024) { + die "$0: error: plot #$j must define base to be either 1000 or 1024.\n"; + } + } + else { + $plot->{base} = 1000; + } + # Set the plot minimum and maximum values to U unless they are # set. unless (defined $plot->{data_min}) {


More information about the Orca-users mailing list