.\" .\" Japanese Version Copyright (c) 2002 Yuichi SATO .\" all rights reserved. .\" Translated Fri Mar 22 01:02:40 JST 2002 .\" by Yuichi SATO .\" .\"WORD: .\" .TH SNMP.CONF 5 "28 Aug 2001" .ds )H U.C. Davis .ds ]W V4.2.4 .UC 4 .\"O .SH NAME .SH 名前 .\"O snmp_config - describes how to configure the ucd-snmp applications. snmp_config - ucd-snmp アプリケーションの設定法の説明 .\"O .SH DESCRIPTION .SH 説明 .\"O The ucd-snmp package uses various configuration files to configure its .\"O applications. This manual page merely describes the overall nature of .\"O them, so that the other manual pages don't have to. ucd-snmp パッケージはアプリケーションの設定にいろいろな設定ファイルを用いる。 この man ページは、他の man ページで説明する必要のない、 設定ファイルの全体的な特徴のみを説明している。 .\"O .SH "DIRECTORIES SEARCHED" .SH 検索されるディレクトリ .\"O First off, there are numerous places that configuration files can be .\"O found and read from. By default, the applications look for .\"O configuration files in the following 3 directories, in order: .\"O /usr/share/snmp, /usr/lib/snmp, and $HOME/.snmp. まず第一に、いろいろな場所に設定ファイルを置いて 読み込ませることができる。 アプリケーションは、デフォルトでは /usr/share/snmp, /usr/lib/snmp, $HOME/.snmp という順番で設定ファイルを探す。 .\"O In each of these .\"O directories, it looks for files with the extension of both .conf .\"O and .local.conf (reading the second on last). In this manner, there are 6 .\"O default places a configuration file can exist for any given .\"O configuration file type. これらのディレクトリ以下にある \&.conf と .local.conf という拡張子のファイルを探す (2 番目の拡張子のディレクトリを最後に読み込む)。 このような方法で、これらの設定ファイルのタイプについて、 設定ファイルが存在できる 6 つのデフォルトの場所がある。 .PP .\"O Additionally, the above default search path can be overridden by .\"O setting the environment variable SNMPCONFPATH to a ':' separated .\"O list of directories to search for. さらに上記のデフォルトの検索パスは、 環境変数 SNMPCONFPATH を設定して変更できる。 SNMPCONFPATH には、検索するディレクトリを ':' で区切ったリストで指定する。 .PP .\"O Finally, applications that store persistent data will also look in the .\"O /var/snmp directory for configuration files there. そして永続的なデータを格納するアプリケーションは、 設定ファイルを /var/snmp でも検索する。 .\"O .SH "CONFIGURATION FILE TYPES" .SH 設定ファイルのタイプ .\"O Each application may use multiple configuration files, which will .\"O configure various different aspects of the application. For instance, .\"O the SNMP agent (snmpd) knows how to understand configuration .\"O directives in both the snmpd.conf and the snmp.conf files. 各アプリケーションは複数の設定ファイルを使うことができる。 これら設定ファイルでアプリケーションのいろいろな設定を行う。 例えば、SNMP エージェント (snmpd) は snmpd.conf ファイルと snmp.conf ファイルの両方にある 設定ディレクティブの内容を解釈できる。 .\"O In fact, .\"O most applications understand how to read the contents of the snmp.conf .\"O files. Note, however, that configuration directives understood in one .\"O file may not be understood in another file. 実際、大部分のアプリケーションが snmp.conf ファイルの内容を解釈できる。 ただし、ある設定ディレクティブが複数のファイルに存在したときに、 最初に読まれた設定ファイルでの指定だけが有効となり、 それ以降に読まれた設定ファイルでの指定は無効になる点に注意すること。 .\"O For further information, .\"O read the associated manual page with each configuration file type. .\"O Also, most of the applications support a '-H' switch on the command .\"O line that will list the configuration files it will look for and the .\"O directives in each one that it understands. より詳しい情報を得るためには、 各設定ファイルタイプについての関連ページを読むこと。 大部分のアプリケーションはコマンドラインで \&'-H' スイッチをサポートしており、 各アプリケーションが参照する設定ファイルと 使用可能なディレクティブをリスト表示する。 .PP .\"O The snmp.conf configuration file is intended to be a application suite .\"O wide configuration file that supports directives that are useful for .\"O controlling the fundamental nature of all of the snmp applications, .\"O such as how they all manipulate and parse the textual SNMP mib files. snmp.conf はアプリケーション群全体に対する 設定ファイルとして想定されていて、 全ての snmp アプリケーションの基本的な特性を制御するための ディレクティブをサポートしている。 基本的な特性とはテキスト形式の SNMP mib ファイルの 操作法や解析方法のことである。 .\"O .SH "SWITCHING CONFIGURATION TYPES IN MID-FILE" .SH "MID ファイルにおける設定タイプの変更" .\"O It's possible to switch in mid-file the configuration type that the .\"O parser is supposed to be reading. Since that sentence doesn't make .\"O much sense, lets give you an example: say that you wanted to turn on .\"O packet dumping output for the agent by default, but you didn't want to .\"O do that for the rest of the applications (ie, snmpget, snmpwalk, ...). .\"O Normally to enable packet dumping in the configuration file .\"O you'd need to put a line like: パーサーが読み込む設定タイプは mib ファイルの中で切り替えることができる。 このように言われても意味がわからないので、例を示す。 .\"sato: Since that sentence ... の訳し方は、これでいいのか? 例えば、デフォルトでエージェントのパケットダンプ出力を有効にしたいが、 (snmpget, snmpwalk, ... といった) 他のアプリケーションでは 有効にしたくないといった場合である。 通常、設定ファイルでパケットダンプを有効にするには、 .PP .RS dumpPacket true .RE .PP .\"O into the snmp.conf file. という行を snmp.conf ファイルに書く必要がある。 .\"O But, this would turn it on for all of the .\"O applications. So, instead, you can put the same line in the .\"O snmpd.conf file so that it only applies to the snmpd demon. However, .\"O you need to tell the parser to expect this line. You do this by .\"O putting a special type specification token inside a [] set. In other .\"O words, inside your snmpd.conf file you could put the above snmp.conf .\"O directive by adding a line like so: しかしこれでは、全てのアプリケーションでダンプが有効になってしまう。 そこで代わりに同じ行を snmpd.conf ファイルに書けば、 snmpd デーモンにのみ適用される。 ただし、パーサーにこの行を待ち受けるように指示する必要があり、 特殊タイプの指定トークンを [] セットの中に書き込まなければならない。 言い換えれば、snmpd.conf ファイルに以下の行を追加することで、 上記の snmp.conf ディレクティブを書き込めるということである。 .PP .RS [snmp] dumpPacket true .RE .PP .\"O This tells the parser to parse the above line as if it were inside a .\"O snmp.conf file instead of an snmpd.conf file. If you want to parse a .\"O bunch of lines rather than just one then you can make the context .\"O switch apply to the remainder of the file or until the next context .\"O switch directive by putting the special token on a line by itself: この行により、上の行が snmpd.conf ファイルではなく snmp.conf ファイルにある場合と同様にパーサーに解析させる。 .\"sato: この訳は正しいか自信無し 1 行だけでなく複数の行をパースさせたい場合には、 特殊トークンのみの行を置くことにより、 コンテキストスイッチをファイルの残りの部分または 次のコンテキストスイッチディレクティブが現れるまで適用することができる。 .PP .RS .nf .\"O # make this file handle snmp.conf tokens: # このファイルを snmp.conf トークンとして処理させる: [snmp] dumpPacket true logTimestamp true .\"O # return to our original snmpd.conf tokens: # 元の snmpd.conf トークンに戻る: [snmpd] rocommunity mypublic .RE .\"O .SH COMMENTS .SH コメント .PP .\"O Any lines beginning with the character '#' in the configuration files .\"O are treated as a comment and are not parsed. 文字 '#' で始まる設定ファイルの行は、 コメントとして扱われ、パースされない。 .\"O .SH "API INTERFACE" .SH "API インタフェース" .PP .\"O Information about writing C code that makes use of this system in .\"O either the agent's mib modules or in applications can be found in the .\"O read_config(3) manual page. エージェントの mib モジュールやアプリケーションで このシステムを利用するための C 言語のコードを書くための情報は、 read_config(3) の man ページにある。 .\"O .SH "SEE ALSO" .SH 関連項目 read_config(3). .\" Local Variables: .\" mode: nroff .\" End: