Njmon4AIXCommandLine

njmon for AIX Command Linux Syntax

$ njmon -?
njmon: help information. Version:31@17/07/2019

- Performance stats collector outputing JSON format. Default is stdout
- Core syntax:     njmon -s seconds -c count
- JSON style:      -M  or -S or -O
- File output:     -m directory -f
- Check & restart: -k
- Data options:    -P -L -V -v -u -U -? -d
- njmon collector output: -i host -p port -X secret

        -s seconds : seconds between snapshots of data (default 60 seconds)
        -c count   : number of snapshots then stop     (default forever)

        -S         : Older Single level output format   (section names form part of the value names)
        -M         : Multiple level output format (section & subsection names (default))
        -O         : Older Multiple level output format (like -M but identity before samples)

        -m directory : Program will cd to the directory before output
        -f         : Output to file (not stdout) to two files below
                   : Data:   hostname_<year><month><day>_<hour><minutes>.json
                   : Errors: hostname_<year><month><day>_<hour><minutes>.err

        -k         : Read /tmp/njmon.pid for a running njmon PID & if found running then this copy exits

        -P         : Also collect process stats         (these can be very large)
        -t percent : Process CPU cut-off threshold percent.   Default 0.001
        -L         : Don't collect Logical Volume stats (takes extra CPU cycles)
        -V         : Don't collect Volume Group   stats (takes extra CPU cycles)
                   : -L & -V requires root access. If not root these are silently switched off
        -v         : Note: VIOS options compiled out of binary
        -U -u      : Note: SSP options compiled out of binary
        -?         : Output this help message and stop
        -h         : Same as -?
        -d         : Switch on debugging
Push data to collector: add -h hostname -p port
        -i ip      : IP address or hostname of the njmon central collector
        -p port    : port number on collector host
        -X         : Set the remote collector secret or use shell NJMON_SECRET
        -x         : print the child PID (useful in scripts to cleanly kill njmon later)

Examples:
    1 Every 5 mins all day
        /home/nag/njmon -s 300 -c 288 -f -m /home/perf
    2 Piping to data handler using defaults -s60 forever
        /home/nag/njmon | myprog
    3 Add process stats and LV + VG data for an hout
        ./njmon -s60 -c 60 -PLV > njmon.json
    4 Collect daytime VIOS extra including SSP (if compiled in)
        ./njmon -s60 -c 720 -vuU > njmon_on_vios.json
    5 Crontab entry - 4 minutes after midnight save local data every 30 secons
        4 0 * * * /home/nag/njmon -s 30 -c 2880 -f -m /home/perf
    6 Crontab - hourly check/restart remote njmon, pipe stats back & insert into local DB
        0 * * * * /usr/bin/ssh nigel@server /usr/lbin/njmon -k -s 300 -c 288 | /lbin/injector
    7 Crontab - for pumping data to the central collector
        0 0 * * * /usr/local/bin/njmon -s 300 -c 288 -i myadminhost -p 8181 -X SECRET42


$