[mrtg] Re: Week numbering incorrect on Windows 2K Server.

Tobias Oetiker oetiker at ee.ethz.ch
Fri Sep 3 00:36:07 MEST 2004


Hi Gregers,


> > Problem is identical; It is now week 36 (02 September 2004, UTC+2,
> > Copenhagen, Denmark), but the week number displayed on monthly graphs is
> > a week behind (showing week 35).
> >
[...]
> I'm just ever so thankful that Tobi has gone the extra mile (light
> year?) that he has to get his fine tools to run on the Windows platform,
> and for all the contributors that have assisted - despite the obvious
> distaste for the OS.

there are three week numbering schemes available

     %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    Week number of year as a decimal number [00,53],  with
           Monday as the first day of week 1.

     The difference between %U and %W (and also between  modified
     conversion  specifications %OU and %OW) lies in which day is
     counted as the first of the week. Week number 1 is the first
     week  in  January  starting with a Sunday for %U or a Monday
     for %W. Week number 0 contains those days before  the  first
     Sunday or Monday in January for %U and %W, respectively.

In europe most people like to use the V variant ...

currently, rateup uses the W variant becaus most systems seem to
implemnt this ... you can configure mrtg to use V if you define the
weekformat option
------------------------
=head2 Weekformat

By default, mrtg (actually rateup) uses the strftime(3) '%W' option
to format week numbers in the monthly graphs.  The exact semantics
of this format option vary between systems.  If you find that the
week numbers are wrong, and your system's strftime(3) routine
supports it, you can try another format option.  The POSIX '%V'
option seems to correspond to a widely used week numbering
convention.  The week format character should be specified as a
single letter; either W, V, or U.

Example:

 Weekformat[myrouter]: V

----------------------------

I don't think V is supported by the windows c library used to link
rateup but you might try, maybe it does support V now ... I also
gather there are different implementations of the c library on
windows, maybe it only a problem of the one I am linking rateup
against (this is cross compiled for windows on a solaris server).
Someone with visual something at their hands might give this a
wirl.

cheers
tobi


> Eric Brander
>
> --
> Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
> Archive     http://www.ee.ethz.ch/~slist/mrtg
> FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi
>

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker @ ISG.EE, ETL F24.2, ETH, CH-8092 Zurich
 / // _ \/ _ \/ /  System Manager, Time Lord, Coder, Designer, Coach
/_/ \.__/_.__/_/   http://people.ee.ethz.ch/oetiker +41(0)44-632-5286

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list