LDAPのコンシューマを設定。

くろねこ@辰巳

※写真と本文は関係ありません。


LDAP のスレーブを設定したのですが、くだらないところで引っかかったので記録しておく。


最終的にはこんな感じでOKになりました。

プロバイダ(マスター)側設定(openldap-2.3.43-25.el5_8.1)


$ cat /etc/openldap/slapd.conf #以下抜粋
# index 関係の設定
index entryCSN,entryUUID                eq

# syncprov の設定
overlay         syncprov
syncprov-sessionlog 100

コンシューマ(スレーブ)側設定(openldap-2.3.43-25.el5_8.1)


$ cat /etc/openldap/slapd.conf #以下抜粋
# index 関係の設定
index entryCSN,entryUUID                eq

# syncrepl 関係の設定
syncrepl rid=001
 provider=ldap://192.168.1.153
 type=refreshOnly
 interval=00:00:03:00
 searchbase="dc=fuuu,dc=example,dc=net"
 scope=sub
 bindmethod=simple
 binddn="cn=rootdn,dc=fuuu,dc=example,dc=net"
 credentials=fugafuga

どこがダメだったかというと…。


# syncrepl 関係の設定で
syncrepl rid=001
 provider=ldap://192.168.1.153
 type=refreshOnly
 interval=00:00:03:00
 searchbase="dc=fuuu,dc=example,dc=net"
 scope=sub
# こんな感じでコメントしたり
# attrs="*"
 bindmethod=simple
 binddn="cn=rootdn,dc=fuuu,dc=example,dc=net"
 credentials=fugafuga

こんな感じで、設定項目を付けたり外したりをコメントアウトでやってたんですが。どうもうまく設定ができていない。具体的にはrootdn(全ての要素にフルアクセス可)でアクセスしているはずなのにACLで制限のある要素が取得出来ない。(パスワード関係の要素はアクセス制限をかけてあるが、スレーブLDAPサーバなので全ての要素を取得したい。)

