2010年6月8日 星期二

[轉貼] hdparm 硬碟測速

http://blog.xuite.net/hsw520/st/28210945

# hdparm -tT /dev/hdX



http://007.vigortec.com/rewrite.php/read-31.html
-T  :測試暫存區 cache 的存取效能
-t  :測試硬碟的實際存取效能 (較正確!)



優化Linux服務器硬盤性能的七個技巧http://www.tekbar.net/zh-tw/technology-innovation/linux-server-disk-performance-optimization-of-the.html

2010年6月3日 星期四

[盜貼]待比較改了哪些東東

視情況裝
透過 rpmforge 安裝yum install cronolog
或 透過下載原始碼安裝wget http://cronolog.org/download/cronolog-1.6.2.tar.gz
tar -zxvf cronolog-1.6.2.tar.gz
cd cronolog-1.6.2
./configure
make
make install
cd ..
rm -rf cronolog-1.6.2*

2010年5月5日 星期三

apache 放ISO 檔下載測試記錄

[root@web-server ~]# mv CentOS-5.4-i386-bin-DVD.iso /var/www/html/




[root@client nfs-share]# wget http://192.168.0.251/CentOS-5.4-i386-bin-DVD.iso
--2010-05-05 10:21:50--  http://192.168.0.251/CentOS-5.4-i386-bin-DVD.iso
Connecting to 192.168.0.251:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4000606208 (3.7G) [application/octet-stream]
Saving to: `CentOS-5.4-i386-bin-DVD.iso'

47% [================>                    ] 1,903,543,032 11.2M/s  eta 3m 5s





[root@web-server ~]# top
top - 10:22:43 up  1:39,  1 user,  load average: 0.16, 0.04, 0.01
Tasks: 108 total,   2 running, 105 sleeping,   0 stopped,   1 zombie
Cpu(s):  1.0%us,  1.3%sy,  0.0%ni, 67.0%id, 12.1%wa,  2.6%hi, 15.0%si,  1.0%st
Mem:    473860k total,   469564k used,     4296k free,      912k buffers
Swap:  1048568k total,      124k used,  1048444k free,   317740k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 2448 apache    16   0 45864 7488 1504 R  2.0  1.6   0:02.04 httpd
 4390 root      15   0  2176 1080  828 R  1.6  0.2   0:00.31 top
  151 root      10  -5     0    0    0 S  0.3  0.0   0:00.35 kswapd0



[root@web-server ~]# top
top - 10:25:30 up  1:42,  1 user,  load average: 0.24, 0.14, 0.04
Tasks: 108 total,   4 running, 103 sleeping,   0 stopped,   1 zombie
Cpu(s):  0.3%us,  2.0%sy,  0.0%ni, 81.5%id,  4.6%wa,  2.3%hi,  8.9%si,  0.3%st
Mem:    473860k total,   469584k used,     4276k free,      708k buffers
Swap:  1048568k total,      124k used,  1048444k free,   321156k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 2448 apache    16   0 45864 7492 1504 R  1.6  1.6   0:06.48 httpd
 4390 root      15   0  2176 1080  828 R  1.6  0.2   0:02.53 top
  151 root      10  -5     0    0    0 S  0.3  0.0   0:00.79 kswapd0
 2096 root      18   0 22948 1352  596 S  0.3  0.3   0:00.23 pcscd
    1 root      15   0  2052  668  572 S  0.0  0.1   0:00.24 init


[root@web-server ~]# top
top - 10:26:09 up  1:42,  1 user,  load average: 0.18, 0.13, 0.05
Tasks: 108 total,   4 running, 103 sleeping,   0 stopped,   1 zombie
Cpu(s):  0.0%us,  2.3%sy,  0.0%ni, 68.4%id,  9.9%wa,  2.0%hi, 16.4%si,  1.0%st
Mem:    473860k total,   470144k used,     3716k free,      720k buffers
Swap:  1048568k total,      124k used,  1048444k free,   321748k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 2448 apache    15   0 45864 7492 1504 D  3.9  1.6   0:07.62 httpd
 4390 root      15   0  2176 1080  828 R  1.0  0.2   0:03.00 top
  151 root      10  -5     0    0    0 S  0.3  0.0   0:00.89 kswapd0
    1 root      15   0  2052  668  572 S  0.0  0.1   0:00.24 init


[root@web-server ~]# top
top - 10:27:16 up  1:43,  1 user,  load average: 0.22, 0.15, 0.06
Tasks: 108 total,   3 running, 104 sleeping,   0 stopped,   1 zombie
Cpu(s):  0.3%us,  0.3%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    473860k total,   469568k used,     4292k free,      740k buffers
Swap:  1048568k total,      124k used,  1048444k free,   321232k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 2324 mysql     15   0  133m  19m 3640 S  0.3  4.3   0:00.25 mysqld
 4390 root      15   0  2176 1080  828 R  0.3  0.2   0:03.79 top
    1 root      15   0  2052  668  572 S  0.0  0.1   0:00.24 init

2010年4月21日 星期三

VM中用Crontab排程跑 ntpdate校時筆記

環境:CentOS5.5
方式:/etc/cron.hourly/ntpdate.sh
記錄檔:/var/log/cron ,及 mail 到 root …一到兩小時記錄一次 (!?)


環境:SLES10
方式:crontab -e,跑 /root/stdtime.sh
crontab -e 裡的 job
有錯會寄信到root
記錄檔:/var/log/messages

環境:SLES10
方式:/etc/cron.hourly/stdtime.sh
/etc/cron.hourly/stdtime.sh 中自訂 echo訊息做記錄....
/usr/sbin/ntpdate clock.stdtime.gov.tw
echo "update time hourly log $(date) " /root/ntpdate-hourly.log
記錄檔:mail 到 root 及自定的log


http://figaro.neo-info.net/?p=666

Cron 執行時通常都會透過 Mail 告訴使用者該排程的執行狀態,若是不想收到這些訊息時,則可以透過下列方式來完成:
1. 以該使用者身份登入後,執行 crontab -e
2. 在所有排程的最上端輸入一行描述
MAILTO=""
這樣便不會再收到相關的郵件訊息了



Host Power Management Causes Problems with Guest Timekeeping (Windows Hosts)

BloggerAds