Sendlog command-line examples
To illustrate the operation, consider the following instances of Sendlog program usage that might be typical in an operations center. These messages might incorporate into a batch file, or might be the result of some program check that is launched periodically by a UNIX script or cron job.
Sendlog 127.0.0.1 “This is a debug message” | This command sends a message to the syslog program running 127.0.0.1. The severity and facility are not specified. These items default to the values of debug and user. |
Sendlog 192.168.1.1 “The system is restarting” 6 | This command sends a message to the syslog program running 192.16.1.1. The severity is info, and the facility is not specified, so it defaults to user. |
Sendlog myhost “Error during file transfer” 3 11 | This command sends a message to the syslog program running at the myhost platform. The severity is error, and the facility is ftp. The command is fully qualified and uses all the available arguments. |
As shown previously, the severities and facility codes are useful for categorizing the message at the syslog receiver program. Although their numeric values express these values, they are easily referable.
Executing the sendlog program with no command-line arguments lists all numeric severity and facility numbers, along with brief notes on usage.