Linux/RHEL5/snmpdのログがうざい
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
RIGHT:[[Linux 関係覚え書き]]
*snmpd のログの設定 [#cb94cefc]
RHEL5 で HP SMH などのヘルスチェックのアプリケーションを
インストールしていると,
/var/log/messages に snmp のログがうざいほど出る.
そんなときは,/etc/sysconfig/snmpd.options を編集し,
OPTIONS="-LS 5 d -Lf /dev/null -p /var/run/snmpd.pid -a"
とする.
"-L" オプションの詳しい説明があまりなくてよく分からないが,
上記のようにすることで,
NOTICE レベル以上のログのみを出力するように制限できるよう...
http://www.jp.redhat.com/FAQ/support3.html#26
"-L" オプションについては,以下のサイトを参照.
http://linux.die.net/man/1/snmpcmd
抜粋
-Ls FACILITY
Log messages via syslog, using the specified facility...
'0'-'7' for LOG_LOCAL0 through LOG_LOCAL7).
There are also "upper case" versions of each of these op...
mechanism to be restricted to certain priorities of mess...
example:
For -LF and -LS the priority specification comes before ...
The priorities recognised are:
0 or ! for LOG_EMERG,
1 or a for LOG_ALERT,
2 or c for LOG_CRIT,
3 or e for LOG_ERR,
4 or w for LOG_WARNING,
5 or n for LOG_NOTICE,
6 or i for LOG_INFO, and
7 or d for LOG_DEBUG.
なので,
OPTIONS="-LS 5 0 -Lf /dev/null -p /var/run/snmpd.pid -a"
などとして,LOG_LOCAL0 ファシリティで出力し,
さらに,/etc/syslog.conf を調整して snmp のログ(LOG_LOCAL...
出力させた方が messages の見通しは効く.
/etc/syslog.conf の変更箇所の例
*.info;mail.none;authpriv.none;cron.none /var/log/messa...
を
*.info;mail.none;authpriv.none;cron.none;local0.none /v...
local0.* /var/log/snmpd.log
終了行:
RIGHT:[[Linux 関係覚え書き]]
*snmpd のログの設定 [#cb94cefc]
RHEL5 で HP SMH などのヘルスチェックのアプリケーションを
インストールしていると,
/var/log/messages に snmp のログがうざいほど出る.
そんなときは,/etc/sysconfig/snmpd.options を編集し,
OPTIONS="-LS 5 d -Lf /dev/null -p /var/run/snmpd.pid -a"
とする.
"-L" オプションの詳しい説明があまりなくてよく分からないが,
上記のようにすることで,
NOTICE レベル以上のログのみを出力するように制限できるよう...
http://www.jp.redhat.com/FAQ/support3.html#26
"-L" オプションについては,以下のサイトを参照.
http://linux.die.net/man/1/snmpcmd
抜粋
-Ls FACILITY
Log messages via syslog, using the specified facility...
'0'-'7' for LOG_LOCAL0 through LOG_LOCAL7).
There are also "upper case" versions of each of these op...
mechanism to be restricted to certain priorities of mess...
example:
For -LF and -LS the priority specification comes before ...
The priorities recognised are:
0 or ! for LOG_EMERG,
1 or a for LOG_ALERT,
2 or c for LOG_CRIT,
3 or e for LOG_ERR,
4 or w for LOG_WARNING,
5 or n for LOG_NOTICE,
6 or i for LOG_INFO, and
7 or d for LOG_DEBUG.
なので,
OPTIONS="-LS 5 0 -Lf /dev/null -p /var/run/snmpd.pid -a"
などとして,LOG_LOCAL0 ファシリティで出力し,
さらに,/etc/syslog.conf を調整して snmp のログ(LOG_LOCAL...
出力させた方が messages の見通しは効く.
/etc/syslog.conf の変更箇所の例
*.info;mail.none;authpriv.none;cron.none /var/log/messa...
を
*.info;mail.none;authpriv.none;cron.none;local0.none /v...
local0.* /var/log/snmpd.log
ページ名: