It’s possible to collect PowerVP system level agent data from the AIX command line.

 

You can collect this data by running Java and specifying the powervp.jar file, as shown below. You need to specify the hostname, username and password for the host where the system level agent resides. In the following example the hostname/IP address is 10.1.1.99 and the username/password is root and mypass1. I found the PowerVP JAR file in the default PowerVP install directory, which (on AIX) is usually /IBM/PowerVP/PowerVP_GUI_Installation/PowerVP/.

 

[root@gibbo][PowerVP]/ # ls -ltr | grep -i vp

lrwxrwxrwx    1 root     system           88 Feb 17 2014  PowerVPInvestigationGuide.pdf -> /IBM/PowerVP/PowerVP_Installation/PowerVP_GUI_Installation/PowerVPInvestigationGuide.pdf

lrwxrwxrwx    1 root     system           94 Feb 17 2014  PowerVPInstallationandUserGuide.pdf -> /IBM/PowerVP/PowerVP_Installation/PowerVP_GUI_Installation/PowerVPInstallationandUserGuide.pdf

-rwxr-xr-x    1 root     system         4148 Feb 17 2014  PowerVP_Install_02_17_2014_15_41_33.log

-rwxr-xr-x    1 root     system         3255 Apr 17 2014  PowerVP_Install_04_17_2014_14_32_02.log

-rwxr-xr-x    1 root     system         3255 Apr 17 2014  PowerVP_Install_04_17_2014_16_34_11.log

lrwxrwxrwx    1 root     system           51 Jul  2 11:44 Uninstall_PowerVP -> /IBM/PowerVP/PowerVP_Installation/Uninstall_PowerVP

lrwxrwxrwx    1 root     system           66 Jul  2 11:44 PowerVP -> /IBM/PowerVP/PowerVP_Installation/PowerVP_GUI_Installation/PowerVP

 

[root@gibbo][PowerVP]/IBM/PowerVP/PowerVP_Installation/PowerVP_GUI_Installation # java -jar ./powervp.jar -monitor -host 10.1.1.99 -username root -password mypass1

 

This will connect you to the PowerVP system level agent on the specified host. It will continue to run and collect data until you enter ‘exit’ at the prompt.

 

PowerVP CLI v1.1.2

Latest supported Syslet version: 46

Using hostname: 10.1.1.99

Using username: root

Using supplied password

mrikey227 (10/28/14 2:47:51 PM) Config.getProductDirectory (616) : Product directory: /IBM/PowerVP

mrikey227 (10/28/14 2:47:51 PM) Config.getProductDirectory (616) : Product directory: /IBM/PowerVP

mrikey227 (10/28/14 2:47:51 PM) Config.getProductDirectory (616) : Product directory: /IBM/PowerVP

mrikey227 (10/28/14 2:47:51 PM) Config.getProductDirectory (616) : Product directory: /IBM/PowerVP

mrikey227 (10/28/14 2:47:51 PM) Config.<init> (206) : Reading powervp.properties

mrikey227 (10/28/14 2:47:51 PM) Config.getProductDirectory (616) : Product directory: /IBM/PowerVP

mrikey226 (10/28/14 2:47:51 PM) DebugOutputter.enableDefaultDebug (105) : Using default debug level

mrikey227 (10/28/14 2:47:51 PM) Config.<init> (278) : Locale loaded

mrikey227 (10/28/14 2:47:51 PM) Config.<init> (287) : Locale = en_US

mrikey227 (10/28/14 2:47:51 PM) Config.<init> (288) : isLeftToRight()=true

mrikey227 (10/28/14 2:47:51 PM) Config.setUIFont (1148) : Font left to defaults

mrikey227 (10/28/14 2:47:51 PM) Config.<init> (298) : CPU colors loaded

mrikey227 (10/28/14 2:47:51 PM) Config.<init> (310) : CPU font color loaded

mrikey227 (10/28/14 2:47:51 PM) Config.<init> (323) : AB Bus colors loaded

mrikey227 (10/28/14 2:47:51 PM) Config.<init> (335) : AB Bus font color loaded

mrikey227 (10/28/14 2:47:51 PM) Config.<init> (347) : WXYZ Bus colors loaded

