– Bart's blog

IBM i and PowerVM features and tools

Tool – query LPAR status

Once in a time, a system administrator does a task which requires shut down of a LPAR. If a partition is about to switch off after some other task (for instance after a weekly backup) watching SRC codes, might be hopeless action.

Let me show a simple tool which does this ‘monkey job’.

I built a simple program which run on a different Lpar, and retrieve status of a LPAR from a HMC. When a partition become inactive, the program trigger a message to QSYSOPR, and perform any other action (for instance send a text message if possible).

This solution brings multiple benefits for a system administrator

  • save time of a skilled personnel
  • no monkey job
  • it reacts automatically when a LPAR is off
  • the tool can be used for other automation tasks

What do you need to run it?

  • ssh keys with IBM i and a HMC which talks to the monitored LPAR
  • some software which will notify a system administrator once a triggered messaged appears in QSYSOPR

How does it really work?

  1. the program query a HMC for status of monitoring LPAR by command lssyscfg in 60 seconds loops.
  2. if status is other than ‘Running’ it sends a message to QSYSOPR and ends the program.

Here is a simplified flowchart



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: