Site /
NimonManualPage
nimon(1) (nimon for AIX and VIOS) nimon(1)
NAME
nimon - Send performance statistics to a remote InfluxDB.
BRIEFLY
Performance statistics agent outputting Influx Line Protocol
format. Default is stdout to allow using a shell pipe to
other commands. The ninstall shell script puts nimon into
/usr/lbin.
Version
Version: 69
SYNOPSIS
Core options
nimon -s seconds -c count [-m directory -f]
Other options
-a file -b -c count -C -d -D -h -H -k -K pidfile -L -V
-n -o -P -t percent -r -R -u -U -v -w -? -@
nimon specific options
-i hostname -p portno -x database -y username -z
password
DESCRIPTION
These are the nimon command options in alphabetical order.
-a file
Place the command arguments into a config file. Read
the command line arguments from a file (so no passwords
are seen in the ps command output). Use the same
arguments, all on the first line, space separated.
Only have the -a option on the actual command line.
-b Process stats switch off adding pid to the process
names: "ksh_76927" becomes "ksh".
-c count
Number of snapshots then stop (default forever).
-C Shared CPU/Processor Pool, you need to enable
performance data collection on the HMC.
-d Switch on debugging output
-D Skip dangerous libperfstat function that can cause
problems
Page 1 (printed 11/2/20)
nimon(1) (nimon for AIX and VIOS) nimon(1)
-f file
Output to file (not stdout) to two files below:
Statistics: hostname_<year><month><day>_<hour><minutes>.influxlp
Note: lp = Line Protocol
Errors: hostname_<year><month><day>_<hour><minutes>.err
-h Output hints and help details and stop.
-H This option makes nimon send to InfluxDB the full
hostname (as the host tag) instead of the short
hostname. This is important if many servers have the
same short name in different domains. For example,
myserver.achme.com normally has host=myserver. With
the -H option the Fully Qualified Domain Name (FQDN) s
used host=myserver.achme.com.
-i ip
-i hostname
IP Address or Hostname of the InfluxDB server
-k If the file /tmp/nimon.pid is not found this nimon
continues running. If the file is found, the process
PID is read from it & if it is found that the process
is running then this nimon exits. If no process is
found running then this nimon continues running. This
allows you to try starting nimon say once an hour from
crontab. This will restart the nimon only if the
previous one stopped. nimon will remove the nimon.pid,
file when it stops normally.
-K pidfile
This is same as the -k option but the user decides the
directory and filename for the file containing the
Process Identity (PID). Also, you can run multiple
nimon processes, using different PID files. Some users
prefer to use a file in, for example, /var/logs but
that requires root access. Others prefer to avoid
/tmp.
-L Don't collect Logical Volume stats (takes extra CPU
cycles). If not the root user then these are silently
switched off.
-m directory
Program will change to the directory before creating
files.
-n No PID printed out at start up.
Page 2 (printed 11/2/20)
nimon(1) (nimon for AIX and VIOS) nimon(1)
-o If using Oracle ASM raw disks have zero size, so use
bootinfo -s to find the size.
-p 8086
InfluxDB port. Port 8086 is the default (unless changed
in the InfluxDB config file).
-P Switch on the collection of process statistics (Note:
these can be very large). Processes using less than
the threshold are ignored. See -t percent option.
-r Random pause at the start. Stops cron starting every
nimon in sync.
-R Reduced node, don't collect CPU core thread: logical
CPUs like cpu_logical, physical, syscall stats nor
netbuffers.
-s seconds
Seconds between snapshots of data (default 60 seconds).
-t percent
Process CPU cut-off threshold percent. Default 0.001
-v Only available if nimon compiled with VIOS support.
This adds VIOS virtual disk and networks statistics.
-u Only available if nimon compiled with VIOS support.
This adds VIOS Shared Storage Pools (SSP) statistics.
-U Only available if nimon compiled with VIOS support.
This adds VIOS Shared Storage Pools (SSP) statistics
for each node.
-V Don't collect Volume Group stats (takes extra CPU
cycles). If not the root user then these are silently
switched off.
-w Switch on telegraf output mode, which excludes the HTTP
POST string.
-x njmon
InfluxDB database name (created with influx command
then: create database njmon and exit). Note: nimon and
njmon can share the same database and normally called
njmon.
-y user
InfluxDB server username for authentication.
-z pass
InfluxDB server password for authentication.
Page 3 (printed 11/2/20)
nimon(1) (nimon for AIX and VIOS) nimon(1)
-? Same as the -h Help option.
-@ Output the full version information and stop. For
example: Version nimon4AIX-v69-@01/11/2020-AIX722
EXAMPLES
1 Simple use
Every minute (60 seconds), all day (1440 minutes),
InfluxDB server hostname, default InfluxDB port (8086),
database njmon.
1 Syntax
nimon -s 60 -c 1440 -i influxbox -p 8086 -x njmon
2 With user & password
Every 1 minute (-c 60) all day (1440 minuts in a day),
InfluxDB server hostname influxbox, default InfluxDB
port (-p 8086) and username /password.
2 Syntax
nimon -s 60 -c 1440 -i influxbox -p 8086 -x njmon -y
Nigel -z passwd
3 Add prosses and remove LVM data
Add process statistics (-P) and remove LV + VG data (-
LV).
3 Syntax
nimon -s60 -c 1440 -PLV -i influxbox -p 8086 -x njmon
4 Every half minute
Collect statistics twice a minute (-s 30) and all day
(2880 half minutes in a day).
4 Syntax
nimon -s30 -c 2880 -i influxbox -p 8086 -x njmon
5 Add VIOS statistics
Adding VIOS extra statistics for virtual resources and
including SSP - requires nimon version with VIOS
compiled in.
5 Syntax
nimon -s30 -c 2880 -vuU -i influxbox -p 8086 -x njmon
6 Crontab
Page 4 (printed 11/2/20)
nimon(1) (nimon for AIX and VIOS) nimon(1)
Crontab entry start at 4 minutes after midnight, save
data every 30 seconds for a day.
6 Syntax
4 0 * * * /usr/lbin/nimon -s30 -c 2880 -vuU -i
influxbox -p 8086 -x njmon 2>/dev/null
7 Crontab with kill option
Crontab entry starting hourly and checking if the
previous nimon is still running (if it is this nimon
stops itself). This uses a PID file called
/tmp/nimon.pid.
7 Syntax
0 * * * * /usr/lbin/nimon -s 60 -k -i influxbox -p 8086
-x njmon 2>/dev/null
8 Using a PID file
Naming a PID file so it is not in /tmp which might be
erased
8 Syntax
0 * * * * /usr/lbin/nimon -s 60 -K /home/nag/nimon.pid
-i influxbox -p 8086 -x njmon 2>/den/null
9 Saving to a local file
Save the nimon data to take a file (-f). This file can
not be loaded in to InfluxDB due to it not having time
and date stamp. The data and time are added by InfluxDB
as the data is loaded. The two files will end .err and
.influxlp (lp = Line Protocol).
9 Syntax
nimon -s 10 -c 3 -f
10 Saving to a file and a specific directory
nimon moves to the directory /tmp before creating any
files. Save the nimon data to take a file (-f). This
can not be loaded in to InfluxDB
10 Syntax
nimon -s 1 -c 3 -m /tmp -f
11 Prometheus, elastic (ELK) and Splunk support
Send data to telegraf and then onto Prometheus, elastic
(ELK) or Splunk. You will have to set up telegraf with
an InfluxDB input plugin and an output plugin of type
Page 5 (printed 11/2/20)
nimon(1) (nimon for AIX and VIOS) nimon(1)
Prometheus. Then point Prometheus at the telegraf
server to collect the data. Similar for elastic and
Splunk.
11 Syntax
nimon -s 15 -c 5760 -w -i telegraf_server -p 8888
12 Using a conf file
Using a configuration file to contain the nimon
arguments. This means the arguments are not seen in the
ps command output. Use the -a argument-file option.
12 Syntax
For example command line: /usr/lbin/nimon -a
/etc/njmon.conf
12 An example /etc/njmon.config file contains just the options:
-s 60 -c 1440 -i influxbox -p 8086 -x njmon
FILES
/usr/lbin/nimon
The executable command
SEE ALSO
njmon(1) njmon is like nimon but outputs JSON data.
Online nimon Manual website
See
http://nmon.sourceforge.net/pmwiki.php?n=Site.NimonManualPage
nimon Download Project website
From
http://nmon.sourceforge.net/pmwiki.php?n=Site.Njmon
AIXpert Blog Articles on nimon and njmon
https://ibm.biz/AIXpertBlog
perfstat Library website
This is the source of most of the statistics
documentation
https://www.ibm.com/support/knowledgecenter/ssw_aix_72/filesreference/libperfstat.h.html
AUTHOR
Nigel Griffiths nigelargriffiths@hotmail.com @mr_nmon
BUGS
None, of course. But just in case, please report issues to
the author by email.
