Networker

Re: [Networker] Getting last start time for a group?

2009-03-16 18:23:26
Subject: Re: [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 18:11:06 -0400
Davina Treiber wrote:
George Sinclair wrote:
This is a simple question but maybe not an easy answer.

No, it is a very 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

It's not in the media database, but it is in the resource database, thus
can be queried using nsradmin.

echo "     show last start
        print type:     NSR group;
        name:           yourgroupname" | nsradmin -i -

Well, that's slick and does indeed offer the information I asked, but I didn't explain what I'm really trying to do, so that was my mistake.
I'll create a sbmit a new post.

Thanks!

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>