Networker

[Networker] Getting last start time for a group?

2009-03-16 12:33:13
Subject: [Networker] Getting last start time for a group?
From: George Sinclair <George.Sinclair AT NOAA DOT GOV>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Mon, 16 Mar 2009 12:29:06 -0400
This is a simple question but maybe not an easy answer.

How can I obtain the time a given group last ran? I'd like to determine this to be used by a script that will run each day.

Obviously, there's a start time for the group, and that time is usually set in the NSR group resource, but it could change. In my case, the savegrp command will be launched from a cron job, so, yes, a specific time must be provided, but again, that could change, and I don't want to have to hard code it in my script. Moreover, the last time the cron job launched it, maybe it didn't run properly, maybe the client was down, or the network was down, or whatever, so I can't trust that the last time the group ran was, say, yesterday at that same time.

Looking at the savetime for the last save set using something like:

mminfo -s server -q 'group=groupname,savetime>one week ago' -ot -r savetime | tail -1

is only going to give me the savetime for the last save set, but not the time that the group started. I could, of course, walk back through those time and take the date of the first save set from that same day, but what if the group actually started the night before?

Is there a way I can query this?

Thanks.

George

--
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>