なぜダメかと、しばらく悩んだ結果。
海外のメーリングリストで『この設定は1行で…』(http://www.openldap.org/lists/openldap-software/200809/msg00156.html)というのを見かけて、実はこの設定項目複数行で設定してそうだけど、1行の設定を(行頭のスペースで前の行の続きを表すという書き方をして)複数行に書いてあるだけということに気づいたのでした。

これと同義。


syncrepl rid=001 provider=ldap://192.168.1.153 type=refreshOnly interval=00:00:03:00 searchbase="dc=fuuu,dc=example,dc=net" scope=sub# こんな感じでコメントしたりすると# attrs="*" bindmethod=simple binddn="cn=rootdn,dc=fuuu,dc=example,dc=net" credentials=fugafuga


こんな感じで、#以降がコメントになってしまって、ダメなのでした。
binddn以下がコメントになってると、anonymousでLDAP接続してアクセス制限のある項目がみえなくなるので正しい動きだったのでした。

はー、悩んだ!!

munin で RTX1200 の CPULoad などを取得する。

町会のお店が良い感じにある。

※写真と本文は関係ありません。


標準のあるコマンド snmp__load snmp__memory で取得出来ないので。少し改造した。

snmp__load の OID の部分を、RTX1200 で取得出来るSNMPの値をに変更。
CPULoad Memory 共に%表示なので、グラフの上限を変更するなどする。
CPULoad は5秒平均、1分平均、5分平均を取得出来るので、3本グラフを書くようにした。

できたものは GitHub においた。

https://github.com/furu-nob/munin_plugins

リモートサーバのデータをroot権限で、rsyncでバックアップする。

そらからみず…
※写真と本文は関係ありません。


あちこちにある客先のファイルサーバのデータをデータセンタにあるバックアップサーバにバックアップしたい。

やりたいこと

rdiff-backupで世代バックアップしているので、そのバックアップフォルダをバックアップサーバ側にrsync。バックアップサーバから実行する。(Pull方式)

リモート側で『PermitRootLogin yes』したくない。
→リモートでrsyncコマンドをsudo実行するユーザを限定→『–rsync-path』オプションでリモート側のrsyncをsudoで実行する。

リモート側はADSL回線なので、動的IP。(DDNSで名前解決出来るようにした。


リモート側サーバでやったこと

バックアップサーバIPのssh接続を許可。
公開鍵認証でバックアップサーバからhogehogeがssh接続出来るようにしておく。

sudersに追加

# visudo
hogehoge ALL=(ALL)       NOPASSWD: /usr/bin/rsync		#追記

sudoするスクリプトを準備

$ cat /home/hogehoge/scripts/rsync.sh
#!/bin/sh
/usr/bin/sudo /usr/bin/rsync $*

バックアップサーバ側
サーバ『fuga.kyoyu-kun.example.co.jp』の『/media/backup/backup/』を『/mnt/disk/6/kyoyukun_backup/fuga/rsync』にrsyncするコマンド。

# /usr/bin/rsync -auvz -e ssh --rsync-path="/home/hogehoge/scripts/rsync.sh" --delete --dry-run hogehoge@fuga.kyoyu-kun.example.co.jp:/media/backup/backup/ /mnt/disk/6/kyoyukun_backup/fuga/rsync

はまったところ。
リモート側でroot権限で読み取る方法はこちら(sudo + rsync on CentOS 5@(・∂/Sheeplogh.)から参考にさせていただきましたが、『–rsync-path=”sudo rsync”』とすると、シェルスクリプト内で実行すると下記のようなエラーになった。(コマンドラインで実行は問題ない。)

Unexpected remote arg: hogehoge@fuga.kyoyu-kun.example.co.jp:/media/backup/backup/
rsync error: syntax or usage error (code 1) at main.c(1201) [sender=3.0.6]

最終的なシェルスクリプトはこんな感じ。
https://github.com/furu-nob/pull_rsync/blob/master/pull_rsync.sh


あとでみるメモ。
上り回線がボトルネックになるので問題なさそうだけど、リモート側で負荷を調整したい場合。
rsyncの負荷を抑える方法@理想未来はどうなった?

スキー板を海外通販


来季モデルのX-KART


去年のシーズン終わりにレンタルで借りた、Salomonの来シーズンモデルの板。

12月はじめに神田で見たら &yen10万 くらいだった。うーんやっぱりちょっと高い…。
ナショナルモデルだし、ビンディング調整できるしいろいろ探して安いところで個人輸入しようと考えた。
アメリカAmazonとかで探したけど、高かったり、日本へ送ってくれなかったり。
で、結局snowINNで。
snowINNで個人輸入してる人を調べてみたら山用ビンディング買ってるひとを見かけたくらい。

注文したのが2012年12月3日
到着したのが12月9日
追跡画面はこんな感じ

DHLの追跡画面


ちゃんとリアルタイムで更新されるしDHL高いだけあっていい感じ。(USPS…)

パッキングも問題ないレベル。(一応、コメントでで『日本遠いから緩衝材いっぱい入れて!!』って書いたけど無視されて普通にパッキングされてた感じ。海外通販は梱包が適当なことが多いので念のため毎回書いてる。)

金額はこんな。

Salomon 24 x-kart + k z12 12/13 black / green 164 &yen 56,478.72
送料(日本からはDHLのみ) &yen 7,686.2
関税(+手数料) &yen 2,335
合計 &yen 66,499


Invoice


関税領収書

少しお得。得したぶんでスキーパンツ買った!!(古いのは粉が出てくるようになったので…)

以下感想。

  • DHLの追跡画面見るまでスペインに注文したと知らなかったのはナイショ。
  • スノーボードのほうが、ビンディングの取りつけを自分で出来るから海外通販しやすいと思うがしてる人あんまりいない…
  • スキー板もビンディングを調整できるものを選べば、全然問題ない。
  • スキー板だけ買って国内で取りつける方法もあるけど、持ち込みでビンディング取りつけてくれる所は少ないと思う。(ドリルで穴開けて取り付けるので、失敗したときに代替品出せないから。)
  • あ、でもバートンは輸入代行業者使わないと無理って見かけるなぁ。そこまでするのはめんどくさいか…。
  • カービングの板はすごい切れて別物だ…

以上個人輸入レポートでした。



samba で msdfs proxy 設定。(日本語sharename使えるようにpatchを適用。)


マンホールが猫娘



※写真と本文は関係ありません。


samba で msdfs proxy 設定。

昔うまくいかなかった(これ↑)、日本語共有名で msdfs proxy 設定。(うまくいかなかったのでnfs経由で使ってた。)
H/Wの更新後。(OSなども新しくなった。sambaとnfsも…)
あるファイル(Word、Excel)だけ開くのに時間がかかるので(ログを見ているとnfs経由のところだけ引っかかるのでその辺が問題か…)やむにやまれず。情報を探したら。

nfsマウントしたところをsamba共有で使うのはおすすめしないらしい。メーリングリストのこの辺のやりとり。

msdfs使ったほうがいいとのこと。

あばばば。(今までが微妙なバランスでうまく動いていたのか…)でも日本語の共有名でmsdfs proxyするとうまく動かない。(´・ω・`)
とりあえずsambaが古いので3.0→3.5にVer.上げたけど、変わらず。
で、『samba MSDFS multibyte』あたりのキーワードでググると、ズバリな感じのBugレポートが…。

Bug 5909 – MS-DFS does not work on Vista, if link name includes multibyte character.

今回ダメなのを確認していたものはCentOS5.8にあった、samba-3.0.33-3.39.el5_8。
srpmをインストールしてソースを確認すると、該当する部分にpatchは当たっていない様子。

このpatchを適用してみよう

rpmbuild/SOURCES/ にメーリングリストにあったpatchを適当な名前(samba-3.0-ms-dfs.patch)で保存。
rpmbuild/SPECS/samba.specに下記を追記する。


…
Patch271: samba-3.0-CVE-2012-1182.patch
Patch272: samba-3.0-ms-dfs.patch      # 追記
 …
%patch271 -p1 -b .CVE-2012-1182
%patch272 -p1 -b .ms-dfs       # 追記
…


$ rpmbuild -ba rpmbuild/SPECS/samba.spec
とするとrpmとsrpmが作成される。

Windows7のクライアントで試してみたところ問題なく動いたのでXPでも試す予定。(XPでも動くと良いなぁ。)→XPでも動きました!!
samba側のmsdfsの設定を変更したら、クライアントを一度再起動しないとちゃんと認識しなかったので、動作確認が複雑でした。(古いFAQに『クライアントはログオフするだけじゃダメで再起動しないとダメだ』って書いてあった。URL失念。)

※今回はたまたま動きましたが、動作保証するわけではないのであしからずご了承ください。これででダメだったら MIRACLE LINUX 使おうかなと思ってたのだけど、うまくいってよかった。。



Amazon Web Services の Route53 でDDNS。


ピカ〜



※写真と本文は関係ありません。


客先のイントラ内にあるサーバ。
sshでメンテナンス出来るようにルータでポートフォワードしてある。
アクセスするIPアドレスは固定IPアドレス契約じゃないのでルータを再起動すると変わる。
今までは、Perl-CGIで作ったページにcronで定期的にアクセスして、IPを記録してた。(sshで繋げるだけなので不便じゃなかった。)
VPNでそのイントラネットに接続したい要望があったり、そうするとIPアドレスだけじゃ不便。
前からダイナミックDNSでDNSサーバに登録したいという気持ちがあったんだけど、運用中のDNSサーバにDDNSの設定を追加するのは怖いなぁと思ってたところ。

AWSのRoute53で登録出来たら便利だよなぁ。と調べると、登録スクリプトを公開してる人がいたのでやってみた。

example.co.jp を持っているDNSサーバで、kyoyu-kun.example.co.jp のサブドメインをroute53に移譲する設定を書く。
AWSで登録するホスト名は『hogehoge.kyoyu-kun.example.co.jp』という感じにしたいので、こんな感じ


; kyoyu-kun
kyoyu-kun IN NS ns-465.awsdns-58.com. 
kyoyu-kun IN NS ns-776.awsdns-33.net.
kyoyu-kun IN NS ns-1050.awsdns-03.org.
kyoyu-kun IN NS ns-1718.awsdns-22.co.uk.


kyoyu-kun.example.co.jp をRoute53にHosted Zone登録する。

でリモート側で定期的にRoute53に登録する仕掛けを。

http://www.improvisedscience.org/notes/Route_53_Dynamic_DNSこのあたりを参考に。まずAWSで公開してるdnscurl.pl を使えるようにする。
このあたりのパッケージが必要でした。(インストールしたOSはVine4.2からCent6のRedhat系のOS。)

  • perl-Digest-HMAC
  • perl-Digest-SHA1
  • curl
  • expat

bashのスクリプトを公開してる方がいらっしゃったので、ちょっと改造して使わせていただく。
xpath が必要だったのでXML::XPathをインストール。

修正したスクリプト。→ https://gist.github.com/furu-nob/4711578

xpath の-eオプション使えなかった。(ubuntu のxpathは-eオプションらしい。)スクリプト中の『2>/dev/null』をなくすとエラーが見えるのでデバッグしやすい。
あ、あとコマンドを『$ LANG=C route53DynDNS.bash』とコマンドラインを英語にしないと、日付が日本語で処理されてうまく動かないので注意!

タイムアウトするようであれば、dnscurl.pl のsub fetch_server_date の中の『”–max-time”, “5″,』を調整する。(30 くらいにしないとちゃんと動かないことがあった。原因はなんだろう。回線?そんなに大きなデータやりとりしてないよね。。参考にした情報→ https://forums.aws.amazon.com/message.jspa?messageID=291859

http://www.matt-helps.com/dnscurl-pl-lookup-timed-out-amazon-route53


sub fetch_server_date {
    my ($url) = @_;
#    my $curl_output_lines = run_cmd_read($CURL, "--progress-bar", "-I", "--max-time", "5", "--url", $url);
    my $curl_output_lines = run_cmd_read($CURL, "--progress-bar", "-I", "--max-time", "30", "--url", $url);
    for my $line (@$curl_output_lines) {
        if ($line =~ /^Date:\s+([[:print:]]+)/) {
            return $1;
        }
    }
    die "Could not find a Date header in server HEAD response: " . join(";", @$curl_output_lines);
}


こんな感じで帰ってくれば、登録成功。


Could not find A RR for hoge.kyoyu-kun.example.co.jp.
Creating initial record
Public IP address is: 218.47.21.11
Creating A record for hoge.kyoyu-kun.example.co.jp. to be 218.47.21.11
Got update status ID C2D7D41QNH6QMM with status PENDING
Pausing 40 seconds to allow for sync
Success!


正常な時の返事はこんな感じ。


Public IP address is: 218.47.21.11
Current A RR IP address is: 218.47.21.11
No need to update A record.


IP変更時はこんな返事。


Public IP address is: 218.47.21.13
A Record for hoge.kyoyu-kun.example.co.jp. is 218.47.21.11 with ttl: 600
Updating A record for hoge.kyoyu-kun.example.co.jp. to be 218.47.21.13 with ttl 600
Got update status ID C3FHALYY4B1VTU with status PENDING
Pausing 40 seconds to allow for sync
Success!


ちゃんと更新されてるかLogを取りたかったので、cron にこんなスクリプトを5分おきに動くように登録。


#!/bin/sh
LOG='/var/log/route53'
LANG='C'
echo '-------8<-------' >> $LOG
date >> $LOG
/root/scripts/route53/route53DynDNS.bash >> $LOG 2>&1


AWS料金は、DNSサーバへのクエリ回数で課金されるのでほとんど課金されないはず。

1ヶ月使うとこんな感じでした。(Querie なんて自分以外は使わないから誤差の範囲w。)


Amazon Route 53 $0.51
$0.50 per Hosted Zone for the first 25 Hosted Zones	 1 HostedZone	 0.50
$0.50 per 1,000,000 queries for the first 1 Billion queries	 213 Queries	 0.01


awstat.conf の雛形。


IMG_0010



※写真と本文は関係ありません。


awstats.model.conf を自分好みの雛形に書き直した。
awstat.patch を適用する。

$ cd /etc/awstats/
$ patch -b awstats.model.conf < awstats.patch

以下patch


$ cat awstats.patch 
--- awstats.model.conf_org  2012-12-06 14:51:21.000000000 +0900
+++ awstats.model.conf  2012-12-06 15:48:06.000000000 +0900
@@ -48,8 +48,8 @@
 # If there are several log files from load balancing servers :
 # Example: "/pathtotools/logresolvemerge.pl *.log |"
 #
-LogFile="/var/log/httpd/mylog.log"
-
+#LogFile="/var/log/httpd/mylog.log"
+LogFile="/bin/cat /var/log/httpd/example_log.1 /var/log/httpd/example._log |"
 
 # Enter the log file type you want to analyze.
 # Possible values:
@@ -119,7 +119,7 @@
 # Example for IIS:
 # LogFormat = 2
 #
-LogFormat=1
+LogFormat = 1
 
 
 # If your log field's separator is not a space, you can change this parameter.
@@ -150,7 +150,7 @@
 # Example: "ftp.domain.com"
 # Example: "domain.com"
 #
-SiteDomain=""
+SiteDomain="www.example.jp"
 
 
 # Enter here all other possible domain names, addresses or virtual host
@@ -165,7 +165,8 @@
 # Note: You can also use @/mypath/myfile if list of aliases are in a file.
 # Example: "www.myserver.com localhost 127.0.0.1 REGEX[mydomain\.(net|org)$]"
 #
-HostAliases="localhost 127.0.0.1 REGEX[myserver\.com$]"
+#HostAliases="localhost 127.0.0.1 REGEX[myserver\.com$]"
+HostAliases="localhost 127.0.0.1 REGEX[example\.jp$]"
 
 
 # If you want to have hosts reported by name instead of ip address, AWStats
@@ -185,7 +186,8 @@
 # 2 - DNS Lookup is made only from static DNS cache file (if it exists)
 # Default: 2
 # 
-DNSLookup=2
+#DNSLookup=2
+DNSLookup=1
 
 
 # When AWStats updates its statistics, it stores results of its analysis in 
@@ -200,7 +202,8 @@
 # Example: "C:/awstats_data_dir"
 # Default: "."          (means same directory as awstats.pl)
 #
-DirData="."
+#DirData="."
+DirData="/usr/local/awstats/var/lib/awstats"
 
 
 # Relative or absolute web URL of your awstats cgi-bin directory.
@@ -219,7 +222,8 @@
 # Example: "../icon"
 # Default: "/icon" (means you must copy icon directories in "/mywwwroot/icon")
 #
-DirIcons="/icon"
+#DirIcons="/icon"
+DirIcons="/awstatsicons"
 
 
 # When this parameter is set to 1, AWStats adds a button on report page to
@@ -327,6 +331,7 @@
 # Default: 0
 #
 AllowAccessFromWebToAuthenticatedUsersOnly=0
+#AllowAccessFromWebToAuthenticatedUsersOnly=1  
 
 
 # This parameter gives the list of all authorized authenticated users to view
@@ -337,7 +342,7 @@
 # Example: "__REMOTE_USER__"
 # Default: ""
 #
-AllowAccessFromWebToFollowingAuthenticatedUsers=""
+AllowAccessFromWebToFollowingAuthenticatedUsers="example_user"
 
 
 # When this parameter is defined to something, the IP address of the user that
@@ -463,8 +468,8 @@
 # Example: "localhost REGEX[^.*\.localdomain$]"
 # Default: ""
 #
-SkipHosts=""
-
+#SkipHosts=""
+SkipHosts="127.0.0.1 REGEX[^192\.168\.] localhost REGEX[^.*\.localdomain$]"
 
 # Do not include access from clients with a user agent that match following
 # criteria. If you want to exclude a robot, you should update the robots.pm
@@ -476,7 +481,8 @@
 # Example: "konqueror REGEX[ua_test_v\d\.\d]"
 # Default: ""
 #
-SkipUserAgents=""
+#SkipUserAgents=""
+SkipUserAgents="Nagios"
 
 
 # Use SkipFiles to ignore access to URLs that match one of following entries.
@@ -494,8 +500,8 @@
 # Example: "/badpage.php /page.php?param=x REGEX[^\/excludedirectory]"
 # Default: ""
 #
-SkipFiles=""
-
+#SkipFiles=""
+SkipFiles="REGEX[^\/awstats\/] REGEX[^\/admin\/]" 
 
 # Use SkipReferrersBlackList if you want to exclude records coming from a SPAM
 # referrer. Parameter must receive a local file name containing rules applied


# mkdir -p /usr/local/awstats/var/lib/awstats
apache の設定
# cp /usr/local/awstats/tools/httpd_conf /etc/httpd/conf.d/awstats.conf
Virttual Hostの設定などがあれば、そっちに書く。

$ cp /etc/awstats/awstats.model.conf /etc/awstats/awstats.example.jp.conf
SiteDomain などを変更する。

解析スクリプトを動かす。
$ perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=www.example.jp -update

cron 設定
# cat /etc/cron.d/awstat
7 5 * * * root /usr/bin/perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=www.example.jp -update

閲覧はconfigの引数を付ける。

http://www.example.jp/awstats/awstats.pl?config=www.example.jp

slow_query_log したいときのmy.cnfの書き方。


IMGP4587



※写真と本文は関係ありません。


mysql 5.1 の my.cnf の書き方。『slow_query_log = ON』では設定が反映されない。
『slow_query_log = 1』と書く。

こんなふうに書いたら有効にならない。


[mysqld]
slow_query_log = ON
slow_query_log_file = /var/log/mysql-slow.log
long_query_time = 0.1


mysql で show variables して確認。有効じゃない!!(他の設定は反映されてるのに…)


mysql> show variables like 'slow%';
+---------------------+-------------------------+
| Variable_name       | Value                   |
+---------------------+-------------------------+
| slow_launch_time    | 2                       |
| slow_query_log      | OFF                     |
| slow_query_log_file | /var/log/mysql-slow.log |
+---------------------+-------------------------+
3 rows in set (0.00 sec)
mysql> show variables like 'long%';
+-----------------+----------+
| Variable_name   | Value    |
+-----------------+----------+
| long_query_time | 0.100000 |
+-----------------+----------+
1 row in set (0.00 sec)


『slow_query_log = 1』と書けばOK。


[mysqld]
slow_query_log = 1
slow_query_log_file = /var/log/mysql-slow.log
long_query_time = 0.1


でmysqldを起動するとこんな感じで、Logfile に Versionなどが書き込まれる。


# tail -f /var/log/mysql-slow.log
/usr/libexec/mysqld, Version: 5.1.56-log (MySQL Community Server (GPL) by Remi). started with:
Tcp port: 3306  Unix socket: /var/lib/mysql/mysql.sock
Time                 Id Command    Argument


show variables して確認。OK。


mysql> show variables like 'slow%';
+---------------------+-------------------------+
| Variable_name       | Value                   |
+---------------------+-------------------------+
| slow_launch_time    | 2                       |
| slow_query_log      | ON                      |
| slow_query_log_file | /var/log/mysql-slow.log |
+---------------------+-------------------------+
3 rows in set (0.01 sec)


集計するには『mysqldumpslow』コマンド(実行時間が長い順にソート)
mysqldumpslow -s at /var/log/mysql-slow.log


ウノウラボ by Zynga Japan: MySQLのチューニングのためのデータの集め方


〜mysql 5.0 だとオプションが違う。


long_query_time=1
log-slow-queries=/var/log/mysql/slow.log


touch /var/log/mysql/slow.log
chmod 664 /var/log/mysql/slow.log
chown mysql:mysql /var/log/mysql/slow.log

/var/log/mysql/slow.log のパーミッション注意。

log-queries-not-using-indexes オプションも有効にするといいかも。

HP DL180G6 + CentOS6.3 の hp-health で Segmentation fault。


でもこれはこれで。



※写真と本文は関係ありません。


インストールした環境


$ uname -a
Linux backup2012.localdomain 2.6.32-279.14.1.el6.x86_64 #1 SMP Tue Nov 6 23:43:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/redhat-release
CentOS release 6.3 (Final)
$ rpm -qa |grep ^hp
hpmouse-1.2.1-1.noarch
hponcfg-4.0.1-0.noarch
hp-health-9.1.0.42-54.rhel6.x86_64
hpacucli-9.30-15.0.x86_64
hpvca-7.1.2-0.i386
hp-smh-templates-9.2.5.6-6.all.noarch
hpsmh-7.1.2-3.x86_64
hp-snmp-agents-9.1.0.57-51.rhel6.x86_64
hp-fc-enablement-1.2-14.noarch
hpdiags-9.3.0-466.x86_64


hp-snmp-agentsやhp-health を起動しようとすると 『セグメンテーション違反です』と言われる。
/etc/init.d/hp-snmp-agents start
とすると hp-health の起動スクリプトでエラー。
/etc/init.d/hp-health start
すると当然エラー。

日本語だと。


# /etc/init.d/hp-snmp-agents start  Using Proliant Standard
      IPMI based 1XX System Health Monitor
  Using standard Linux IPMI device driver
Starting ipmi drivers:                                     [  OK  ]
  Starting Proliant Standard
      IPMI based 1XX System Health Monitor (hpasmpld):
/etc/init.d/hp-health: line 666:  2710 セグメンテーション違反です               (コアダンプ) $PNAME $PARGS < /dev/null >> $LOGFILE 2>&1
                                                           [失敗]
/etc/init.d/hp-health: failed to start! Please review log file for details.
The log file locations are documented in the hp-health(4) man page.
#
#
#  /etc/init.d/hp-health start
  Using Proliant Standard
      IPMI based 1XX System Health Monitor
  Using standard Linux IPMI device driver
Starting ipmi drivers:                                     [  OK  ]
  Starting Proliant Standard
      IPMI based 1XX System Health Monitor (hpasmpld):
/etc/init.d/hp-health: line 666:  2922 セグメンテーション違反です               (コアダンプ) $PNAME $PARGS < /dev/null >> $LOGFILE 2>&1
                                                           [失敗]


LANG=C をするとこんな感じ。


# LANG=C /etc/init.d/hp-snmp-agents start
  Using Proliant Standard
      IPMI based 1XX System Health Monitor
  Using standard Linux IPMI device driver
Starting ipmi drivers:                                     [  OK  ]
  Starting Proliant Standard
      IPMI based 1XX System Health Monitor (hpasmpld):
/etc/init.d/hp-health: line 666:  2795 Segmentation fault      (core dumped) $PNAME $PARGS < /dev/null >> $LOGFILE 2>&1
                                                           [FAILED]
/etc/init.d/hp-health: failed to start! Please review log file for details.
The log file locations are documented in the hp-health(4) man page.
#
#
# LANG=C  /etc/init.d/hp-health start
  Using Proliant Standard
      IPMI based 1XX System Health Monitor
  Using standard Linux IPMI device driver
Starting ipmi drivers:                                     [  OK  ]
  Starting Proliant Standard
      IPMI based 1XX System Health Monitor (hpasmpld):
/etc/init.d/hp-health: line 666:  3006 Segmentation fault      (core dumped) $PNAME $PARGS < /dev/null >> $LOGFILE 2>&1
                                                           [FAILED]


いろいろ調べたらHPのメーリングリストに書いてあった。Fix for hp-health on DL100 series running CentOS6

で解決。

mcelogdを止めてからhp-healthを起動するとうまくいくらしい。
/etc/init.d/hp-healthの
# chkconfig: 2345 91 2 を
# chkconfig: 2345 31 2 に直したあと

chkconfig –del hp-health
chkconfig –add hp-health
して、自動起動を設定し直す。

で、ちゃんと起動するようになりました。

サイクルコンピュータを Garmin にしてみた。


2012-11-13 18.26.30


ブレーキとサイクルコンピュータを新しくしたので軽く乗ってきた。(速くなるパーツじゃないのでいまいちテンション上がらないけど…)
木枯らし一号の日で、風がひどかった。もう冬だね。。



GPSついてるので地図が出る!

それはそうと、左股関節の痛みと左足薬指のしびれが治らないー。