[Orca-users] Re: Once a day plotting
Blair Zajac
blair at orcaware.com
Fri Oct 11 08:59:16 PDT 2002
[cc'ing Orca Discuss]
Yes, print the midnight epoch time in GMT.
I was just saying that you may want to add 24 hours to the GMT midnight
epoch time if you want your data to be associated with the following day.
Since you're running a shell, you could still call out to a simple Perl script to
return the midnight epoch time.
Launching orca with -o won't make any difference with this issue.
Best,
Blair
jerome bauwens wrote:
> Hi, Do you mean I should print the midnight epoch in GMT instead of the one at the time I launch my script in my input file. I really don't know perl so my scripting is done in shell. As my script starts at noon I really don't get what adding 86400 (24 hours) would do. Besides, as I launch orca with -o (once) do I need an interval in my config file. Best,Jerome
>
> ----- Original Message -----
> From: Blair Zajac
> To: orca-discuss at yahoogroups.com
> Sent: Thursday, October 10, 2002 7:45 PM
> Subject: Re: [orca-discuss] Once a day plotting
> luffle wrote:
> >
> > Hello,
> >
> > I'm trying to plot some daily NetBackup activity. I want to run orca
> > only once at noon with only a single line of input everyday. I ran it
> > for the past five days with the following input files:
> >
> > [zeus]:/usr/local/orca/nblog/input>ls -l
> > total 10
> > -rw-r--r-- 1 root other 49 Oct 4 16:45 nb.orca.20021004
> > -rw-r--r-- 1 root other 49 Oct 5 12:00 nb.orca.20021005
> > -rw-r--r-- 1 root other 49 Oct 6 12:00 nb.orca.20021006
> > -rw-r--r-- 1 root other 49 Oct 7 12:00 nb.orca.20021007
> > -rw-r--r-- 1 root other 49 Oct 8 12:27 nb.orca.20021008
> > [zeus]:/usr/local/orca/nblog/input>cat *
> > 1033742716 18 88 421948044 88
> > 1033812001 32 72 680048925 87
> > 1033898400 39 43 584608708 78
> > 1033984801 21 21 312067414 69
> > 1034072820 13 23 283324056 87
> > [zeus]:/usr/local/orca/nblog/input>
> > ====================================================================
> > I'm running orca with orca -o orcaconf_tape:
> >
> > [zeus]:/usr/local/orca/scripts>cat orcaconf_tape
> > state_file /usr/local/orca/nblog/state/nb_state
> > rrd_dir /usr/local/orca/nblog/rrd
> > html_dir /usr/local/orca/nblog/html/orca-html
> > html_page_header <a href="index.html">NB INDEX</a>
> > generate_hourly_plot 0
> > generate_daily_plot 0
> > generate_weekly_plot 1
> > generate_monthly_plot 1
> > generate_quarterly_plot 0
> > generate_yearly_plot 0
> >
> > group nbjobs {
> > find_files /usr/local/orca/nblog/input/nb.orca.(\d{4}\d{2})\d{2}
> > column_description etime nbtape nbscratch sumkb nbjob
> > date_source column_name etime
> > interval 86400
> > }
> >
> > plot {
> > title TAPE USED AND SCRATCH
> > source nbjobs
> > data nbtape
> > data nbscratch
> > line_type LINE2
> > line_type STACK
> > legend cartouches utilisees pendant la nuit
> > legend nombre de cartouches dans le scratch
> > }
> >
> > plot {
> > title Kb SUM
> > source nbjobs
> > data sumkb
> > line_type LINE3
> > legend kk
> > }
> >
> > plot {
> > title NOMBRE DE JOBS
> > source nbjobs
> > data nbjob
> > line_type AREA
> > y_legend nombre de jobs au cours de la nuit
> > }
> > [zeus]:/usr/local/orca/scripts>
> > =================================================================
> > The plot I get seem to be some kind of average as the "TAPE USED AND
> > SCRATCH" shows a value of 16,333 instead of 13 for the number of
> > tapes used last night. What am I missing ? I really can't run my
> > script at midnight as my backup window goes from 7 pm to 11am and I'd
> > like to update my rrd and html files the same day the backups were
> > done (even though some of them actually started the day before).
> > Don't pay attention to the type of lines or legends as I am still
> > testing (duh!)
>
> That's a tough one. RRD tool likes to make measurements on integer
> multiples of your interval time, so it'll perform some calculation
> to place the measurement time at 0:00 GMT time (not local time) since
> you've got interval at 86400 seconds.
>
> Maybe the easy solution for you is to print out the time rounded down
> or up 86400 when you print your time.
>
> If your script it perl, you'd use something like this:
>
> my $print_time = int(time()/86400)*86400;
> if (I want tomorrow, not today) $print_time += 86400;
>
> That way you don't have to deal with this.
>
> Best,
> Blair
>
> --
> Blair Zajac <blair at orcaware.com>
> Web and OS performance plots - http://www.orcaware.com/orca/
>
More information about the Orca-users
mailing list