mrikey227 (10/28/14 2:47:51 PM) Config.<init> (359) : WXYZ Bus font color loaded

mrikey227 (10/28/14 2:47:51 PM) Config.<init> (371) : GX Bus colors loaded

mrikey227 (10/28/14 2:47:51 PM) Config.<init> (383) : GX Bus font color loaded

mrikey227 (10/28/14 2:47:51 PM) Config.<init> (395) : MC Bus colors loaded

mrikey227 (10/28/14 2:47:51 PM) Config.<init> (407) : MC Bus font color loaded

mrikey227 (10/28/14 2:47:51 PM) Config.<init> (419) : Using Max PURR for CPU Util

mrikey227 (10/28/14 2:47:51 PM) Config.<init> (426) : Using all hardcoded for LSU Latency

mrikey227 (10/28/14 2:47:51 PM) Config.<init> (435) : Memory log size: 4196304

Connecting to 10.1.1.99........

Connecting.....

mrikey226 (10/28/14 2:47:51 PM) DebugOutputter.println (67) : Attempting a secure connection...

mrikey227 (10/28/14 2:47:51 PM) Config.getProductDirectory (616) : Product directory: /IBM/PowerVP

mrikey226 (10/28/14 2:47:52 PM) DebugOutputter.println (67) : Could not establish a secure connection with 10.1.1.99

Connection refused

mrikey226 (10/28/14 2:47:52 PM) DebugOutputter.println (67) : Attempting a non-secure connection...

mrikey226 (10/28/14 2:47:52 PM) DebugOutputter.println (67) : Connection established

mrikey226 (10/28/14 2:47:52 PM) DebugOutputter.println (67) : Output established

mrikey226 (10/28/14 2:47:52 PM) DebugOutputter.println (67) : Input stream established

Connection successful.  Logging syslet data.

Type 'exit' to quit:

 

Please note: during my testing I found that the corresponding PowerVP data log file showed a size of zero until I exited from the running  session (as shown below).

 

[root@gibbo][PowerVP]/IBM/PowerVP/Logs/10.1.1.99 # ls -ltr

total 18904

-rw-r--r--    1 root     system       165028 Apr 22 2014  2014_04_22_15_40_48.prt

-rw-r--r--    1 root     system      2823088 Apr 22 2014  2014_04_22_15_40_10.slt

-rw-r--r--    1 root     system      2921488 Apr 22 2014  2014_04_22_15_43_23.slt

-rw-r--r--    1 root     system       592912 Apr 22 2014  2014_04_22_15_49_13.slt

-rw-r--r--    1 root     system      3163244 Apr 22 2014  2014_04_22_16_06_45.slt

-rw-r--r--    1 root     system            0 Oct 28 14:47 2014_10_28_14_47_51.slt

 

Type 'exit' to quit: exit

mrikey226 (10/28/14 2:53:03 PM) DebugOutputter.println (67) : Disconnected

Disconnected from 10.1.1.99.  Exiting....

[root@gibbo][PowerVP]/IBM/PowerVP/PowerVP_Installation/PowerVP_GUI_Installation #

 

[root@gibbo][PowerVP]/IBM/PowerVP/Logs/10.1.1.99 # ls -ltr

total 23392

-rw-r--r--    1 root     system       165028 Apr 22 2014  2014_04_22_15_40_48.prt

-rw-r--r--    1 root     system      2823088 Apr 22 2014  2014_04_22_15_40_10.slt

-rw-r--r--    1 root     system      2921488 Apr 22 2014  2014_04_22_15_43_23.slt

-rw-r--r--    1 root     system       592912 Apr 22 2014  2014_04_22_15_49_13.slt

-rw-r--r--    1 root     system      3163244 Apr 22 2014  2014_04_22_16_06_45.slt

-rw-r--r--    1 root     system      2294860 Oct 28 14:53 2014_10_28_14_47_51.slt

 

 

This got me thinking. Perhaps I could write a small script to wrap all this up and then schedule it from cron to collect data on a regular basis?

 

I wrote the beginnings of a basic expect script (shown below) which would allow me to run the script for a specified amount of time (in seconds) and pass the hostname, username and password from the AIX command line. I guess this would work fine from Linux as well?

 

