[rrd-users] Re: RRD::TIME::STRFTIME use?

Pavleck, Jeremy D. Jeremy.Pavleck at capella.edu
Wed Dec 7 01:01:02 MET 2005


Ah! Thank you very much! My big mistake with all this was thinking I needed to use strftime to specify that graph start and stop times, when I realized it was only for informational uses I felt quite sheepish, but greatly appreciate you're example, it clarifies things even further. Thanks again!
 Jeremy

--------------------------
Jeremy D. Pavleck via BlackBerry
Network Engineer - Systems Management
IT Network and Infrastructure Dept.
Capella Education Company
DIRECT: (612) 977 - 5881


-----Original Message-----
From: Watkins, K (Kobe)
To: Pavleck, Jeremy D.; rrd-users at list.ee.ethz.ch
Sent: Tue Dec 06 17:46:09 2005
Subject: RE: [rrd-users] RRD::TIME::STRFTIME use?

Hi Jeremy,

I use the following code at the bottom of all of my graphs:

COMMENT:"Data graphed from <RRD::TIME::STRFTIME START <RRD::CV LENGTH>
<RRD::CV END> '%H\:%M %e/%b/%Y'> to <RRD::TIME::STRFTIME END <RRD::CV
LENGTH> <RRD::CV END> '%H\:%M %e/%b/%Y'>"

Which produces:

Data graphed from 10:29 6/Dec/2005 to 10:29 7/Dec/2005

I get the <RRD::CV LENGTH> etc. variables from the CGI query string
which looks like:

/cgi-bin/DISK.cgi?PERIOD=Daily&END=now&LENGTH=end-1d

/cgi-bin/CPU.cgi?PERIOD=2+Hour&END=1133910000&LENGTH=end-2h

And then the parameters of my graph are specified as:

--start <RRD::CV LENGTH> --end <RRD::CV END>

Use can use "man strftime" to get the formatting options, but I've
listed them below.

I hope this helps.

Cheers,
Kobe

%%    Same as %.
%a    Locale's abbreviated weekday name.
%A    Locale's full weekday name.
%b    Locale's abbreviated month name.
%B    Locale's full month name.
%c    Locale's appropriate date and time representation.
%C    Century number (the year divided by 100 and  truncated
      to  an  integer  as  a  decimal number [1,99]); single
      digits are preceded by 0; see standards(5).
%d    Day of month [1,31]; single digits are preceded by 0.
%D    Date as %m/%d/%y.
%e    Day of month [1,31]; single digits are preceded  by a space.
%g    Week-based year within century [00,99].
%G    Week-based year, including the century [0000,9999].
%h    Locale's abbreviated month name.
%H    Hour (24-hour clock) [0,23]; single  digits  are  preceded by 0.
%I    Hour (12-hour clock) [1,12]; single  digits  are  preceded by 0.
%j    Day number of year [1,366]; single digits are preceded by 0.
%k    Hour (24-hour clock) [0,23]; single  digits  are  preceded by a
blank.
%l    Hour (12-hour clock) [1,12]; single  digits  are  preceded by a
blank.
%m    Month number [1,12]; single digits are preceded by 0.
%M    Minute  [00,59];  leading  0  is  permitted  but   not required.
%n    Insert a NEWLINE.
%p    Locale's equivalent of either a.m. or p.m.
%r    Appropriate time representation in 12-hour clock  format with %p.
%R    Time as %H:%M.
%S    Seconds [00,61]; the range of values is [00,61] rather
      than  [00,59]  to allow for the occasional leap second
      and even more occasional double leap second.
%t    Insert a TAB.
%T    Time as %H:%M:%S.
%u    Weekday as a decimal number [1,7], with 1 representing
      Monday. See NOTES below.
%U    Week number of year as a decimal number [00,53],  with
      Sunday as the first day of week 1.
%V    The ISO 8601 week number as a decimal number  [01,53].
      In  the  ISO  8601 week-based system, weeks begin on a
      Monday and week  1  of  the  year  is  the  week  that
      includes  both  January  4th and the first Thursday of
      the year.  If the first Monday of January is the  2nd,
      3rd,  or  4th, the preceding days are part of the last
      week of the preceding year.  See NOTES below.
%w    Weekday as a decimal number [0,6], with 0 representing
      Sunday.
%W    Week number of year as a decimal number [00,53],  with
      Monday as the first day of week 1.
%x    Locale's appropriate date representation.
%X    Locale's appropriate time representation.
%y    Year within century [00,99].
%Y    Year, including the century (for example 1993).
%Z    Time zone name or abbreviation, or no bytes if no time
      zone information exists.

-----Original Message-----
From: rrd-users-bounce at list.ee.ethz.ch
[mailto:rrd-users-bounce at list.ee.ethz.ch] On Behalf Of Pavleck, Jeremy
D.
Sent: Wednesday, 7 December 2005 8:33 AM
To: rrd-users at list.ee.ethz.ch
Subject: [rrd-users] RRD::TIME::STRFTIME use?

Greetings,
 I'm playing around with rrdcgi to create some graphs, and what I'd
really like to know is now to use RRD::TIME::STRFTIME. Since I'm not at
all familiar with STRFTIME and the php.net manual, although helpful,
didn't give me the info I'm looking for, I thought I'd ask here. I'd
like to see an example of how to set the start and stop times in the
cgi. Though, after staring at this and playing with it for awhile, I'm
not quite sure that's exactly what it is for.. Either way, I'm trying to
make with RRDCGI, the same graph outputs as you get with normal MRTG,
and am stuck. Thanks in advance for any help!

Jeremy D. Pavleck
Network Engineer
System Management
	
Direct Line: 612-977-5881
Toll Free: 1-888-CAPELLA ext. 5881
Fax: 612-977-5060
E-mail: jeremy.pavleck at capella.edu
	
Capella University
225 South 6th Street, 9th Floor
Minneapolis, MN 55402

www.capella.edu


--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

_____________________________________________________________

This email, including any attachments, may be confidential or privileged, and is sent for the personal attention of the intended recipient.  If you have received this email in error, please delete it immediately .  The views expressed are not necessarily those of the Rabobank Group.  The Group is not liable for the effects of any virus which may be contained in this email.
_____________________________________________________________

If this e-Mail contains marketing material and you do not wish to receive such material by e-Mail in future, please reply to this e-Mail and place the words "Remove My Details - Electronic Messages" in the Subject Header.  

The Rabobank Group 
Australia: 1800 025 484
New Zealand: 0800 500 933

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list