Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is there a way to query the legato clients db ?

Status
Not open for further replies.

un1xh3ad

Programmer
May 21, 2002
15
FR
I need a to generate :

1. a list of recenetly added clients
2. a list of windows clients

Our client list is 2-3000 clients , so i need to find a good way to list them....

Cheers !

Neil
 
Assuming you have client OS type showing:
nsradmin
show name; "client OS type";

print type: NSR client;

This will show OS and name.
 
U can generate a list of all clients with the nsradmin command
Then find the necassary Information by using another script. (e.g. VB or Basic)

(WIN NT)

1. Generate a list wich contains the commands for the nsradmin.

----- input. txt --------
print type:nsr client
-------------------------

2. use the commandline to Pipe the Output

nsradmin -s "Server" input.txt >> Output.txt

3. Now generate a Script to sort the Outputfile.

SUB MAIN
OPEN Output.txt FOR INPUT AS #1

DO WHILE NOT EOF(1)
LINE INPUT #2, rec$
IF INSTR(rec$,"name:") then
eol=INSTR(rec$,";") - 31
clientname=MINDrec$,31,eol)
END IF

IF INSTR(rec$,"client OS type:" THEN
eol=INSTR(rec$,";") - 31
filename=MID(rec$,31,eol) & ".txt"
END IF

OPEN filename FOR APPEND as #2
PRINT #2, clientname
CLOSE #2
LOOP
Close #1

END SUB

this script works i think :)
no copyright :)







 
sorry one mistake at point 2.

The command for the commandline should be:

nsradmin -s "server" -i input.txt
 
Don't forget to add the <hard return> at the end of the input.txt file!. Carter Fowler
Hardware Service Technician
The City Of London
cfowler@city.london.on.ca
 
Don't forget to add the <hard return> at the end of the input.txt file! Carter Fowler
Hardware Service Technician
The City Of London
cfowler@city.london.on.ca
 
Well you could do a specific search in the nsradmin. Either by client name, or by OS. This would look like that:

nsradmin
. type: nsr client; client OS type: Windows NT Server on Intel
print

If you don't know all the attributes change to visual and select the hidden and dynamic attributes - then all attributes are shown. Then you could narrow down the output before issuing the print command with:

show name; client os type; whatever else

This would give you a list of all clients with Windows NT and showing only the attributes specified.

Hope that helps

Johanes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top