[root@gibbo][PowerVP]/IBM/PowerVP/PowerVP_Installation/PowerVP_GUI_Installation # cat cg_powervp

#!/usr/bin/expect

 

set hostname [lindex $argv 0]

set username [lindex $argv 1]

set password [lindex $argv 2]

set duration [lindex $argv 3]

 

spawn cd  /IBM/PowerVP/PowerVP_Installation/PowerVP_GUI_Installation/

spawn /usr/java6/jre/bin/java -jar /IBM/PowerVP/PowerVP_Installation/PowerVP_GUI_Installation/powervp.jar -monitor -host $hostname -username $username -password $password

 

expect "Type 'exit' to quit:"

 

sleep $duration

 

send "exit\r"

 

close

 

 

--

 

[root@gibbo][PowerVP]/IBM/PowerVP/PowerVP_Installation/PowerVP_GUI_Installation # ./cg_powervp 10.1.1.99 root mypass1 5

spawn cd /IBM/PowerVP/PowerVP_Installation/PowerVP_GUI_Installation/

spawn /usr/java6/jre/bin/java -jar /IBM/PowerVP/PowerVP_Installation/PowerVP_GUI_Installation/powervp.jar -monitor -host 10.1.1.99 -username root -password mypass1

 

PowerVP CLI v1.1.2

Latest supported Syslet version: 46

Using hostname: 10.1.1.99

Using username: root

Using supplied password

mrikey227 (10/29/14 8:41:10 PM) Config.getProductDirectory (616) : Product directory: /IBM/PowerVP

mrikey227 (10/29/14 8:41:10 PM) Config.getProductDirectory (616) : Product directory: /IBM/PowerVP

mrikey227 (10/29/14 8:41:10 PM) Config.getProductDirectory (616) : Product directory: /IBM/PowerVP

mrikey227 (10/29/14 8:41:10 PM) Config.getProductDirectory (616) : Product directory: /IBM/PowerVP

mrikey227 (10/29/14 8:41:10 PM) Config.<init> (206) : Reading powervp.properties

mrikey227 (10/29/14 8:41:10 PM) Config.getProductDirectory (616) : Product directory: /IBM/PowerVP

mrikey226 (10/29/14 8:41:10 PM) DebugOutputter.enableDefaultDebug (105) : Using default debug level

mrikey227 (10/29/14 8:41:10 PM) Config.<init> (278) : Locale loaded

mrikey227 (10/29/14 8:41:10 PM) Config.<init> (287) : Locale = en_US

mrikey227 (10/29/14 8:41:10 PM) Config.<init> (288) : isLeftToRight()=true

mrikey227 (10/29/14 8:41:10 PM) Config.setUIFont (1148) : Font left to defaults

mrikey227 (10/29/14 8:41:10 PM) Config.<init> (298) : CPU colors loaded

mrikey227 (10/29/14 8:41:10 PM) Config.<init> (310) : CPU font color loaded

mrikey227 (10/29/14 8:41:10 PM) Config.<init> (323) : AB Bus colors loaded

mrikey227 (10/29/14 8:41:10 PM) Config.<init> (335) : AB Bus font color loaded

mrikey227 (10/29/14 8:41:10 PM) Config.<init> (347) : WXYZ Bus colors loaded

mrikey227 (10/29/14 8:41:10 PM) Config.<init> (359) : WXYZ Bus font color loaded

mrikey227 (10/29/14 8:41:10 PM) Config.<init> (371) : GX Bus colors loaded

mrikey227 (10/29/14 8:41:10 PM) Config.<init> (383) : GX Bus font color loaded

mrikey227 (10/29/14 8:41:10 PM) Config.<init> (395) : MC Bus colors loaded

mrikey227 (10/29/14 8:41:10 PM) Config.<init> (407) : MC Bus font color loaded

mrikey227 (10/29/14 8:41:10 PM) Config.<init> (419) : Using Max PURR for CPU Util

mrikey227 (10/29/14 8:41:10 PM) Config.<init> (426) : Using all hardcoded for LSU Latency

mrikey227 (10/29/14 8:41:10 PM) Config.<init> (435) : Memory log size: 4196304

Connecting to 10.1.1.99........

Connecting.....

mrikey226 (10/29/14 8:41:10 PM) DebugOutputter.println (67) : Attempting a secure connection...

