Using NIM to gather system information

Hi,

Need help if its possible to use NIM server to gather information. Basically, we need to gather firmware version and oslevel for environment wide servers (these servers are connected thru nim). I understand you can use NIM script resource to trigger the script but don't know if possible to get the informations and save in NIM server.

I created a script something like this:

!/usr/bin/ksh
prtconf | grep -i "Firmware Version" >> /tmp/aixinfo.txt
hostname >> /tmp/aixinfo.txt
oslevel -s >> /tmp/aixinfo.txt
oslevel -r >> /tmp/aixinfo.txt
chmod 755 /tmp/aixinfo.txt

I want to get all these informations and save in NIM server.

If the servers you are interested in are set up as NIM clients, then you can probably run these as remote shell commands:

#!/usr/bin/ksh
for client in host1 host2 host3 .... hostn
rsh $client prtconf | grep -i "Firmware Version" > /tmp/${client}_aixinfo.txt
rsh $client hostname >> /tmp/${client}_aixinfo.txt
rsh $client oslevel -s >> /tmp/${client}_aixinfo.txt
rsh $client oslevel -r >> /tmp/${client}_aixinfo.txt
chmod 755 /tmp/${client}_aixinfo.txt

The output is written to standard output so you will collect it on the NIM server, hence why I tweaked the output file to include the client. There is therefore no need for the chmod to be a remote command as the output is collected locally.

I also took out the append from the prtconf and set is as a create/overwrite so these files don't grow excessivly from multiple running.

I hope that this helps.

Robin
Blackburn/Liverpool
UK

What it is you need?
You want to gather some information from all of your AIX servers?
You currently have NIM installed and working?

If in fact NIM is properly configured, you should have a lot of the information you need already. For example, to see hostnames, use:

lsnode -i

Our clients have rsh disabled by default. Any other way I can trigger the script and temporarily mount a filesystem in the client so that the output will be redirected to that filesystem which is on NIM Server?