Developers guide
130
%W Trap description
%q Trap sub-type (numeric, in decimal)
%P Security information from the PDU (community name
for v1/v2c, user and context for v3)
%v list of trap's variables
In addition to these values, you may also specify an
optional field width and precision, just as in printf, and
a flag value. The following flags are legal:
- left justify
0 use leading zeros
# use alternate form
The "use alternate form" flag changes the behavior of some
format flags. Normally, the fields that display time
information base it on the local time, but this flag tells
them to use GMT instead. Also, the variable list is nor
mally a tab-separated list, but this flag changes it to a
comma-separated one. The alternate form for the uptime is
similar to "3 days, 0:14:34.65"
Examples:
To get a message like "14:03 TRAP3.1 from humpty.ucd.edu"
you could use something like this:
snmptrapd -P -F "%02.2h:%02.2j TRAP%w.%q from %A\n"
If you want the same thing but in GMT rather than local
time, use
snmptrapd -P -F "%#02.2h:%#02.2j TRAP%w.%q from
%A\n"
EXTENSIBILITY AND CONFIGURATION
See the snmptrapd.conf(5) manual page.
SEE ALSO
snmpcmd(1), syslog(8), variables(5)
07 Aug 2001 SNMPTRAPD(8)
(END)
*/










