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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Searching for "LPAR is alive" after NIM Install

Status
Not open for further replies.
Jan 13, 2003
105
Hi all,

I am looking for an command to show me: LPAR is alive and running and started all daemons.

1) PING is not good enough, because I get a ping-answer through the NIM Installation from the NIM Server.

2) Must be a command with an return code, so ssh or telnet is no option, because they never come back.

Command is to cast from either the nim-Server or the hmc.
Is there a way to get the rmc-daemons involved?
Any ideas?

Thks

mad

Advanced Interactive eXecutable
 
Ok there are alot of ways to do that!

One way which i use at work is to write a script that will send you the lssrc -a and whatever commands you want to check up the LPAR health and then let this script send you an email now and then!

another way is to use that script in one of the lpars and then issue the ssh command (try ssh host cmd, the return code is ok if the command is ok otherwise it will be non-zero!)

Are you trying to automate this? What have you reached so far?

Regards,
Khalid
 
Hi khalidaaa!

Yes, you guesses right, I automate that and want to test in a loop, if the even installed lpar is now ready to work. So I would be lucky for a client-server call which returns a 0 or a 1 ;-)

mad

Advanced Interactive eXecutable
 
I think you can use this command from the HMC to know the state of the partitions

lssyscfg -r sys -m managedsysname -F name,state --header

Regards,
Khalid
 
If you want to check for a particular partition use this command:

lssyscfg -r lpar -m managedsysname -n partitionname -F state --header

and in case you want to automate this (i'm not sure if this can be down on the HMC, i've never tried to crontab on HMC and i don't have one to try for now!)

So my solution for you is to execute this from one of the lpars in the crontab like for example:

put this in a file:

Code:
ssh HMCName lssyscfg -r sys -m managedsysname -F name,state --header

Make this file executable and then put it in crontab

Code:
0 4 * * * /path_to_script/scriptname > LPARs_State.txt

Regards,
Khalid
 
Opps sorry, there is a mistake in the first command i provided

It should be:

Code:
lssyscfg -r lpar -m managedsysname -F name,state --header

Use this link in the script above.

If direct ssh didn't work then try this

Code:
ssh -l hscroot HMCNAME lssyscfg -r lpar -m managedsysname -F name,state --header

Regards,
Khalid
 
Hi Mad,

Could try using rpcinfo.

eg. rpcinfo -l NewHost 100000 4

This will query the portmapper on NewHost.

If the system cannot be contacted, or RPC services not yet started on "NewHost", the command will timeout with a non-zero return code (after about 3 and half mins).

Not sure what RPC services are up (or not) for the duration of a NIM install.

You will probably have to select a different Program and Version number. (ie. one that is not serviced during the install, but is once install has completed).

Dont know if it will help, but worth a try. :)


____________________
Sometimes it pays to stay in bed on Monday, rather than spending the rest of the week debuging Mondays code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top