Deploy nmon

To install nmon and the Axibase sender script on multiple Linux machines use the script to automate the below tasks:

  • Connect to the remote machine over SSH
  • Copy the nmon binary file
  • Copy the ATSD sender script
  • Add a cron task to restart the nmon data collection on a schedule

Download and sender script from the nmon repository: accepts the following arguments:

Argument Description
-c Set path to the file, that contains settings required by the script.
-n Does not modify cron. Updates only nmon binary file and ATSD sender script.
Use it to update nmon or sender script to a new version.
-d Comments out all nmon cron tasks. Stops nmon data collection and delivery to ATSD
-i While nmon does not have any dependencies, the ATSD sender script has the following dependencies: crontab, telnet.
With -i argument the script only checks and installs dependencies.
Requires sudo credentials defined in the file.
After installing the dependencies, run the script again without the -i argument to install the nmon and sender script.

The file contains the target machine parameters, user details, and paths to nmon and crontab settings:

Use # to uncomment optional parameters.

The following files must be located in the same directory as the script (path to files is set in the file):

  • nmon binary file
  • Sender script
  • Target machine user SSH key
  • atsdreadonly SSH key
Setting Description
nmon.s Pause between nmon snapshots.
nmon.c nmon snapshot count.
nmon.cron.hour cron task start hour.
nmon.cron.minute cron task start minute.
atsd.protocol Data transfer protocol.
Possible values: telnet, SSH.
atsd.port ATSD TCP port.
atsd.key Path to SSH key for readonly account.
id_rsa_atsdreadonly by default.
Optional parameter.
atsd.user Read-only user account.
atsdreadonly by default.
Optional parameter.
atsd.hostname ATSD server.
deploy.user User of target machines.
deploy.key Path to the SSH key to access target machines by the user set in deploy.user.
deploy.password Password of target machine user set in the deploy.user setting.
Password takes priority over SSH key.
deploy.sudo.user sudo user of target machines.
Optional parameter.
deploy.sudo.key Path to sudo users SSH key to access target machines.
Optional parameter.
deploy.sudo.password Password of target machine sudo user set in the deploy.sudo.user setting.
Password takes priority over SSH key.
Optional Parameter.
deploy.nmon-binary Path to nmon binary file to be installed on target machines. Directory used on target machines to install nmon and the sender script.
The user must have write access to this directory. Target server hostname or ip address and SSH connection port separated by :
Can be set to multiple servers, one server per line.

Example file:

nmon.s = 60
nmon.c = 1440
nmon.cron.hour = 12
nmon.cron.minute = 19

atsd.protocol = telnet
atsd.port = 8081
atsd.hostname = atsd_hostname

deploy.user = nmonuser
deploy.key = ./id_dsa_nmonuser
#deploy.sudo.user = root
#deploy.sudo.key = ./id_dsa_root
deploy.nmon-binary = nmon_x86_64_sles11 = /home/nmonuser/nmon = nurswgvml006:22 = nurswgvml007:22 = nurswgvml008:22 = nurswgvml009:22

Once the file is set up and paths to the required files are set, deploy nmon and the sender script to remote target machines:


The script checks each machine for dependencies and shows installation progress/results in the console.