Relevance in AIX

(imported topic written by Franco78)

I need to write relevance for the info I get if I run the following command on AIX

lparstat -i

I need to retrieve the value of Active Memory Expansion and whether it is enabled or not.

(imported comment written by NoahSalzman)

Even though I work at IBM I generally try and keep AIX at arms length. :wink:

So, you are going to need to help us a little here. First, you are going to need to do this in two steps: create a Task that writes out the results of the file to disk and then read those results with an Analysis.

The task can just be a shell one-liner like
lparstat -i > /tmp/lparstat_output.txt

The analysis will be relevance that looks something like:
following texts “foo” of lines of file “/tmp/lparstat_output.txt” whose (it contains “Active_Memory”)

To help us you will need to post the results of lparstat_output.txt or at least the portion of that file you are interested in.

(imported comment written by Franco78)

I was afraid you would respond with this answer and figured that was the approach i would have to take to get the information. I too keep AIX at arms length.

With the information you provided, I think I will be able to get what i’m looking for. I’ll post my findings tomorrow.

Thank you!

(imported comment written by Tim.Rice)

DISCLAIMER : I know NOTHING about AIX and only a little about Linux. I deal mostly with Windows and Mac OS’s.

you are not going to be able to get what you need with Relevance alone. “lparstat” is an OS command and Relevance cannot execute commands by design.

what you need to do is create a Task to execute the command capturing the output and parsing it for your desired information.

Under Windows (and usually Macs because I’m too lazy to learn all the syntax for sed and grep) I will usually redirect any output to a text file, then pick it apart with a relevance query, storing the data in a “Setting” on the client. I then retrieve the Value of the Setting, if it exists, in a Retrieved Property.

Since I don’t know what the output from lparstat looks like, I don’t know how complex the relevance to extract what you need will be, but that’s the basic method you’ll need to use to get it.

i do similar things to determine the FileVault 2 status on our Macs. If you want to see the code, search for FileVault 2 over at http://BigFix.me and download the Task I uploaded there. For the FileVault status check, I schedule the Task to run every 6 hours, and the matching Retrieved Property a bit more frequently (I don’t remember how often).

(imported comment written by jsaxton)

lparstat -i on my 5.3 box displays:

qaaix53-1:/opt/BESClient/bin lparstat -i

Node Name : qaaix53-1

Partition Name : -

Partition Number : -

Type : Dedicated

Mode : Capped

Entitled Capacity : 1.00

Partition Group-ID : -

Shared Pool ID : -

Online Virtual CPUs : 1

Maximum Virtual CPUs : 1

Minimum Virtual CPUs : 1

Online Memory : 1024 MB

Maximum Memory : 1024 MB

Minimum Memory : 128 MB

Variable Capacity Weight : -

Minimum Capacity : 1.00

Maximum Capacity : 1.00

Capacity Increment : 1.00

Maximum Dispatch Latency : -

Maximum Physical CPUs in system : 1

Active Physical CPUs in system : 1

Active CPUs in Pool : -

Unallocated Capacity : -

Physical CPU Percentage : 100.00%

Unallocated Weight : -

you can write a task and parse the output but some of this information can be queried using the relevance language. Can you be more specific which settings you are interested in? I don’t think we can currently get many of the settings but I’m sure we can get

Active Physical CPUs in system