mrikey227 (10/29/14 8:41:11 PM) Config.getProductDirectory (616) : Product directory: /IBM/PowerVP

mrikey226 (10/29/14 8:41:11 PM) DebugOutputter.println (67) : Could not establish a secure connection with 10.1.1.99

Connection refused

mrikey226 (10/29/14 8:41:11 PM) DebugOutputter.println (67) : Attempting a non-secure connection...

mrikey226 (10/29/14 8:41:11 PM) DebugOutputter.println (67) : Connection established

mrikey226 (10/29/14 8:41:11 PM) DebugOutputter.println (67) : Output established

mrikey226 (10/29/14 8:41:11 PM) DebugOutputter.println (67) : Input stream established

Connection successful.  Logging syslet data.

Type 'exit' to quit: [root@gibbo][PowerVP]/IBM/PowerVP/PowerVP_Installation/PowerVP_GUI_Installation #

 

Scheduling this script to run from roots crontab every hour was simple:

 

[root@gibbo][PowerVP]/ # crontab -l | grep powervp

0 * * * * /IBM/PowerVP/PowerVP_Installation/PowerVP_GUI_Installation/cg_powervp 10.1.1.99 root mypass1 600 > /var/log/cg_powervp.log 2>&1      #Collect PowerVP System Level Data

 

Once the data was collected, I was then able to transfer (ftp) the data to my laptop and load it into the PowerVP GUI and play back the recorded data.

 

[root@gibbo][PowerVP]/IBM/PowerVP/Logs/10.1.1.99 # ls -ltr

total 37848

-rw-r--r--    1 root     system       165028 Apr 22 2014  2014_04_22_15_40_48.prt

-rw-r--r--    1 root     system      2823088 Apr 22 2014  2014_04_22_15_40_10.slt

-rw-r--r--    1 root     system      2921488 Apr 22 2014  2014_04_22_15_43_23.slt

-rw-r--r--    1 root     system       592912 Apr 22 2014  2014_04_22_15_49_13.slt

-rw-r--r--    1 root     system      3163244 Apr 22 2014  2014_04_22_16_06_45.slt

-rw-r--r--    1 root     system      2294860 Oct 28 14:53 2014_10_28_14_47_51.slt

-rw-r--r--    1 root     system        80328 Oct 29 10:29 2014_10_29_10_29_02.slt

-rw-r--r--    1 root     system        29788 Oct 29 10:31 2014_10_29_10_31_33.slt

-rw-r--r--    1 root     system        51448 Oct 29 10:36 2014_10_29_10_36_07.slt

-rw-r--r--    1 root     system       450468 Oct 29 10:37 2014_10_29_10_36_29.slt

-rw-r--r--    1 root     system       450468 Oct 29 10:39 2014_10_29_10_38_16.slt

-rw-r--r--    1 root     system            0 Oct 29 10:42 2014_10_29_10_42_57.slt

-rw-r--r--    1 root     system       450468 Oct 29 10:46 2014_10_29_10_45_32.slt

-rw-r--r--    1 root     system            0 Oct 29 19:02 2014_10_29_19_02_37.slt

-rw-r--r--    1 root     system       450468 Oct 29 19:03 2014_10_29_19_02_54.slt

-rw-r--r--    1 root     system        51448 Oct 29 20:01 2014_10_29_20_01_24.slt

-rw-r--r--    1 root     system       450468 Oct 29 20:02 2014_10_29_20_01_45.slt

-rw-r--r--    1 root     system            0 Oct 29 20:31 2014_10_29_20_31_26.slt

-rw-r--r--    1 root     system            0 Oct 29 20:32 2014_10_29_20_32_54.slt

-rw-r--r--    1 root     system            0 Oct 29 20:38 2014_10_29_20_38_08.slt

-rw-r--r--    1 root     system       450468 Oct 29 20:40 2014_10_29_20_39_01.slt

-rw-r--r--    1 root     system        51448 Oct 29 20:41 2014_10_29_20_41_10.slt

-rw-r--r--    1 root     system      4422368 Oct 29 21:10 2014_10_29_21_00_01.slt

 

image

 

image

 

Note: Currently only system level data can be recorded using the command line option. Partition level agent recording can only be done using the client GUI.