Networker

Re: [Networker] Order of ssids with mminfo?

2010-11-18 15:12:58
Subject: Re: [Networker] Order of ssids with mminfo?
From: George Sinclair <George.Sinclair AT NOAA DOT GOV>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Thu, 18 Nov 2010 15:10:49 -0500
George Sinclair wrote:
Davina Treiber wrote:
On 11/18/10 00:58, George Sinclair wrote:
What order are ssids listed when you just run:

mminfo -q volume=volname -r ssid

without specifying a sort order using -o ???


Seems like the order changes around when I report more fields? For
example, using '-r ssid,mediafile' doesn't report the ssids in the same
order as '-r ssid'. I was trying to add various fields to see if I could
figure out the default order, but I don't think I've got it.

Why does this matter in the slightest? If you want to specify the order
you can, so what does the default matter? I almost always use "-ot".


You're right, and ordinarily, I would agree, and I also use '-ot' much of the time, but here's how this came up, as silly as this might seem.

I had a tape wherein all the savesets were marked suspect, and I wanted to mark all the savesets notsuspect. So, I ran this command:

mminfo -s server -q volume=volname -r ssid,cloneid | grep -v ssid | awk '{print $1 "/" $2}' | xargs -i /bin/sh -c 'nsrmm -s server -o notsuspect {} -y'.

While this was running - and it took it a while - I was trying to figure out how much it had completed. So I'm running other commands to query that tape like:

mminfo -s server -q volume=volname -r savetime,clflags | egrep 's$'
mminfo -s server -q volume=volname -r savetime,clflags

and I notice that reported lines that still end in an ' s' are sporadically located and do NOT appear in the order that my command should be processing them. In other words, I would have expected my command to march through the ssids in the order that the command:

mminfo -s server -q volume=volname -r ssid,cloneid

would have reported them, but it didn't seem to be doing this at all. So, I'm wondering: OK, what is the order if I don't use '-ot' or '-o' followed by some sort criteria? The more I played around with it, the more mysterious it became so I decided to post my question but leave out all the detail that led to it. BTW The command that I ran worked just fine.

If the default sort order is 'mocntl' then the 'm' seems moot in this case as this is the same piece of media, right? Next, the 'o' as I discovered seems tantamount to reporting the mediafile, but doing that does not result in the same order for the ssids as I initially posted. It's the same client for all the save sets, so 'c' seems moot as well. Next, 't' seems moot because I get a different order when I run 'mminfo -q volume=vol -ot' versus 'mminfo -q volume=vol'. That leaves only 'n' for name. Not all the save sets have the same name, but sorting them in order by name does not produce the same ssid order.


OK, I went back and took a closer look. As Darren remarked, the default sort order in the man page for mminfo states 'mocntl', but it was easy to miss that. Playing around with several tapes, and running several mminfo commands, I found that I did get the exact same order if I specified 'mminfo -q volume=vol -omocntl -r ssid' as 'mminfo -q volume=vol -r ssid'. Duh!

On one tape, I got away with using only '-ont', but I had to include both 'n' and 't' and in that order, not vice-versa. On another tape, I had to include most of the values, but I could get away with excluding 'l'. Obviously, it will vary from one tape to another.

If I had just sorted the initial output using '-ot', as Davina mentioned, that my xargs command was processing over then this would never have been an issue. So next time, I'll try to remember to just sort the listing that I'm processing so I can compare it. Or I'll try to remember to use '-omocntl' to compare later if I didn't pre-sort it.

George

George

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





--
George Sinclair
Voice: (301) 713-3284 x210
- The preceding message is personal and does not reflect any official or unofficial position of the United States Department of Commerce -
- Any opinions expressed in this message are NOT those of the US Govt. -

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

<Prev in Thread] Current Thread [Next in Thread>