#- Native

#cpuload "% cpu load (raw)"1 numerical MeanOverTime 100 % awk '/cpu / {printf"%d\n",$2+$3+$4}' /proc/stat

#- Collectl

cpuload "% cpu load (normalized)" 1 numerical Instantaneous 100 % COLLECTL (cputotals.user) + (cputotals.nice) + (cputotals.sys)

The command field must start with the string “COLLECTL” in capital letters. The line continues with a series of collectl variables included in parenthesis and connected with arithmetical operators. For this example, the cpuload metric reports the sum of cputotals.user, cputotals.nice, and cputotals.sys.

For a full list of available collectl variables, run the collectl command interactively, as follows:

#collectl –c 1 -s+C --export lexpr

The -c 1 option runs one shot only. The command output is the list of collectl variables and the current value:

waiting for 1 second sample...

sample.time 1217858718.002 cputotals.user 1 cputotals.nice 0 cputotals.sys 0 cputotals.wait 7 cputotals.irq 0 cputotals.soft 0 cputotals.steal 0 cputotals.idle 90 ctxint.ctx 239 ctxint.int 1073 ctxint.proc 4 ctxint.runq 152 disktotals.reads 0 disktotals.readkbs 0 disktotals.writes 11 disktotals.writekbs 80 nettotals.kbin 4 nettotals.pktin 49 nettotals.kbout 6 nettotals.pktout 17 cpuinfo.user.cpu0 0 cpuinfo.nice.cpu0 0 cpuinfo.sys.cpu0 0 cpuinfo.wait.cpu0 0 cpuinfo.irq.cpu0 0 cpuinfo.soft.cpu0 0 cpuinfo.steal.cpu0 0 cpuinfo.idle.cpu0 100 cpuinfo.intrpt.cpu0 0 cpuinfo.user.cpu1 0 cpuinfo.nice.cpu1 0 cpuinfo.sys.cpu1 0 cpuinfo.wait.cpu1 11 cpuinfo.irq.cpu1 0 cpuinfo.soft.cpu1 0 cpuinfo.steal.cpu1 0 cpuinfo.idle.cpu1 89 cpuinfo.intrpt.cpu1 0 cpuinfo.user.cpu2 4 cpuinfo.nice.cpu2 0 cpuinfo.sys.cpu2 2 cpuinfo.wait.cpu2 0

Create the monitoring lines by using these variables.

Native HP Insight CMU lines and collectl lines can be mixed in the

ActionAndAlertFile.txt file.

82 Monitoring a cluster with HP Insight CMU

Page 82
Image 82
HP Insight Cluster Management Utility manual # collectl -c 1 -s+C --export lexpr, ActionAndAlertFile.txt file