UNIX的なアレ:gihyo.jp出張所

第2回知っておきたいスケールアウトの基礎知識 その1










調3


(一)IP

(二)

(三)


12

Apachemod_accessmod_evasiveiptablesIP

3

調


調調

CPUMemorysarSystem Admin ReporterOSsysstat
CentOS
$ sudo yum install sysstat
Debian GNU/LinuxUbuntu
$ sudo apt-get install sysstat

/etc/cron.dcron

11

sar

使sar
sar
-u CPU使用状況
-b ディスクI/Oの使用状況
-r メモリとスワップの使用状況
CentOSDebian GNU/LinuxUbuntu
$ sar 
19時4517秒       CPU     %user     %nice   %system   %iowait    %steal     %idle
19時5001秒       all     82.02      0.00      0.19      0.08      0.00     17.71
平均値:              all     82.02      0.00      0.19      0.08      0.00     17.71

saruserCPU使CPU

Memory-r 使
CentOSDebian GNU/LinuxUbuntu
$ sar -r
19時4517秒 kbmemfree kbmemused  %memused kbbuffers  kbcached kbswpfree kbswpused  %swpused  kbswpcad
19時5001秒    287080    228444     44.31     16652    155540   1048568         0      0.00         0
平均値:           286718    228806     44.38     16790    155836   1048568         0      0.00         0



sarMRTG


MRTG
http://www.mrtg.jp/doc/


sar使

ProcessWeb

4


(一)Web ServerApache etc...

(二)Application mod_perlTomcat etc...

(三)DatabaseMySQL , PostgresSQL etc...

(四)cronbatch


pscpu/memory5
CentOSDebian GNU/LinuxUbuntu
$ ps aux | sort -nr -k2 | head -5  # cpuの取得
$ ps aux | sort -nr -k3 | head -5  # memoryの取得

cronsar調


使

CPU使CPUCPU使MemoryMemory1G4G



使使


 

おすすめ記事

記事・ニュース一覧