Networker

Re: [Networker] Getting leading zeros in date and time output from mminfo?

2010-09-16 12:18:30
Subject: Re: [Networker] Getting leading zeros in date and time output from mminfo?
From: "Landwehr, Jerome" <jlandweh AT HARRIS DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Thu, 16 Sep 2010 12:17:51 -0400
The 'date' field is available by default, but to get something useful,
check out custom mminfo queries.

You can specify a different request using nsavetime. Like:

# mminfo -a -r 'volume(10),ssid,nsavetime(12),totalsize,level,name' |
head

 volume   ssid          save time      total  lvl name
000001    4128858802   1092182722   60287816 incr C:\
000001    488375837    1092355321   61924320 incr C:\
000001    2384373822   1092528202  109719328 incr C:\
000001    840956356    1092614611   26331724 incr C:\
000001    4263594768   1092700943   27313400 incr C:\
000001    19045606     1092787444   27501812 incr C:\
000001    4196662410   1092877458   29509576 incr C:\
000001    2368032192   1092963764   28342924 incr C:\
000001    1848024856   1093050153   27541272 incr C:\


from the mminfo man page:

SYNOPSIS
     mminfo [ -avV ] [ -o order ] [ -s server ] [ -x exportspec ] [
report ]
            [ query ] [ volname... ]

            < report >: [ -m | -p | -B | -S | -X | -r reportspec ]
            < query >: [ -c client ] [ -l ] [ -N name ] [ -t time ]
            [ -q queryspec ]
...
     -o order
          Sorts  the  output  in  the  specified  order.   Before
          displaying  the  save  sets, they are sorted by various
          fields.  Numeric fields are sorted least  to  greatest,
          other  fields  are sorted alphabetically.  order may be
          any combination of the letters  celmnotR,  representing
          client,  expiration  date,  length, media name, name of
          save set, offset on media  (file  and  record  number),
          time,  and  Reverse, respectively.  The default sorting
          order for save  set  reports  is  mocntl.   The  offset
          fields  (file  and record) are only considered when the
          -V option has been selected and for custom reports that
          show  save  set  section  (fragment) information.  When
          applied to -m media-only reports,  the  length  is  the
          amount  used  on  the volume, the time is the last time
          the media was accessed, and the other order  flags  are
          ignored.
...
      attribute     value
        name        range   width                     description
...

     savetime    time         9  The save time (on the client).
     nsavetime   NA          11  The save time, printed as seconds
                                 since 00:00:00 GMT, Jan 1, 1970.
     sscreate    time         9  The creation time (on the server).
                                 If the client and server clocks are out
of
                                 sync, this time may be different from
the
                                 save time.
...


Or even more simply, let mminfo sort for you with the -ot option


I'm on unix, but it's the same mminfo command on windows

HTH
Jerry

To sign off this list, send email to listserv AT listserv.temple DOT edu and 
type "signoff networker" in the body of the email. Please write to 
networker-request AT listserv.temple DOT edu if you have any problems with this 
list. You can access the archives at 
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER