IWSS の snmpd で使用するポート番号を変更する方法
- /etc/iscan/intscan.ini ファイルを開きます。
- [snmp] セクションにある svc_port パラメータに、任意のポート番号を指定し、保存します。
- snmpd を再起動します。
# /etc/iscan/S99ISsnmpd start
- /usr/iwss/bin/svc_snmpmonitor.sh ファイルを開き、手順 2 で設定したポート番号を以下の行の "localhost" 以降に追記します。以下は、ポート番号を 10161 に変更した場合の例です。
errmsg=`$SNMPWALK -v 2c localhost -c iscan UCD-SNMP-MIB::prErrMessage.$1 | cut -d' ' -f4-`
【変更後】
errmsg=`$SNMPWALK -v 2c localhost:10161 -c iscan UCD-SNMP-MIB::prErrMessage.$1 | cut -d' ' -f4-`
【変更前】
# set default port number
SNMPPORT=161
【変更後】
# set default port number
SNMPPORT=10161
- /usr/iwss/bin/svc_snmpmonitor.sh シェルを実行し、以下のように正常に実行されることを確認します。
logtodb is up and running.
isdelvd is up and running.
postmaster is up and running.
ismetricmgmtd is up and running.
Start service...
run /etc/iscan/S99ISdatabase start
start postmaster and wait for postmaster
pg_ctl: another server might be running; trying to start server anyway
waiting for server to start....FATAL: lock file "postmaster.pid" already exists
HINT: Is another postmaster (PID 4389) running in data directory "/var/iwss/postgres/pgdata"?
....
pg_ctl: this data directory appears to be running a pre-existing postmaster
stopped waiting
pg_ctl: could not start server
Examine the log output.
[svc_snmpmonitor.sh] はプロセスの起動監視を行うスクリプトとなり、スクリプト内でPostgreSQLの起動スクリプトを実行しておりますが、以上の例ではプロセスID:4389で既にPostgreSQLプロセスが起動済である為、上記のようなメッセージが出力されております。
