The NMIS Shell
Tired of typing long command lines when troubleshooting devices. Introducing the NMIS Shell.
Table of Contents
Installation
You will need to have NMIS 9.4.0 or greater.
Run the following command, the target needs to be in your PATH, so you could link it to somewhere else.
ln -s /usr/local/nmis9/bin/nmis.sh /usr/local/bin/nmis
Usage
Run a Collect with Debug3
Now you can use a much simplified syntax to collect things when the support team ask. For example:
nmis NODENAME collect debug3
This will schedule an NMIS collect on the node named NODENAME and create a debug file in /tmp/NODENAME-timestamp.pid.log, e.g. /tmp/server1-1670882070.75145.log
The equivalent command is:
/usr/local/nmis9/bin/nmis-cli act=schedule job.type=collect job.priority=1 job.node=NODENAME job.verbosity=3 job.output=/tmp/NODENAME job.force=true
Run an Update with Debug3
Now you can use a much simplified syntax to collect things when the support team ask. For example:
nmis NODENAME update debug3
Where is the Debug File?
Look for the debug logs in /tmp, the following command is a handy one which prints out in reverse timestamp order, so the last file is the most recently updated.
ls -lrt /tmp/NODENAME*
e.g. the output looks like:
keiths@volla:~$ ls -lrt /tmp/server1* -rw-r--r-- 1 root root 18971 Dec 13 07:54 /tmp/server1-1670882070.75145.log -rw-r--r-- 1 root root 123727 Dec 13 08:02 /tmp/server1-1670882545.38093.log -rw-r--r-- 1 root root 923195 Dec 13 08:03 /tmp/server1-1670882602.86851.log -rw-r--r-- 1 root root 123716 Dec 13 08:06 /tmp/server1-1670882788.25181.log -rw-r--r-- 1 root root 1032937 Dec 13 08:10 /tmp/server1-1670883011.61026.log