1 .\" /***********************************************************
2 .\" Copyright 1989 by Carnegie Mellon University
4 .\" All Rights Reserved
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.
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
21 .\" ******************************************************************/
23 .\" Japanese Version Copyright (c) 2002 Yuichi SATO
24 .\" all rights reserved.
25 .\" Translated Sat Feb 16 20:15:39 JST 2002
26 .\" by Yuichi SATO <ysato@h4.dion.ne.jp>
28 .TH SNMPTRAPD 8 "07 Aug 2001"
32 .\"O snmptrapd - Receive and log snmp trap messages.
33 snmptrapd - snmp trap ¥á¥Ã¥»¡¼¥¸¤ò¼õ¿®¤·¤Æ¥í¥°¤ËµÏ¿¤¹¤ë
36 snmptrapd [common options] [-P] [-o file] [-s] [-f] [-p port] [-e] [-l [d0-7]] [-a] [-C] [-c confFile] [-F FORMAT]
40 .\"O is an SNMP application that receives and logs snmp trap messages
41 .\"O sent to the SNMP-TRAP port (162) on the local machine.
43 ¤Ï¥í¡¼¥«¥ë¥Þ¥·¥ó¤Î SNMP-TRAP ¥Ý¡¼¥È (162) ¤ËÁ÷¤é¤ì¤Æ¤¤¿
44 snmp trap ¥á¥Ã¥»¡¼¥¸¤ò¼õ¿®¤·¤Æ¥í¥°¤ËµÏ¿¤¹¤ë SNMP ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç¤¢¤ë¡£
46 .\"O The log messages are of the form:
47 ¥í¥°¥á¥Ã¥»¡¼¥¸¤Ï°Ê²¼¤Î¤è¤¦¤Ê·Á¼°¤Ç¤¢¤ë:
49 .I Sep 17 22:39:52 suffern snmptrapd: 128.2.13.41:
50 .I Cold Start Trap (0) Uptime:
54 .\"O must be run as root so that UDP port 162 can be opened.
56 ¤Ï UDP ¥Ý¡¼¥È 162 ¤ò¥ª¡¼¥×¥ó¤¹¤ë¤Î¤Ç¡¢
57 root ¤Ç¼Â¹Ô¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
58 .\"O .SH COMMAND LINE ARGUMENTS
59 .SH ¥³¥Þ¥ó¥É¥é¥¤¥ó°ú¤¿ô
60 .\"O In addition to the command arguments described under
62 .\"O the following arguments are understood:
64 ¤ÇÀâÌÀ¤µ¤ì¤Æ¤¤¤ë¥³¥Þ¥ó¥É¥é¥¤¥ó°ú¤¿ô¤Ë²Ã¤¨¡¢°Ê²¼¤Î°ú¤¿ô¤¬»ÈÍѤǤ¤ë¡£
66 .\"O Print the logged messages to stderr.
67 ¥í¥°¥á¥Ã¥»¡¼¥¸¤òɸ½à¥¨¥é¡¼¤Ëɽ¼¨¤¹¤ë¡£
69 .\"O Logs messages to a given file.
70 »ØÄꤷ¤¿¥Õ¥¡¥¤¥ë¤Ë¥á¥Ã¥»¡¼¥¸¤òµÏ¿¤¹¤ë¡£
72 .\"O Specifies the port to run on, if the default 162 is not desired.
73 ¥Ç¥Õ¥©¥ë¥È¤Î 162 È֥ݡ¼¥È¤Ç¼Â¹Ô¤·¤¿¤¯¤Ê¤¤¾ì¹ç¤Ë¡¢
74 ¼Â¹Ô¤µ¤»¤ë¥Ý¡¼¥È¤ò»ØÄꤹ¤ë¡£
76 .\"O Log the messages to syslog(8). These syslog messages are sent with
77 .\"O the level of LOG_WARNING, and to the LOG_LOCAL0 facility (by
78 .\"O default). The demon will also fork away from its caller when
79 .\"O the syslog facilities are used.
80 .\"O This is the default unless the '-P' flag or '-o' flag is used.
81 ¥á¥Ã¥»¡¼¥¸¤ò syslog(8) ¤ËµÏ¿¤¹¤ë¡£
82 syslog ¥á¥Ã¥»¡¼¥¸¤Ï¡¢(¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï) level ¤ò LOG_WARNING¡¢
83 facility ¤ò LOG_LOCAL0 ¤È¤·¤ÆÁ÷¤é¤ì¤ë¡£
84 syslog µ¡Ç½¤ò»È¤¦¤È¡¢¥Ç¡¼¥â¥ó¤Ï fork ¤µ¤ì¤Æ
85 ¸Æ¤Ó½Ð¤·¸µ¤«¤éÀÚ¤êÎ¥¤µ¤ì¤ë¡£
86 ¤³¤ì¤Ï '-P' ¥Õ¥é¥°¤Þ¤¿¤Ï '-o' ¥Õ¥é¥°¤ò»È¤ï¤Ê¤¤¾ì¹ç¤Î¥Ç¥Õ¥©¥ë¥È¤Ç¤¢¤ë¡£
88 .\"O Don't do reverse translation from IP address to host name.
89 IP ¥¢¥É¥ì¥¹¤«¤é¥Û¥¹¥È̾¤Ø¤ÎµÕÊÑ´¹¤ò¹Ô¤ï¤Ê¤¤¡£
91 .\"O Specifies the syslog facility to use, demon or local[0-7].
92 »ÈÍѤ¹¤ë syslog facility ¤ò»ØÄꤹ¤ë¡£demon ¤Þ¤¿¤Ï local[0-7]¡£
96 .\"O ignore AuthenticationFailure traps
98 ¤Ë AuthenticationFailure trap ¤ò̵»ë¤µ¤»¤ë¡£
100 .\"O Causes the application to dump input and output packets.
101 ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ËÆþ½ÐÎϥѥ±¥Ã¥È¤ò¥À¥ó¥×¤µ¤»¤ë¡£
103 .\"O Turn debugging output on.
104 ¥Ç¥Ð¥Ã¥°½ÐÎϤò͸ú¤Ë¤¹¤ë¡£
106 .\"O Don't fork away from the caller when using syslog().
107 syslog() ¤ò»ÈÍѤ¹¤ë¾ì¹ç¤Ë¡¢
108 fork ¤Ë¤è¤ë¸Æ¤Ó½Ð¤·¸µ¤«¤éÀÚ¤êÎ¥¤·¤ò¹Ô¤ï¤Ê¤¤¡£
110 .\"O Don't read the default set of configuration files.
111 ¥Ç¥Õ¥©¥ë¥È¤ÎÀßÄê¥Õ¥¡¥¤¥ë¤Î¥»¥Ã¥È¤òÆɤ߹þ¤Þ¤»¤Ê¤¤¡£
113 .\"O Force the reading of confFile as a configuration file.
114 confFile ¤òÀßÄê¥Õ¥¡¥¤¥ë¤È¤·¤ÆÆɤ߹þ¤Þ¤»¤ë¡£
116 .\"O When logging to standard output, use the format in the string FORMAT.
117 ɸ½à½ÐÎÏ¤Ë¥í¥°¤òµÏ¿¤¹¤ë¤È¤¤Ë¡¢¥Õ¥©¡¼¥Þ¥Ã¥È¤È¤·¤Æʸ»úÎó FORMAT ¤ò»È¤¦¡£
119 .\"O FORMAT is a printf-like string.
121 .\"O interprets the following formatting sequences:
122 FORMAT ¤Ï printf ¤Ç»È¤ï¤ì¤ëʸ»úÎó¤Ë»÷¤Æ¤¤¤ë¡£
124 ¤Ï°Ê²¼¤Î¥Õ¥©¡¼¥Þ¥Ã¥Èʸ»úÎó¤ò²ò¼á¤¹¤ë:
131 .\"O decimal number of seconds since the operating system's epoch
132 OS ¤Îµª¸µ (epoch) ¤«¤é¤Î 10 ¿Ê¿ô¤Ç¤ÎÉÿô
139 .\"O current (numeric) month
143 .\"O current day of month
159 .\"O up-time in seconds (in decimal)
160 ²ÔƯ»þ´Ö (up-time) (10 ¿Ê¿ô¤Ç¤ÎÉÿô)
163 .\"O the year field from the up-time
164 ²ÔƯ»þ´Ö¤Î¡Öǯ¡×¤Î¥Õ¥£¡¼¥ë¥É¡£
167 .\"O the numeric month field from the up-time
168 ²ÔƯ»þ´Ö¤Î¡Ö·î (¿ôÃÍ)¡×¤Î¥Õ¥£¡¼¥ë¥É¡£
171 .\"O the day of month field from the up-time
172 ²ÔƯ»þ´Ö¤Î¡Ö·îÆâÆü¡×¤Î¥Õ¥£¡¼¥ë¥É¡£
175 .\"O the hour field from the up-time
176 ²ÔƯ»þ´Ö¤Î¡Ö»þ¡×¤Î¥Õ¥£¡¼¥ë¥É¡£
179 .\"O the minute field from the up-time
180 ²ÔƯ»þ´Ö¤Î¡Öʬ¡×¤Î¥Õ¥£¡¼¥ë¥É¡£
183 .\"O the seconds field from the up-time
184 ²ÔƯ»þ´Ö¤Î¡ÖÉáפΥե£¡¼¥ë¥É¡£
187 .\"O agent's hostname if available, otherwise IP address
188 ¼èÆÀ²Äǽ¤Ê¾ì¹ç¤Ï¥¨¡¼¥¸¥§¥ó¥È¤Î¥Û¥¹¥È̾¡£
189 ¼èÆÀÉÔ²Äǽ¤Ê¾ì¹ç¤Ï¥¨¡¼¥¸¥§¥ó¥È¤Î IP ¥¢¥É¥ì¥¹¡£
192 .\"O agent's IP address
193 ¥¨¡¼¥¸¥§¥ó¥È¤Î IP ¥¢¥É¥ì¥¹¡£
196 .\"O PDU's hostname if available, otherwise IP address
197 ¼èÆÀ²Äǽ¤Ê¾ì¹ç¤Ï PDU ¤Î¥Û¥¹¥È̾¡£
198 ¼èÆÀÉÔ²Äǽ¤Ê¾ì¹ç¤Ï PDU ¤Î IP ¥¢¥É¥ì¥¹¡£
201 .\"O PDU's IP address
205 .\"O Enterprise string
209 .\"O Trap type (numeric, in decimal)
210 trap ¥¿¥¤¥× (10 ¿Ê¿ô)
213 .\"O Trap description
217 .\"O Trap sub-type (numeric, in decimal)
218 trap ¥µ¥Ö¥¿¥¤¥× (10 ¿Ê¿ô)
221 .\"O Security information from the PDU (community name for v1/v2c,
222 .\"O user and context for v3)
223 PDU ¤Î¥»¥¥å¥ê¥Æ¥£¾ðÊó
224 (v1/v2c ¤Ë¤ª¤±¤ë¥³¥ß¥å¥Ë¥Æ¥£Ì¾¡¢v3 ¤Ë¤ª¤±¤ë¥æ¡¼¥¶¡¼¤È¥³¥ó¥Æ¥¥¹¥È)
227 .\"O list of trap's variables
230 .\"O In addition to these values, you may also specify an optional field
231 .\"O width and precision, just as in printf, and a flag value. The
232 .\"O following flags are legal:
233 ¤³¤ì¤é¤ÎÃͤ˲䨡¢¥Õ¥£¡¼¥ë¥É¤ÎÉý¤ÈÀºÅÙ (printf ¤ÈƱ¤¸) ¤ª¤è¤Ó
234 ¥Õ¥é¥°Ãͤʤɤò¥ª¥×¥·¥ç¥ó¤È¤·¤Æ»ØÄꤹ¤ë¤³¤È¤â¤Ç¤¤ë¡£
235 °Ê²¼¤Î¥Õ¥é¥°¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤¤ë:
242 .\"O use leading zeros
246 .\"O use alternate form
249 .\"O The "use alternate form" flag changes the behavior of some format
250 .\"O flags. Normally, the fields that display time information base it
251 .\"O on the local time, but this flag tells them to use GMT instead.
252 ¡ÖÊÌ·Á¼°¤ò»ÈÍѤ¹¤ë¡×¤¿¤á¤Î¥Õ¥é¥°¤ò»ØÄꤹ¤ë¤È¡¢
253 ¤¤¤¯¤Ä¤«¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¥Õ¥é¥°¤ÏÆ°ºî¤¬Êѹ¹¤µ¤ì¤ë¡£
254 Ä̾»þ´Ö¾ðÊó¤Î¥Õ¥£¡¼¥ë¥É¤Ï¥í¡¼¥«¥ë»þ¹ï¤Ë´ð¤Å¤¤¤Æɽ¼¨¤µ¤ì¤ë¤¬¡¢
255 ¤³¤Î¥Õ¥é¥°¤ò»È¤¦¤È GMT ¤ò»È¤¦¤è¤¦¤Ë¤Ê¤ë¡£
256 .\"O Also, the variable list is normally a tab-separated list, but this
257 .\"O flag changes it to a comma-separated one. The alternate form for the
258 .\"O uptime is similar to "3 days, 0:14:34.65"
259 ¤Þ¤¿Ä̾ÊÑ¿ô¥ê¥¹¥È¤Ï¥¿¥Ö¤Ç¶èÀÚ¤é¤ì¤ë¤¬¡¢
260 ¤³¤Î¥Õ¥é¥°¤ò»È¤¦¤È¥³¥ó¥Þ¶èÀÚ¤ê¤Î¥ê¥¹¥È¤Ë¤Ê¤ë¡£
261 ²ÔƯ»þ´Ö¤ÎÊÌ·Á¼°¤Ï¡¢¸µ¤ÈƱ¤¸¤Ç "3 days, 0:14:34.65" ¤Î¤è¤¦¤Ê·Á¼°¤Ç¤¢¤ë¡£
266 .\"O To get a message like "14:03 TRAP3.1 from humpty.ucd.edu" you
267 .\"O could use something like this:
268 "14:03 TRAP3.1 from humpty.ucd.edu" ¤Î¤è¤¦¤Ê·Á¼°¤Î¥á¥Ã¥»¡¼¥¸¤Ë¤¹¤ë¤¿¤á¤Ë¤Ï¡¢
269 °Ê²¼¤Î¤è¤¦¤Ë¤¹¤ì¤Ð¤è¤¤:
273 snmptrapd -P -F "%02.2h:%02.2j TRAP%w.%q from %A\en"
277 .\"O If you want the same thing but in GMT rather than local time, use
278 ¾å¤ÈƱ¤¸¤Ç¤¢¤ë¤¬¡¢¥í¡¼¥«¥ë»þ¹ï¤Ç¤Ï¤Ê¤¯ GMT ¤ò»È¤¤¤¿¤¤¾ì¹ç¤Ï¡¢
279 °Ê²¼¤Î¤è¤¦¤Ë¤¹¤ì¤Ð¤è¤¤:
283 snmptrapd -P -F "%#02.2h:%#02.2j TRAP%w.%q from %A\en"
287 .\"O .SH EXTENSIBILITY AND CONFIGURATION
289 .\"O See the snmptrapd.conf(5) manual page.
290 snmptrapd.conf(5) ¤Î man ¥Ú¡¼¥¸¤ò»²¾È¤¹¤ë¤³¤È¡£
294 snmpcmd(1), syslog(8), variables(5)