SaaSes
H/W
hao@rad-xen-vweb6% cat /proc/cpuinfo [~] processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz stepping : 10 cpu MHz : 2667.424 cache size : 2048 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu tsc msr pae cx8 cmov pat pse36 clflush dts mmx fxsr sse sse2 ss ht pbe nx lm constant_tsc up arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm tpr_shadow vnmi flexpriority bogomips : 5334.84 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management:
hao@rad-xen-vweb6% uname -a [~] Linux rad-xen-vweb6 2.6.32-5-xen-686 #1 SMP Wed Mar 9 01:27:54 UTC 2011 i686 GNU/Linux
hao@rad-xen-vweb6% /sbin/ifconfig [~] eth0 Link encap:イーサネット ハードウェアアドレス 00:16:3e:f5:88:76 inetアドレス:163.43.163.162 ブロードキャスト:163.43.163.255 マスク:255.255.254.0 inet6アドレス: fe80::216:3eff:fef5:8876/64 範囲:リンク UP BROADCAST RUNNING MULTICAST MTU:1500 メトリック:1 RXパケット:99205 エラー:0 損失:0 オーバラン:0 フレーム:0 TXパケット:26930 エラー:0 損失:0 オーバラン:0 キャリア:0 衝突(Collisions):0 TXキュー長:1000 RXバイト:18133118 (17.2 MiB) TXバイト:2467791 (2.3 MiB) 割り込み:247 lo Link encap:ローカルループバック inetアドレス:127.0.0.1 マスク:255.0.0.0 inet6アドレス: ::1/128 範囲:ホスト UP LOOPBACK RUNNING MTU:16436 メトリック:1 RXパケット:35 エラー:0 損失:0 オーバラン:0 フレーム:0 TXパケット:35 エラー:0 損失:0 オーバラン:0 キャリア:0 衝突(Collisions):0 TXキュー長:0 RXバイト:5727 (5.5 KiB) TXバイト:5727 (5.5 KiB)
top - 09:53:18 up 13:56, 1 user, load average: 0.01, 1.01, 1.16 Tasks: 51 total, 1 running, 50 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 520852k total, 255584k used, 265268k free, 17556k buffers Swap: 1052248k total, 0k used, 1052248k free, 171212k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1 root 20 0 2052 752 656 S 0.0 0.1 0:00.60 init 2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd 3 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0 4 root 20 0 0 0 0 S 0.0 0.0 0:00.20 ksoftirqd/0 5 root RT 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0 6 root 20 0 0 0 0 S 0.0 0.0 0:00.46 events/0 7 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuset 8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khelper 9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 netns 10 root 20 0 0 0 0 S 0.0 0.0 0:00.00 async/mgr 11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pm 12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 xenwatch 13 root 20 0 0 0 0 S 0.0 0.0 0:00.00 xenbus 14 root 20 0 0 0 0 S 0.0 0.0 0:00.06 sync_supers 15 root 20 0 0 0 0 S 0.0 0.0 0:00.06 bdi-default 16 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/0 17 root 20 0 0 0 0 S 0.0 0.0 0:00.01 kblockd/0 18 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kseriod 20 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kondemand/0 21 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khungtaskd 22 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kswapd0 23 root 25 5 0 0 0 S 0.0 0.0 0:00.00 ksmd 24 root 20 0 0 0 0 S 0.0 0.0 0:00.00 aio/0 25 root 20 0 0 0 0 S 0.0 0.0 0:00.00 crypto/0 29 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khvcd 249 root 20 0 0 0 0 S 0.0 0.0 0:00.18 kjournald 301 root 16 -4 2280 936 476 S 0.0 0.2 0:00.10 udevd 641 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kjournald 820 root 20 0 27332 1508 1060 S 0.0 0.3 0:00.02 rsyslogd 854 root 20 0 34860 7768 4320 S 0.0 1.5 0:01.36 apache2 881 root 20 0 3396 968 772 S 0.0 0.2 0:00.05 cron
root@rad-xen-vweb6# df [~] Filesystem 1K-ブロック 使用 使用可 使用% マウント位置 /dev/xvda3 59833504 1271368 56709524 3% / /dev/xvda1 101118 26707 73367 27% /boot tmpfs 262232 0 262232 0% /dev/shm root@rad-xen-vweb6# mount [~] /dev/xvda3 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) /dev/xvda1 on /boot type ext3 (rw) tmpfs on /dev/shm type tmpfs (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) root@rad-xen-vweb6# cat /etc/fstab [~] LABEL=/ / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 LABEL=SWAP swap swap defaults 0 0 root@rad-xen-vweb6# hdparm -Tt /dev/xvda3 [~] /dev/xvda3: Timing cached reads: 6812 MB in 2.00 seconds = 3408.22 MB/sec Timing buffered disk reads: 270 MB in 3.02 seconds = 89.49 MB/sec root@rad-xen-vweb6# hdparm -Tt /dev/xvda3 [~] /dev/xvda3: Timing cached reads: 6364 MB in 2.00 seconds = 3183.73 MB/sec Timing buffered disk reads: 296 MB in 3.06 seconds = 96.71 MB/sec root@rad-xen-vweb6# hdparm -Tt /dev/xvda3 [~] /dev/xvda3: Timing cached reads: 6864 MB in 2.00 seconds = 3434.80 MB/sec Timing buffered disk reads: 270 MB in 3.13 seconds = 86.15 MB/sec
unixbench
hao@rad-xen-vweb6% ./Run [~/work/unixbench-5.1.2] make all make[1]: Entering directory `/home/hao/work/unixbench-5.1.2' Checking distribution of files ./pgms exists ./src exists ./testdir exists ./tmp exists ./results exists make[1]: Leaving directory `/home/hao/work/unixbench-5.1.2' locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory sh: 3dinfo: not found sh: runlevel: not found # # # # # # # ##### ###### # # #### # # # # ## # # # # # # # ## # # # # # # # # # # # ## ##### ##### # # # # ###### # # # # # # ## # # # # # # # # # # # # ## # # # # # # # ## # # # # #### # # # # # ##### ###### # # #### # # Version 5.1.2 Based on the Byte Magazine Unix Benchmark Multi-CPU version Version 5 revisions by Ian Smith, Sunnyvale, CA, USA December 22, 2007 johantheghost at yahoo period com 1 x Dhrystone 2 using register variables 1 2 3 4 5 6 7 8 9 10 1 x Double-Precision Whetstone 1 2 3 4 5 6 7 8 9 10 1 x Execl Throughput 1 2 3 1 x File Copy 1024 bufsize 2000 maxblocks 1 2 3 1 x File Copy 256 bufsize 500 maxblocks 1 2 3 1 x File Copy 4096 bufsize 8000 maxblocks 1 2 3 1 x Pipe Throughput 1 2 3 4 5 6 7 8 9 10 1 x Pipe-based Context Switching 1 2 3 4 5 6 7 8 9 10 1 x Process Creation 1 2 3 1 x System Call Overhead 1 2 3 4 5 6 7 8 9 10 1 x Shell Scripts (1 concurrent) 1 2 3 1 x Shell Scripts (8 concurrent) 1 2 3 ======================================================================== BYTE UNIX Benchmarks (Version 5.1.2) System: rad-xen-vweb6: GNU/Linux OS: GNU/Linux -- 2.6.32-5-xen-686 -- #1 SMP Wed Mar 9 01:27:54 UTC 2011 Machine: i686 (unknown) Language: en_US.utf8 (charmap="ANSI_X3.4-1968", collate="ANSI_X3.4-1968") CPU 0: Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz (5334.8 bogomips) Hyper-Threading, x86-64, MMX, Physical Address Ext, Intel virtualization 09:18:59 up 13:22, 1 user, load average: 0.06, 0.01, 0.00; runlevel ------------------------------------------------------------------------ Benchmark Run: 木 4月 07 2011 09:18:59 - 09:47:08 1 CPU in system; running 1 parallel copy of tests Dhrystone 2 using register variables 13255825.4 lps (10.0 s, 7 samples) Double-Precision Whetstone 2451.2 MWIPS (10.1 s, 7 samples) Execl Throughput 2172.8 lps (29.9 s, 2 samples) File Copy 1024 bufsize 2000 maxblocks 400909.1 KBps (30.0 s, 2 samples) File Copy 256 bufsize 500 maxblocks 126682.7 KBps (30.0 s, 2 samples) File Copy 4096 bufsize 8000 maxblocks 884199.5 KBps (30.0 s, 2 samples) Pipe Throughput 708631.7 lps (10.0 s, 7 samples) Pipe-based Context Switching 100837.7 lps (10.0 s, 7 samples) Process Creation 4168.9 lps (30.0 s, 2 samples) Shell Scripts (1 concurrent) 3769.5 lpm (60.0 s, 2 samples) Shell Scripts (8 concurrent) 500.0 lpm (60.1 s, 2 samples) System Call Overhead 541839.5 lps (10.0 s, 7 samples) System Benchmarks Index Values BASELINE RESULT INDEX Dhrystone 2 using register variables 116700.0 13255825.4 1135.9 Double-Precision Whetstone 55.0 2451.2 445.7 Execl Throughput 43.0 2172.8 505.3 File Copy 1024 bufsize 2000 maxblocks 3960.0 400909.1 1012.4 File Copy 256 bufsize 500 maxblocks 1655.0 126682.7 765.5 File Copy 4096 bufsize 8000 maxblocks 5800.0 884199.5 1524.5 Pipe Throughput 12440.0 708631.7 569.6 Pipe-based Context Switching 4000.0 100837.7 252.1 Process Creation 126.0 4168.9 330.9 Shell Scripts (1 concurrent) 42.4 3769.5 889.0 Shell Scripts (8 concurrent) 6.0 500.0 833.3 System Call Overhead 15000.0 541839.5 361.2 ======== System Benchmarks Index Score 629.1 hao@rad-xen-vweb6% [~/work/unixbench-5.1.2]
OS
[/etc/crontab] SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # run-parts 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root run-parts /etc/cron.daily 22 4 * * 0 root run-parts /etc/cron.weekly 42 4 1 * * root run-parts /etc/cron.monthly
パッケージ他
apt-get install
- lv
- subversion
- zsh
- roundcube-core
- roundcube-sqlite
- ruby 導入済み
- irb 導入済み
- qwik パッケージ無い
- libapache2-svn (mod_davはapache2.2-commonで導入済み、mod_encodingは導入されていないが、WebDAVの日本語は問題無し、これってWin9xがいなければOKなんだっけか?)
- libalgorithm-diff-ruby1.8
% sudo ln -s /usr/lib/ruby/1.8/algorithm/diff.rb /usr/lib/ruby/1.8/
これやらないと、require 'diff'できない (???)
- libdifflcs-ruby1.8 (たぶん不要)
- telnetd
- dovecot-imapd (hostnameが解決できる(/etc/hosts)状態にしておかないとインストールが失敗する)
- fetchmail
- graphviz
- ttf-vlgothic
- nkf
- gcc
- sysstat (/proc/diskstatが無いのでiostatは動かない、muninのiostatプラグインも)
- munin
root@dti-vps-srv33# pwd /etc/munin/plugins root@dti-vps-srv33# ln -s /usr/share/munin/plugins/apache_accesses . root@dti-vps-srv33# ln -s /usr/share/munin/plugins/apache_processes . root@dti-vps-srv33# ln -s /usr/share/munin/plugins/apache_volume .
- liblwp-useragent-determined-perl
- lftp
- ddclient
a2enmod
- dav_fs
- ssl
sudo
debx# diff -uw sudoers.org sudoers --- sudoers.org 2011-03-31 09:16:48.000000000 +0900 +++ sudoers 2011-04-01 17:10:39.000000000 +0900 @@ -6,6 +6,7 @@ # Defaults env_reset +Defaults env_keep += HOME # Host alias specification
vpnclient
insserv: warning: script 'S85vpnclient_init' missing LSB tags and overrides insserv: warning: script 'vpnclient_init' missing LSB tags and overrides insserv: There is a loop at service vpnclient_init if started insserv: There is a loop between service vpnclient_init and mountnfs if started insserv: loop involving service mountnfs at depth 7 insserv: loop involving service networking at depth 6 : :
rcに導入される初期化スクリプトの、RedHatライクなヘッダが気に入らないらしい。
[vpnclient_init] #!/bin/sh ########################################################################## # Copyright (c) 2001, Cisco Systems, All Rights Reserved ########################################################################### # # File: vpnclient_init # Date: 04/23/2001 # ########################################################################### # # chkconfig: 345 85 85 # description: Startup script for the vpn client. Version 4.8.02 (0030) # ###########################################################################
他のプロダクトのスクリプトを真似て適当に書き換えてみる。
[/etc/init.d/vpnclient_init] #!/bin/sh ########################################################################## # Copyright (c) 2001, Cisco Systems, All Rights Reserved ########################################################################### # # File: vpnclient_init # Date: 04/23/2001 # ### BEGIN INIT INFO # Provides: vpnclient # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: # Short-Description: Cisco VPN client Version 4.8.02 (0030) ### END INIT INFO
これでaptは文句を言わなくなったが、あくまで適当。 Default-Start:は2 3 4 5にしてあって、本当に動いて欲しいのは2なのだが、 rc2.dには入っていない。rc[3-5].dには入っている。 良くわからんけど、rebootの機会はほとんど無いはずなので、とりあえず良しとする。
rc2.dなどの中の順番を決める番号(/etc/rc2.d/S85vpnclient_initの85とか)を書く場所が無く、 依存するサービス(ここでは$remote_fs、$syslog、これも適当)だけが書かれている。 この結果、例えばrc3.dの下はこんな感じになる。
root@rad-xen-vweb6# ls rc3.d [/etc] README S02ntp@ S02webmin@ S05rmnologin@ S01bootlogs@ S02openbsd-inetd@ S03apache2@ S05stop-bootlogd@ S01rsyslog@ S02ssh@ S04cron@ S01sudo@ S02sysstat@ S05munin-node@ S02mysql@ S02vpnclient_init@ S05rc.local@
85とか95とか無くて、01から05まで順番にふられている。 依存関係を解決できる範囲で、できるだけ重複した番号をふる、 同じ番号は同時に起動して多重度を上げることで、bootの時間短縮を図る、ということか。
Last modified: 2014-02-25 by Unknown