4.53 RunCommand

Use this Knowledge Script to run a non-interactive UNIX command. For example, you can use this Knowledge Script to run a batch command that appends a log file or kills a process.

This Knowledge Script raises an event if the results of the command produce output. You can configure this Knowledge Script to not raise an event if the results of the command do not produce any output.

4.53.1 Resource Object

UNIX computer icon

4.53.2 Default Schedule

By default, this script is only run once per computer.

4.53.3 Setting Parameter Values

Set the following parameters as needed:

Description

How to Set It

Raise event displaying text sent to STDOUT? (y/n)

Specify whether you want to raise an event containing the STDOUT of the executed command. The default is y.

Include STDERR in event text? (y/n)

Specify whether you want to include the STDERR of the command along with the STDOUT in the event text. The default is y.

Raise event if output is empty? (y/n)

Specify whether you want to raise an event if the results of the command do not produce any output. The default is y.

UNIX command with possible arguments

Enter the command to run. Do not enter a command that requires user input. The command you enter should include all necessary arguments and handle any input and output redirection or file management required.

Separate multiple processes with semicolons (;) and no spaces.

Event severity level for STDOUT/STDERR event

Set the event severity level, from 1 to 40, to indicate the importance of the event. The default is 22.