Networker

Re: [Networker] Determining groups a client belongs to?

2004-11-16 17:09:34
Subject: Re: [Networker] Determining groups a client belongs to?
From: George Sinclair <George.Sinclair AT NOAA DOT GOV>
To: NETWORKER AT LISTMAIL.TEMPLE DOT EDU
Date: Tue, 16 Nov 2004 17:11:57 -0500
Well, you're right, of course ... there's really no reason I can't use
nsradmin, it's just that it would be nice if I didn't have to launch
some other utility like nsradmin which then requires input and then have
to parse through the output. I mean, it would be better if I could just
run a command with arguments and get a list of the groups, one per line,
since this would not involve any extra parsing, or rather it would be
cleaner, but it's not really a big deal. I just wanted to keep the
coding as simple as possible. And, yes, some of the clients do list
'All', and I want to create a list of all the savesets for the client,
so it will be necessary to query the client, but this is why I'll need
to know the groups since savefs doesn't seem to list everything but
savegrp does. I would like the groups to be active ones.

So, I'm thinking my script could run something like:

nsradmin> . type: NSR group
nsradmin> print

to get a listing of all the groups and then have the script parse out
only those with autostart enabled, and these would constitute the active
groups, and then when I run:

nsradmin> show group
nsradmin> print name:clientname

I can parse out only the active ones since now I know which ones are
active from before and then I can run:

savegrp -p -c client group

for each active group to get a list of all the expected savesets for the
client.

George

Darren Dunham wrote:
>
> >
> > Is there a command or other slick method to get a list of the groups a
> > client belongs to other than using nsradmin like:
> >
> > nsadmin> . type: NSR client; name: clientname
> > nsradmin> print
>
> Can I ask why you don't like that method?  What are you looking for in
> an alternative that the above method doesn't do?
>
> > I'm trying to build a list of expected savesets for each client, and
> > some of my clients have multiple NSR client resources, each belonging to
> > a different group.
>
> Hmm.  Okay.  Maybe you don't really want all the groups, but you want
> all the savesets?
>
> Unfortunately, if any of the instances use 'all', then you'll have to
> ask the client exactly which savesets it would send.  That complicates
> things.  Otherwise...
>
> nsradmin> show save set
> nsradmin> print type:nsr client; name: myclient
>
> > I've noticed that using something like 'savegrp -p -c
> > client group' does work, but would need to be run for each group the
> > client belongs to in order to get a list of all the expected savesets.
>
> Yes.  But you could get all the groups from the nsradmin above.  Also,
> you may not want every group, but every active group?
>
> > How can I determine the group other than nsradmin or simply having a
> > hard coded text file containing this information?
>
> Again, I wonder what form you want the possible groups to be in.
>
> --
> Darren Dunham                                           ddunham AT taos DOT 
> com
> Senior Technical Consultant         TAOS            http://www.taos.com/
> Got some Dr Pepper?                           San Francisco, CA bay area
>          < This line left intentionally blank to confuse you. >
>
> --
> Note: To sign off this list, send a "signoff networker" command via email
> to listserv AT listmail.temple DOT edu or visit the list's Web site at
> http://listmail.temple.edu/archives/networker.html where you can
> also view and post messages to the list. Questions regarding this list
> should be sent to stan AT temple DOT edu
> =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=

--
Note: To sign off this list, send a "signoff networker" command via email
to listserv AT listmail.temple DOT edu or visit the list's Web site at
http://listmail.temple.edu/archives/networker.html where you can
also view and post messages to the list. Questions regarding this list
should be sent to stan AT temple DOT edu
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=