NAME

dumpnet.host.diff.cmd - run a command and compare its output to a previous one


SYNOPSIS

dumpnet.host.diff.cmd [-L] [-s SESSIONID] [-d DUMPNET_CONFIG] HOST_CONFIG DIRNAME COMMAND


DESCRIPTION

dumpnet.host.diff.cmd runs COMMAND and compares its output to a prievious one to track runtime configuration changes. It will call dumpnet.host.userdefined.cmd to do most of the job.

If you already have an entry for the command to run in a dumpnet.diff.conf file it is recommended to call dumpnet.host.diff and grep the specific line you need into it. Please see the EXAMPLES section in dumpnet.host.diff(8).


OPTIONS

-L
Run COMMAND locally. You can have the same effect by prefixing COMMAND with an `@' sign.

-s SESSIONID
Set sessionId to SESSIONID. If you don't know if you need this option, you don't! Read the SESSIONID section in dumpnet(8) before using it!

-d DUMPNET_CONFIG
Use DUMPNET_CONFIG instead of the default $DUMPNET_HOME/conf/dumpnet.conf.

HOST_CONFIG
The host configuration file. For the target host 192.168.1.10 it could be conf/192.168.1.10/dumpnet.HOST.conf.

DIRNAME
The name of the sub-directory where the output is to be stored: $backupDir/$host/$dirname.

COMMAND
The command to execute to retrieve the runtime configuration. If the command is prefixed by an `@' sign the command will be run locally. Commands without the prefix will be run on the target host. A local command can be used to integrate third party software installed on the dumpnet host. For example to do a remote port scan and to get alerted about opened ports you can use a local nmap command. For details please see dumpnet.diff.conf(8).


EXAMPLES

To run ``route -n'' on 192.168.1.10 and save the output in the subdirectory ``route''

        dumpnet.host.diff.cmd conf/192.168.1.10/dumpnet.HOST.conf route 'route -n'

Do a remote port scan and save the output in the subdir ``nmap''

        dumpnet.host.diff.cmd conf/192.168.1.10/dumpnet.HOST.conf nmap 'nmap $host'


EXIT STATUS

dumpnet.host.diff.cmd will return a zero exit status if the call to dumpnet.host.userdefined.cmd exits with 0. In any other case it will return 1.


SEE ALSO

 dumpnet(8)
 dumpnet.host(8)
 dumpnet.host.diff(8)


AUTHOR

 Lukas Feiler <lukas.feiler@lukasfeiler.com>


COPYRIGHT AND LICENSE

dumpnet is published under the LGPL (GNU LESSER GENERAL PUBLIC LICENSE). Please see the LICENSE file contained in the installation tarball for details. The official web site is http://dumpnet.sourceforge.net.