NimonMeasureAndStats

The nimon_list_stats ksh shell script documents the Measures and Statistics within them for a particular njmon/nimon capture.

Note: Here we use nimon data output to create the measures and stats details but the Measures and Statistics from njmon are EXACTLY the same.


nimon_list_stats ksh script
Link to the ksh script version of the below text: https:/docs/nimon_list_stats


# nimon_list_stats
# 1 parameter = the nimon -f output file in InfluxDB Line protocol format
# Suggest nimon -s1 -c1 -f
# nimon_list_stats hostname_datetime.influxlp

file=$1

echo File: $file
echo
echo Tags '- Used to graph a specific host, group by OS or model type etc.'
cat $file | head -1 | awk '{ print $1 }' | sed 's/identity,//' | tr ',' '\n' |  awk '{printf("    %s\n", $1 ) }'

TAGS=$(cat $file | head -1 | sed 's/,/ /' | awk '{ print $2 }')

TMPFILE=/tmp/$0-$$
cat $file | sed 's/'$TAGS'//' | sed 's/   $//' >$TMPFILE

echo
echo 'MEASURES - Trailing "i" means only an integer allowed, otherwise a "string" or floating point number'
echo
for i in $( cat $TMPFILE | awk '{ print $1 }' | sort | uniq )
do
        echo Measure: $(echo $i | tr , ' ' )
        grep ^$i $TMPFILE | tail -1 | \
                sed 's/, / /g' | sed 's/@/+/g' | sed 's/IBM,/IBM/g' | sed 's/ /@/' | \
                awk -F@ '{ print $2 }'  |  tr ' ' '!' |tr ',' '\n' |  \
                awk '{printf("    %s\n", $1 ) }' | tr '!' ' '
done
rm $TMPFILE

Using the script nimon_list_stats by Example

Run:

  • nimon -s 1 -c 1 -f

Or run

  • njmon -I -s 1 -c 1 -f (that is a capital -I which switches njmon into nimon mode).

Assuming this created a file in the local directory: blue_20230802_0900.influxdb

Then use: nimon_list_stats blue_20230802_0900.influxdb >nimon_list_stats.txt


Sample Output Files of nimon_list_stats

Small server example files:


AIX example but cut down to save space

From my small AIX virtual machine = 4 CPUs, two disks, 1 network, with processes - there was 1900 stats but edited down.
Output includes the nimon output file name.

File: bluelite_20230802_0959.influxlp

Tags - Used to graph a specific host, group by OS or model type etc.
    host=bluelite
    os=AIX
    architecture=POWER10
    serial_no=782C6E1
    mtm=IBM-9105-42A

MEASURES - Trailing "i" means only an integer allowed, otherwise a "string" or floating point number

Measure: config
    partitionname="bluelite"
    nodename="bluelite"
    processorFamily="POWER10"
    processorModel="IBM9105-42A"
    machineID="782XXXX"
    processorMHz=3100.000
    pcpu_max=32i
    pcpu_online=32i
    OSname="AIX"
    OSversion="7.3"
    OSbuild="Nov 21 2021 08:05:02 2146C_730"
    lcpus=24i
    smtthreads=8i
    drives=2i
    nw_adapter=2i
    cpucap_min=10i
    cpucap_max=300i
    cpucap_desired=0i
. . .

Measure: cpu_details
    cpus_active=24i
    cpus_configured=24i
    mhz=3100.000
    cpus_description="PowerPC_POWER10"
. . .
Measure: cpu_logical_total
    user=0.288
    sys=0.288
    wait=0.461
    idle=98.963
. . . 
Measure: cpu_util
    user_pct=4.658
    kern_pct=3.601
    idle_pct=91.386
    wait_pct=0.355
    physical_busy=0.017
    physical_consumed=0.063
    idle_donated_pct=0.000
    busy_donated_pct=0.000
    idle_stolen_pct=0.000
    busy_stolen_pct=0.000
    entitlement=0.200
    entitlement_pct=31.366
    freq_pct=129.456
    nominal_mhz=3100.000
    current_mhz=4013.141
. . . 
Measure: disk_total
    disks=2i
    size=130816i
    free=256i
    xrate_read=5.895
    xfers=5.895
    read_blks=53.057
    write_blks=0.000
    time=5.158
    rserv=8.521
    wserv=0.000
    rtimeout=0.000
    wtimeout=0.000
    rfailed=0.000
    wfailed=0.000
    wq_time=0.003
    wq_depth=0i
. . .
Measure: memory
    virt_total=4325376i
    real_total=4194304i
    real_free=3461508i
    real_pinned=594244i
    real_inuse=732796i
    pgbad=0.000
    pgexct=3669.028
    pgins=11.054
    pgouts=0.000
    pgspins=0.000
    pgspouts=0.000
    scans=0.000
    cycles=0.000
    pgsteals=0.000
    numperm=86974i
    pgsp_total=131072i
. . . 
Measure: rperf
    mtm="IBM-9105-42A"
    nominal_mhz=3100.000
    cpu_vp=3.000
    cpu_entitled=0.200
    cpu_consumed=0.063
Measure: server
    aix_version=7.300
    aix_technology_level=0i
    aix_service_pack=1i
    aix_build_year=2021i
    aix_build_week=48i
    serial_no="782C6E1"
    lpar_number_name="30 bluelite"
    machine_type="IBM-9105-42A"
    uname_node="bluelite"
    errpt_errors=31i
    autorestart=1i
    systemid="06782XXXX"
    fwversion="FW1020.00(ML1020_059)"
    XIVE=1i
    partition_uuid="2d14e5ff-70f3-40fe-9ec5-c672e7a7f5fc"
Measure: timestamp
    datetime="2023-01-03T09:59:10"
    UTC="2023-01-03T09:59:10"
    snapshot_seconds=1i
    snapshot_maxloops=1i
    snapshot_loop=0i
    sleeping=1.000
    execute_time=0.000
    sleep_overrun=0.000
    elapsed=1.357
    Xint=125i
    Xfrac=64i
Measure: uptime
    days=32i
    hours=12i
    minutes=32i
    users=9i