Jay's Room

思ったこと、感じたこと、未来の自分に伝えたいことを記していきたい
Linux / Server
all |  1  |  2  |  3  |  4 
2010年12月19日

qmailanalogでログが正常に集計されない

昨日になって急に気付いたのだが、日時でログを集計しているのqmailanalogが正常に動いていないみたい。

こんな感じで一件集計されているように見えるけど、
deferralのメッセージがあるのにzdeferralsのデータがなかったり、
zrhosts・zfailures・zsuids・zdeferralsが動いていない模様。

-----------Result of zoverall------------

Basic statistics

qtime is the time spent by a message in the queue.

ddelay is the latency for a successful delivery to one recipient---the
end of successful delivery, minus the time when the message was queued.

xdelay is the latency for a delivery attempt---the time when the attempt
finished, minus the time when it started. The average concurrency is the
total xdelay for all deliveries divided by the time span; this is a good
measure of how busy the mailer is.

Completed messages: 153
Recipients for completed messages: 153
Total delivery attempts for completed messages: 153
Average delivery attempts per completed message: 1
Bytes in completed messages: 1501110
Bytes weighted by success: 1501110
Average message qtime (s): 1.12839

Total delivery attempts: 153
success: 153
failure: 0
deferral: 0
Total ddelay (s): 165.507989
Average ddelay per success (s): 1.081752
Total xdelay (s): 122.277667
Average xdelay per delivery attempt (s): 0.799200
Time span (days): 0.945623
Average concurrency: 0.00149663

-----------Result of zddist------------
Distribution of ddelays for successful deliveries

Meaning of each line: The first pct% of successful deliveries
all happened within doneby seconds. The average ddelay was avg.

doneby avg pct
0.27 0.17 10
...
4.24 1.08 100

-----------Result of zdeferrals------------
Reasons for deferral

One line per reason for deferral. Information on each line:
* del is the number of deliveries that ended for this reason.
* xdelay is the total xdelay on those deliveries.

del xdelay reason

-----------Result of zfailures------------
Reasons for failure

One line per reason for delivery failure. Information on each line:
* del is the number of deliveries that ended for this reason.
* xdelay is the total xdelay on those deliveries.

del xdelay reason

-----------Result of zrhosts------------
Recipient hosts

One line per recipient host. Information on each line:
* sbytes is the number of bytes successfully delivered to this host.
* mess is the number of messages sent to this host (success plus failure).
* tries is the number of delivery attempts (success, failure, deferral).
* xdelay is the total xdelay incurred by this host.

sbytes mess tries xdelay host

-----------Result of zsuids------------
Sender uids

One line per sender uid. Information on each line:
* mess is the number of messages sent by this uid.
* bytes is the number of bytes sent by this uid.
* sbytes is the number of bytes successfully received from this uid.
* rbytes is the number of bytes from this uid, weighted by recipient.
* recips is the number of recipients (success plus failure).
* tries is the number of delivery attempts (success, failure, deferral).
* xdelay is the total xdelay incurred by this uid.

mess bytes sbytes rbytes recips tries xdelay uid

-----------Result of zrxdelay------------
Recipients in the best order for mailing lists

One line per recipient, sorted by avg. Information on each line:
* avg is the _average_ xdelay for the recipient.
* tries is the number of deliveries that avg is based on.

avg tries recipient
0.10 36 local.soph.jp-xxxxxxxx@soph.jp
0.38 15 remote.xxxxxxxxxx@i.softbank.jp
0.42 28 local.soph.jp-xxxxxxxxx@soph.jp
0.63 2 remote.xxxxxxxx@xxx.ocn.ne.jp
2.63 28 remote.xxxxx@gmail.com
...

» 続きを読む
2010年11月27日

VMware Converter

サーバーの音や電力消費が気になってきて、Dell PowerEdge1800からFujitsuTX100 S1に換えることにしました。

これを機に物理サーバから仮想サーバに移行することにしたので、VMwareConverterを使って移行してみました。

手順通り進めてるとエラーで終了してしまって、何度試しても同じ現象。

いろいろ調べてみたら、なぜか/var/log/lastlogのサイズが1TB以上ある。
ハードディスクのサイズは420GBぐらいしかないから、明らかにおかしい。
削除してから再度VMwareConverterを実行すると移行完了。

ここにも同様の現象があるとの報告があった。
VMware Communities: P2V RedHat Linux failed ...

Linux強制リブート

今日はmysqlとかphpとかコンパイルしているうちにファイルシステムにエラーが見つかってReadOnlyになってしまった。
それからというものreboot とか shutdown -r now とか全く効かなくて、再起動できなくて本当に困った。

探してみるとこんな方法もあるんだ。

ぴょぴょぴょ? - Linuxとかプログラミングの覚え書き linux を強制リブートする方法

linux を強制的に遠隔から再起動する方法。

# echo b > /proc/sysrq-trigger

これだけ。

無事に再起動して復旧。超助かりました。

2008年8月23日

MovableType Perlのパスを一括変換

いつもPerlのパスを入力して変更していたんだけど、めんどくさいので一括で変更できる方法を調べてみた。

bashとsedで複数ファイルのテキストを置換する方法 - Vik's Linux Tips

こちらを参考にしてこんな風に変更

find . -name "*.cgi" -exec sed -i 's/\/usr\/bin\/perl/\/usr\/local\/bin\/perl/' {} \;

これでMovableTypeのアップデートも簡単にできるようになった。

2008年7月 6日

CentOS 5.2 アップグレード

CentOS 5.2 が6月24日にリリースされていたので、いつも通りアップグレード。

今回は公式にアップグレードにはyumを使えってアナウンスされているから、安心して出来る。

yum upgradeをやってみると、700以上のパッケージがインストールされて、無事アップグレードできた。大体20分ぐらいで終わったかな。

[CentOS-announce] Release for CentOS-5.2 i386 and x86_64

Updating from CentOS-5.0 and 5.1

If you are already running CentOS-5 ( either 5.0 or 5.1 ), all you need to do is run : "yum upgrade" on your machine, and that will bring in the new packages from 5.2 and update your machine. Note that the command required is 'upgrade' and not the usual 'update'. Refer to the yum man page for details on how those two differ in operation.

2008年6月28日

サーバ再開

意外と早くサーバを復活できました!

IPも変わらずなので、設定もそのまま。フレッツだと移転は楽ちんだね。

サーバ止まります

引越しするので、サーバを一時止めます。

いつ復活できるかな?

2008年6月 9日

ハードディスクが壊れました

朝メールが受信できなくなっていると思ってサーバにログインしたら、コマンドがどれもこれもI/Oエラーで動かなくなっていた。これは...と思って原因を調べてみたら、Raidのハードディスクが1本壊れてました。

替えのHDを持っていなかったので、早速ヤフオクで購入。すぐにバックアップを取って翌々日には交換したけど、その間にもう一本壊れたらと思うとヒヤヒヤした。

このblogのデータがなくなったら結構ショックだろうな。壊れてみて分かる、バックアップの大切さだね。自動バックアップの方法を考えなきゃ。

all |  1  |  2  |  3  |  4 
Made with dreamweaverMade with fireworksPowered by Movable Type 5.12Powered by Wandering Windbeta_tester.gif
Copyright : [Articles] (C) Jay's Room All Rights Reserved.
[Comments/Trackbacks] ... Authors of those have rights.