OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / ucd-snmp / original / man8 / snmptrapd.8
1 .\" /***********************************************************
2 .\"     Copyright 1989 by Carnegie Mellon University
3 .\" 
4 .\"                       All Rights Reserved
5 .\" 
6 .\" Permission to use, copy, modify, and distribute this software and its 
7 .\" documentation for any purpose and without fee is hereby granted, 
8 .\" provided that the above copyright notice appear in all copies and that
9 .\" both that copyright notice and this permission notice appear in 
10 .\" supporting documentation, and that the name of CMU not be
11 .\" used in advertising or publicity pertaining to distribution of the
12 .\" software without specific, written prior permission.  
13 .\" 
14 .\" CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
15 .\" ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
16 .\" CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
17 .\" ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
18 .\" WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
19 .\" ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
20 .\" SOFTWARE.
21 .\" ******************************************************************/
22 .TH SNMPTRAPD 8 "07 Aug 2001"
23 .UC 4
24 .SH NAME
25 snmptrapd - Receive and log snmp trap messages.
26 .SH SYNOPSIS
27 snmptrapd [common options] [-P] [-o file] [-s] [-f] [-p port] [-e] [-l [d0-7]] [-a] [-C] [-c confFile] [-F FORMAT]
28 .SH DESCRIPTION
29 Snmptrapd
30 is an SNMP application that receives and logs snmp trap messages
31 sent to the SNMP-TRAP port (162) on the local machine.
32 .PP
33 The log messages are of the form:
34 .br
35 .I Sep 17 22:39:52 suffern snmptrapd: 128.2.13.41:
36 .I Cold Start Trap (0) Uptime:
37 .I 8 days, 0:35:46
38 .PP
39 .I Snmptrapd
40 must be run as root so that UDP port 162 can be opened.
41 .SH COMMAND LINE ARGUMENTS
42 In addition to the command arguments described under
43 .IR snmpcmd (1)
44 the following arguments are understood:
45 .IP "-P"
46 Print the logged messages to stderr.
47 .IP "-o file"
48 Logs messages to a given file.
49 .IP "-p port"
50 Specifies the port to run on, if the default 162 is not desired.
51 .IP "-s"
52 Log the messages to syslog(8).  These syslog messages are sent with
53 the level of LOG_WARNING, and to the LOG_LOCAL0 facility (by
54 default).  The demon will also fork away from its caller when
55 the syslog facilities are used.
56 This is the default unless the '-P' flag or '-o' flag is used.
57 .IP "-n"
58 Don't do reverse translation from IP address to host name.
59 .IP "-l [d0-7]"
60 Specifies the syslog facility to use, demon or local[0-7].
61 .IP "-a"
62 makes
63 .I snmptrapd
64 ignore AuthenticationFailure traps
65 .IP "-d"
66 Causes the application to dump input and output packets.
67 .IP "-D" 
68 Turn debugging output on.
69 .IP "-f"
70 Don't fork away from the caller when using syslog().
71 .IP "-C"
72 Don't read the default set of configuration files.
73 .IP "-c confFile"
74 Force the reading of confFile as a configuration file.
75 .IP "-F FORMAT"
76 When logging to standard output, use the format in the string FORMAT.
77 .PP
78 FORMAT is a printf-like string. 
79 .I Snmptrapd 
80 interprets the following formatting sequences:
81 .TP
82 %%
83 a literal %
84 .TP
85 %t
86 decimal number of seconds since the operating system's epoch
87 .TP
88 %y
89 current year
90 .TP
91 %m
92 current (numeric) month
93 .TP
94 %l
95 current day of month
96 .TP
97 %h
98 current hour
99 .TP
100 %j
101 current minute
102 .TP
103 %k
104 current second
105 .TP
106 %T
107 up-time in seconds (in decimal)
108 .TP
109 %Y
110 the year field from the up-time
111 .TP
112 %M
113 the numeric month field from the up-time
114 .TP
115 %L
116 the day of month field from the up-time
117 .TP
118 %H
119 the hour field from the up-time
120 .TP
121 %J
122 the minute field from the up-time
123 .TP
124 %K
125 the seconds field from the up-time
126 .TP
127 %A
128 agent's hostname if available, otherwise IP address
129 .TP
130 %a
131 agent's IP address
132 .TP
133 %B
134 PDU's hostname if available, otherwise IP address
135 .TP
136 %b
137 PDU's IP address
138 .TP
139 %N
140 Enterprise string
141 .TP
142 %w
143 Trap type (numeric, in decimal)
144 .TP
145 %W
146 Trap description
147 .TP
148 %q
149 Trap sub-type (numeric, in decimal)
150 .TP
151 %P
152 Security information from the PDU (community name for v1/v2c,
153 user and context for v3)
154 .TP
155 %v
156 list of trap's variables
157 .PP
158 In addition to these values, you may also specify an optional field
159 width and precision, just as in printf, and a flag value. The
160 following flags are legal:
161 .TP
162 -
163 left justify
164 .TP
165 0
166 use leading zeros
167 .TP
168 #
169 use alternate form
170 .PP
171 The "use alternate form" flag changes the behavior of some format
172 flags. Normally, the fields that display time information base it
173 on the local time, but this flag tells them to use GMT instead.
174 Also, the variable list is normally a tab-separated list, but this
175 flag changes it to a comma-separated one. The alternate form for the
176 uptime is similar to "3 days, 0:14:34.65"
177 .PP
178 Examples:
179 .PP
180 To get a message like "14:03 TRAP3.1 from humpty.ucd.edu" you 
181 could use something like this:
182 .PP
183 .RS
184 .NF
185 snmptrapd -P -F "%02.2h:%02.2j TRAP%w.%q from %A\en"
186 .FI
187 .RE
188 .PP
189 If you want the same thing but in GMT rather than local time, use
190 .PP
191 .RS
192 .NF
193 snmptrapd -P -F "%#02.2h:%#02.2j TRAP%w.%q from %A\en"
194 .FI
195 .RE
196 .PP
197 .SH EXTENSIBILITY AND CONFIGURATION
198 See the snmptrapd.conf(5) manual page.
199 .PP
200 .SH "SEE ALSO"
201 snmpcmd(1), syslog(8), variables(5)