Site /
NimonLinuxManualPage
nimon(1) General Commands Manual nimon(1)
NAME
nimon - capture Linux Performance stats in InfluxDB Line Protocol format by default the output goes to stdout
SYNOPSIS
Output nimon version and stop: nimon -@ Output this help information and stop: nimon -h The nimon command line options are in the named file: nimon -a file Collect performance statistics to a file hostname_<datetime>.influxlp: nimon -s seconds -c count -f [-m dir] [-k | -K pidfile] [-P [-t percent]] [-b] [-d] [-n] [-r] [-R] [-F] [-v] [-W] Collect performance statistics for a central nimon.py service: nimon -s seconds -c count -i hostname -p port -x dbname -y user -z password [-m dir] [-k] [-P [-t percent]] [-b] [-d] [-n] [-r] [-R] [-F] [-v] [-W] Collect performance statistics for a central Telegraf server for Prometheus service: nimon -s seconds -c count -i hostname -p port -w [-m dir] [-k] [-P [-t percent]] [-b] [-d] [-n] [-r] [-R] [-F] [-v] [-W]
OPTIONS
-h OUtput help informtion and stop. -a file Command line arguments are in the file (usefu to hides passwords on the command line and ps command listings). Use the same arguments as you would on the commandline, all on the first line, space separated. Only have the -a option on the actual command line or it will get very confusing as options after the -a are ignored. -s seconds The number of seconds between snapshots of statistics (default 60 seconds). -c count The number of snapshots (default forever). -m directory The program will change to the directory before output or creating a file. -f Output the statistics to following files (instead of stdout), "lp" for line protocal: Data: hostname_<year><month><day>_<hour><minutes>.influxlp Error: hostname_<year><month><day>_<hour><minutes>.err Note: problems can occur if using this option and the -i option as the data can't go both to a file and to a socket. -ff or -f -f A second "f" option switches on writing the epoch nanosecond timestamp at the end of every measure in the .influxlp output file. This makes it possible to insert the data in to InfluxDB or use with other tools for other time-series databases, perhaps via telegraf. -i IP address or hostname The network IP address or hostname of the central InfluxDB database. -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 shortname 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. -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. If the /tmp/nimon.pid is found but can't be accessed, nimon will print a warning and stop. The file could be owned by a different user or no read permission. -K pidfile This is same as the -k option but the user decides the directory and filename for the file containing the Process ID(PID_. Plus 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. Alternative, if you need to use a different filename then set the shell environemnt NJI\u2010 MON_PID_FILE, before starting njmon. If the .pid file is found but can't be accessed, nimon will print a warning and stop. The file could be owned by a different user or no read permission. -P Add individual process stats. If the systems has hudored or more processes this option cat drastically increase nimon CPU time and drastically increase the number of stats. This has implications on database sizes. -t percent Set ignore process threshold for CPU percent (default 0.01%). This is used to not record statistics for processes not using CPU time i.e. not actually running. Linux, in particu\u2010 lar, can have 100's of such kernel processes. -b Switch off adding pid to the process names. For example: "ksh_76927" becomes "ksh". -d Switch on debug tracing (output will no longer be JSON or InfluxDB Line Protocol format). This is only useful for debugging the nimon code to isolate a problem. Used this with the -f option to save the debug output to the .err file. This can be useful to determine why some features are getting turned off like GPFS or socket to InfluxDB issues. -w Switch on output suitable for Telegraf and onto Prometheus. -W Switch off warning messages in error output stream. Use this once you are confident that the warnings are ignorable. This includes badly behaved file systems like mounted but with\u2010 out root access. -n No PID printed out at start up. -r Random start pause. This stops cron started nimon processes that are synchornised by a time protocol, all starting at exactly the same time and flooding the InfluxDB. -R Reduced stats - skip logical CPU stats for SMT threads. Useful, it you are paying for statistics disk space. -F Switch off filesystem stats (autofs and tmpfs can cause issues). -p port port number on InfluxDB or Telegraf server. New default setting of 8086. This is the default for InfluxDB, so only use -p, if using a different port number. -x dbname Name of the InfluxDB database (typically njmon or nimon). -y user InfluxDB user name for autorisation (if needed). -z password InfluxDB user password for autorisation (if needed). Notes on Spectrum Scale (GPFS) nimon automatically collects GPFS if /usr/lpp/mmfs/bin/mmksh and /usr/lpp/mmfs/bin/mmpmon are found on you systems. However, if GPFS is present but off it can get confused. Use: export NOGPFS=1 to set a shell variable before running nimon will disable GPFS stats. You can also compile out GPFS support with -D NOGPFS
EXAMPLES
Assuming nijmon is found at /usr/local/bin and in our $PATH 1 Collect stats every 3 seconds for 4 snapshots and place the data file in /home/perf. This is useful to find the measure and statistics names. The output file: will be <host\u2010 name>_<date>_<time>.influxlp Without the -m flag and directory, the file is created in the current working directory. nimon -s 3 -c 4 -f -m /home/perf 2 Run the nimon command capturing stats every 30 seconds for one day. where influxbox if the server hostname of the server running InfluxDB and 8086 is the port number (this is the default port), njimon is the InfluxDB atbase name and the login is user=Nigel and pass\u2010 word=passw0rd. The number of seconds in a day is 30 x 2880. nimon -s 30 -c 2880 -i influxbox -p 8086 -x njmon -y Nigel -z passw0rd 3 The same as example 2 but using the IP Address and adding process statistics (-P). nimon -s 30 -c 2880 -P -i 9.137.62.3 -p 8086 -x njmon -y Nigel -z passw0rd 4 The same as example 2 but checking it nimon is still running. If yes, quietly stop. nimon -k -c 2880 -i influxbox -p 8086 -x njmon -y Nigel -z passw0rd 5 Run nimon and send the data to Telegraf (-w and with port 9090) and then to Prometheus nimon -s 30 -c 2880 -w -i influxbox -p 9090 6 Crontab entry to run 1 day - start 1 minute after midnight, save local data every 60 sec\u2010 onds 1 0 * * * /usr/local/bin/nimon -s 60 -c 1440 -i influxbox -p 8086 -x nimon -y fred -z Bl0ggs 7 Crontab entry to hourly check/restart nimon (if nimon is not running = -k) 0 * * * * /usr/lbin/nimon -k -s 60 -i influxbox -p 8086 -x nimon -y jane -z d0e 8 Crontab entry to as above but output going to Telegraf (with port 9090) and then to Prometheus 0 * * * * /usr/lbin/nimon -w -k -s 60 -i influxbox -p 9090
VERSIONS
Version 70 - New support for Mainframe / IBM Z platform. Include -D MAINFRAME in the compile line of the Makefile. Tested only of RHEL, so far.
AUTHOR
Developer Nigel Griffiths (nigelargriffiths@hotmail.com)
COPYRIGHT
License GPLv3+: GNU GPL version 3
SEE ALSO
nimon Version:nimon4Linux-v71-@16/12/2020 nimon(1)