ELRepoã®specãåèã«kmod対å¿ãã©ã¤ãããã«ããã話
Intelã®igbãã©ã¤ããªããã¯ãtarballã«specãå«ã¾ãã¦ãã¦
rpmbuild -ta ./SOURCES/igb-3.4.7.tar.gz
ãããªæãã§ãããã«ãã§ããã¹ãããªæãã«ãªã£ã¦ãã¾ãã
ãããããããã¨ãã«ãæã®kernelã«ä¾åãããã©ã¤ããã§ãã¦ãã¾ãããã
ã¨ã©ãã¿ã§ã«ã¼ãã«ã®ã¢ãããã¼ããå
¥ã£ãå ´åã«æ¢å®ã®ãã©ã¤ãã«æ»ã£ã¦ãã¾ãã¾ãã
Redhat/CentOSã«ã¯ãKMP (Kernel Module Package)ãkmodã¨ããã«ã¼ãã«ã«è¿½å¾ããããã®ä»çµã¿ãããã®ã§ãããããã£ã¦ã¿ã¾ããã
KMP/kmodã®ä»çµã¿èªä½ã¯ãã¡ãã®ãã¼ã¸ãããã¾ã¨ãã¦ããã ãã¦ãã¾ãã
http://d.hatena.ne.jp/dayflower/20090728/1248754899
KMP対å¿ã®ã¢ã¸ã¥ã¼ã«ããã«ãããããã®æå¼ããCentOSã®å ¬å¼Wikiã«ããã¾ãã*1
http://wiki.centos.org/HowTos/BuildingKernelModules#head-b86b6eec08d5719cf1838929f26a64af88e2b7f0
ã§ãæå¼ãããã¨ã«å¯¾å¿ã®ããã®ãããããªæé ããã£ã¦ã¿ã¦ããã®ã§ããããã£ããé£ããè¦æ¦ãã¦ããã¨ãã以ä¸ã®ãããªãã®ãããã¾ããã
ELRepo
http://elrepo.org/
ååã ãã¯ç¥ã£ã¦ããã®ã§ãããã¼ãã¦ã§ã¢ã«é¢ããããã±ã¼ã¸ãæä¾ããããã¸ã§ã¯ãã¨ã®ãã¨ã§ãä¸è¨ã®CentOSã®Wikiãã¼ã¸ãè¨è¿°ãããæ¹*2ãfounderã®ä¸äººã«ãªã£ã¦ããã£ãããã¿ããã
ããã«kmod対å¿çã®igbãe1000eãªã©ãå種ã®ããã±ã¼ã¸ãããã¾ãããã®ã¾ã¾ä½¿ãããã§ãããåå¼·ã«ãªãã®ã§SRPMããåããã±ã¼ã¸ãã¦ã¿ã¾ããã
SRPMãã¤ã³ã¹ãã¼ã«ããã¨ããããªæãã®ãã¡ã¤ã«ãå±éããã¾ããigbã®å ´åã
SPECS/igb-kmod.spec SOURCES/igb-X.X.X.tar.gz SOURCES/kmodtool-igb-el6.sh
kmodtool-igb-el6.shãkmodã®ããã®ãã«ãã¼ã¹ã¯ãªããã
詳細ã¯å²æãã¾ãããkmodtoolã¹ã¯ãªããä¸ã§Providesãªã©ã®æå®ãè¡ããã¦ãã¾ããç§ã¯ä»¥ä¸ã®å¤æ´ã ãå
¥ãã¦ã¿ã¾ããã
Provides: ${kmod_name}-kmod = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: ${kmod_name}-kmod = %{?epoch:%{epoch}:}%{version}-%{release} Obsoletes: ${kmod_name}
ä¸è¨ã®SRPMããã®ã¾ã¾ãã«ãããã¨kmod-igbã¨ããããã±ã¼ã¸ã§ããããã®å¤æ´ã§æ¢åã®igbãkmod対å¿ã«yumãå
¥ãæ¿ãã¦ãããããã«ãªãã¾ããã
ãã§ãããã§ããã
ã¡ãªã¿ã«RHEL/CentOSã®ããã©ã«ãã®ãã©ã¤ãã¯å½ç¶ãªããkmodã使ããã¦ãã¾ããigb-3.0.6_k-2.el6_1.src.rpmã¨ããã®ããããä»åã¯è¦ã¦ãªãã§ããããã¡ãããã¼ã¹ã«ä½¿ã£ã¦ãããããã
次ã¯ãªãã«ããããªãã¦ä¸ãããã£ã¦ã¿ãããªã¼ã
PXE/kickstartã«ãããããã¯ã¼ã¯ã¤ã³ã¹ãã¼ã«æã«ãã©ã¤ãã追å ãã
CentOS6.2ã®å ´åããªãã·ã§ã³ã¯ã»ã¼5.xç³»ã§ãåãã
â ãã¼ãæã«æå®
http://docs.redhat.com/docs/ja-JP/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-kickstart2-startinginstall.html
boot: linux ks=hd:partition:/path/ks.cfg dd
ãã®å ´åããããã¯ã¼ã¯ä¸ã®å ´æã¯æå®ã§ããªãã£ã½ãã
â ksãã¡ã¤ã«ã«è¨è¿°
http://docs.redhat.com/docs/ja-JP/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-kickstart2-options.html
driverdisk (ãªãã·ã§ã³) driverdisk <partition> --source=<url> --biospart=<biospart> [--type=<fstype>] å¥ã®æ¹æ³ã¨ãã¦ããããã¯ã¼ã¯ã®å ´æããã©ã¤ãã¼ãã£ã¹ã¯ç¨ã«æå®ã§ãã¾ãã driverdisk --source=http://path/to/dd.img
â ãã¾ã
追å ãããã©ã¤ããã¦ã¼ãã£ãªãã£ãRHELç¨ã¨ãã§WARNINGãåºãå ´åã¯ãpackagesã»ã¯ã·ã§ã³ã«ignoremissingãã©ã°ã追å ããã¨ããã³ãããåé¿ã§ãã¾ãã
http://docs.redhat.com/docs/ja-JP/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-kickstart2-packageselection.html
%packages --ignoremissing
Zabbix 2.0.0 ãã¤ã³ã¹ãã¼ã«å¾ã«ã¾ããã£ã¦ããããã¨
ã¤ã³ã¹ãã¼ã«æé ã¯çç¥
主ã«2.0.0ã®æ°æ©è½ãæ©ãã«è©¦ããã人åãã
ãã£ã¹ã«ããªã«ã¼ã«ã®è¨å®
ã¨ããããä¸è¨ã®ããã«ãã¦ã¿ã¦æ¤è¨¼ä¸ã
è¨å®->ãã³ãã¬ã¼ã->"Template OS Linux"ã®ãã£ã¹ã«ããªã«ã¼ã«
Network Interface discovery
æ£è¦è¡¨ç¾ã®é ç®ãæ¸ãæã -> (eth[0-9])|(bond[0-9])
Mounted filesystem discovery
ãã¯ãã®é ç®ãæ¸ãæã -> {#FSNAME} æ£è¦è¡¨ç¾ã®é ç®ãæ¸ãæã -> (^\/$)|(^\/data)
ã¨ã¯ãããã¾ã ãã¾ãæ¤åºãå®å®ãã¦ããªãããã«æãããã¨ããã£ã¹ã«ããªã«ã¼ã«ã«ããã¢ã¤ãã ã¯ä»ã®ã¨ãããã¹ãã¹ã¯ãªã¼ã³ã«ç»é²ã§ããªãã®ã§ãeth0/eth1ããã£ã¹ã¯ç£è¦ãªã©ã¯éå»ã®ãã³ãã¬ã¼ãéãã¢ã¤ãã ãä½ã£ã¦ãããã»ããããããã§ãã
èªåç»é²ã¢ã¯ã·ã§ã³ã®è¨å®
è¨å®->ã¢ã¯ã·ã§ã³->ã¤ãã³ãã½ã¼ã¹ï¼èªåç»é²->ã¢ã¯ã·ã§ã³ã®ä½æ
ä»ã®ã¨ãããã¹ãåã§ããå¤æã§ããªãããZabbix Agentããã¢ã¯ãã£ãæ¥ç¶ããã£ãã¨ãã«èªåã§ãã¹ãç»é²ãããããã«ãªããå®è³ªAgentãã¤ã³ã¹ãã¼ã«ããã ãã¾ã§ç°¡ç¥åã§ããã
èªåç»é²ã¢ã¯ã·ã§ã³ã¯æå¹ã«ãªã£ã¦ãããã®ããã¹ã¦å¤å®ããããããªã®ã§ãç¡æ¡ä»¶ã§Linuxã®ãã³ãã¬ã¼ãã«å
¥ããå¾ãdbãmysqlã®ãããªæååããããã®ã«ã¯è¿½å ã§MySQLã®ãã³ãã¬ã¼ããé©ç¨ãã®ãããªãã¨ãã§ããã
æ¡ä»¶ãçµã¿åãããã¨ãã¯ANDæ¡ä»¶ã«æ³¨æã
ãã¹ãã°ã«ã¼ãããããã«å±é
âè¨å®->ãããã¯ã¼ã¯ãããã®è¨å® ã§ããããä½æ
âãããã«ã¢ã¤ã³ã³ã追å ããé©å½ãªãã¹ãã°ã«ã¼ããæå®ï¼ãããã®ä¿åãå¿ããã«ï¼
âãããããæ°ã«å
¥ãã«ç»é²ï¼ããã·ã¥ãã¼ãããã¢ã¯ã»ã¹å¯è½ã«ãã¦ããï¼
ãã³ãã¬ã¼ãã«ç´ä»ãããã¹ãã¹ã¯ãªã¼ã³ã¨ããæ©è½ã使ããã®ã ãã©ãé害æ以å¤ã©ãããè¦ã«è¡ã£ãããããããããªãä¸è¦ªåä»æ§ããªã®ã§ãæ«å®çã¨ãã¦é©å½ãªãã¹ãã°ã«ã¼ãããããã«å±éããã¦ããããã£ããéãããã¬ã³ããã¼ã¿ãè¦ã¦ãµã¼ãã¼ã®èª¿æ´ããããªããåå¥ã®ãµã¼ãã¼ã®æ
å ±ã¸ã¯ããã¦ããã·ã¥ãã¼ããã2ã¯ãªãã¯ä»¥å
ï¼ãã¤ãã¼å
¥åãªãçï¼ã§è¡ããªãã¨ããã¤ãä½ãããããä½ã£ãã»ããããããã
ããã¤ãã®ã¢ã¤ãã ã®è¿½å
âDisk read/write ã®åå¾
ãã¾ãå¿
è¦ã®ãªãããªã¬ã¼ãã¢ã¤ãã ãçãããã®ã¯ããã¨æãããããªãããã£ã¹ã¯é¢é£ãçããã¦ãã¾ã£ãã
æä½éãvfs.dev.read[,ops]ãvfs.dev.write[,ops] ãããã¯è¿½å ãå¿
è¦ã
âZabbixServerã®ã¢ã¤ãã æ°ã®åå¾
"Template App Zabbix Server" ã« zabbix[items] ã追å ãã¦ããã
ããã¨DiskãMySQLã®ã°ã©ããåãããã°ãã©ã®ãããã®ã¢ã¤ãã æ°ã§ã©ã®ãããã®è² è·ã«ãªããå¾ã
ã®åèã«ã
LDAPã®è¨å®
LDAPã§ã¦ã¼ã¶ã¼ç®¡çããããã«ç®¡ç->èªè¨¼ã®èªè¨¼æ¹å¼ãå¤æ´ããã
LDAPãµã¼ãã¼ã«æ¥ç¶ã§ããªãæã®ããã管çè
ã°ã«ã¼ãï¼Zabbix Local Administratorsçï¼ãä½æãã¦ãã°ã«ã¼ãã®èªè¨¼æ¹å¼ãZabbixã®ãã¼ã«ã«èªè¨¼ã«å¤æ´ããAdminããã¡ãã«ç§»ãã¦ããããã«ãã¤ã³ã®Zabbix Administratorsã¯ã·ã¹ãã ããã©ã«ãåºå®ã®ããã
Linuxãµã¼ãã¼ã«SSDã使ãããã®æ å ±ã¡ã¢
Trimå¨ããæè¿ã©ããªã£ã¦ããã®ã調ã¹ã¦ãã¾ãããããã以å¤ã®æ å ±ãã¾ã¨ã¾ã£ã¦ãããã®ã®ãæ¡å¤å°ãªãã£ãã®ã§ã
Trimããµã¼ãã¼ã§ä½¿ããï¼
# Trimã³ãã³ãã®ãµãã¼ãã®ç¢ºèªï¼SSDå´ï¼ hdparm -I /dev/sda | grep -i TRIM * Data Set Management TRIM supported
Trimã³ãã³ãã®çºè¡ã«ã¯SSDãSATAã®AHCIã¢ã¼ãã§æ¥ç¶ãããã¨ãå¿
è¦ã
RAIDã«ã¼ãçµç±ã§SSDãæ¥ç¶ããå ´åãSSDãç´æ¥æ±ããªãã®ã§Trimã¯ä½¿ããªãã
2012/05ç¾å¨ãTrimã«å¯¾å¿ããRAIDã«ã¼ãã¯ãªãããã ã
ï¼ãã ããext4ã®discardã³ãã³ãã¯å
é¨çã«ã¯SCSIããã¤ã¹ã«å¯¾ãã¦UNMAPã³ãã³ããçºè¡ãããã®ã§ãä»å¾RAIDã«ã¼ãå´ãATAã³ãã³ãã®Trimã«å度å¤æãã¦ãããã°â¦ï¼ç¡çããªï¼
ä¸è¬çãª1Uãµã¼ãã¼ã§ã¯ã»ã¨ãã©ãããã³ããã¤ããããã¯ãã¬ã¼ã³ã®miniSASçµç±ã§å
èµã®RAIDã«ã¼ãã¸æ¥ç¶ããå½¢æ
ãåããã¦ãããããM/Bã®SATAãã¼ãã¸Single Connectã§ããªããã¤ã¾ãããã®ç¶æ
ã§ã¯ã©ããããã¦ãTrimãå©ç¨ãããã¨ã¯ä¸å¯è½ã
RAIDã«ã¼ããçç¥ãããªã³ãã¼ãã®ãããã§RAIDãå®ç¾ãã¦ããã¿ã¤ãã®å®ä¾¡ãªãµã¼ãã¼ï¼1U/ãã¼ãUçï¼ã§ã¯ããã©ã¤ãã¨M/Bã®SATAãã¼ããç´æ¥æ¥ç¶ããã¦ããå ´åãããããã®å ´åã¯å
èµã®RAIDæ©è½ãOFFã«ãããã¨ã§AHCIãå©ç¨ã§ããå ´åãããããBIOSã«è¨å®ããªãã¸ã£ã³ããã³ãå¤æ´ããªããã°ãããªããã®ãããã
Trimã³ãã³ãã®Linuxå´ãµãã¼ãã¯Kernel 2.6.33ããã
CentOSã®å ´å6ç³»ããã(2.6.32ã ãããã¯ãã¼ãæã)
ãã¤ããã¡ã¤ã«ã·ã¹ãã ã«ext4ãå©ç¨ã®å ´åã®ã¿ã
ãã¦ã³ããªãã·ã§ã³ã«discardãæå®ã
Trimã³ãã³ãã®åä½ç¢ºèª
ãã¡ãã詳ããã
http://d.hatena.ne.jp/sh2/20110123
æ»ãå¤ã0ã®å ´åãTrimãæå¹ã«ãªã£ã¦ããããã以å¤ã®å ´åï¼return=-95ã1åã ãçï¼ã¯ãTrimãã§ããªãã¨è¿ããã¦ããã
ä¸è¿°ã®çç±ã§ãSSDãTrim対å¿ã§ãæ®ã©ã®å ´åãµã¼ãã¼ã§ã¯ä½¿ããªãã確èªå¿
é ã
ãã®ä»Linuxã®SSDã«é¢ãããã¨
è¨å®ã®ç¢ºèªãªã©
# SSDãã©ãã cat /sys/block/sda/queue/rotational 0 -> SSD 1 -> HDD hdparm -I /dev/sda | grep -i ssd # 大æµã¯åçªã ã # 使ããªãå ´åã¯yum install hdparm
SecureErase (SSDãªãã¬ãã·ã¥)
hdparmã使ã
# SecurityCommandçºè¡å¯è½ãªç¶æ ãã»ãã hdparm --user-master u --security-set-pass xxxxxxxx /dev/sdx # SecureEraseãå®è¡ hdparm --user-master u --security-erase xxxxxxxx /dev/sdx
PartedMagic
http://sourceforge.jp/projects/sfnet_partedmagic/
Knoppixã¨ãUbuntuã®LiveCDããã¯ãããã
I/Oã¹ã±ã¸ã¥ã¼ã©ã¼ã®è¨å®
I/Oããã¥ã¼ãããã©ãã
cat /sys/block/sdb/queue/scheduler # default noop anticipatory deadline [cfq] # è¨å®ã®å¤æ´ echo deadline > /sys/block/sda/queue/scheduler cat /sys/block/sdb/queue/scheduler noop anticipatory [deadline] cfq
SSDã§ã¯noopãdeadlineãæ¨å¥¨ããã¦ãããã¨ãå¤ãã
http://www.velobit.com/storage-performance-blog/bid/126135/Effects-Of-Linux-IO-Scheduler-On-SSD-Performance
ããã®çµæãè¦ãã¨ãcfqãåçã«é
ãããã§ã¯ãªãã®ã§ããã¦noopã«å¤ããªãã¦ãããããã§ã¯ããã
noopã«å¤ããã5åæ©ãã¨ãã¯ãªãã§ããã·ã³ã°ã«ã¹ã¬ããã§æ¸ãè¾¼ãã§ããã¨ãããªãã¨ãããã¹ãé
ç®ã®åé¡ã
AHCIã®æå¹å
ã ãããBIOSã§å¤æ´ããã ãã
éç¨ã«é¢ãããã¨
åé·å/RAID
å
èµã®RAIDã«ã¼ããã¨ã³ããªã¯ã©ã¹ã§ããã°RAID1çã§éã«è¶³ãå¼ã£å¼µãã®ã§ãããã«ã¯ã©ã¹ä»¥ä¸ã®RAIDã«ã¼ãï¼WriteCacheä»ãã®ãã®ï¼ãæ¨å¥¨ã
RAIDã«ã¼ãçµç±ã§ãã¤RAIDæ§ç¯æ¸ã¿ã ã¨æ§è½å£åããªãã¬ãã·ã¥ããæ段ããªãã®ã§ã大æã¡ã¼ã«ã¼è£½ã§SSDããªãã·ã§ã³ã§é¸æå¯è½ãªãµã¼ãã¼ç¾¤ã§ã¯æ§è½å£åã®å°ãªããä¿¡é ¼æ§ãé«ã(ã¨ããã)Intel製ã使ã£ã¦ããããã
ããã¾ãæ¨å¥¨ãã¦ãªããè¦ã¯ãRAIDæ§ç¯æã«ãã¹ã¦ã®ãããã¯ã«æ¸ãè¾¼ã¿ãçºçããã®ã§æ§è½å£åããããããªããï¼ã¨ãããã¨ããããRedhatã®ããã¥ã¡ã³ããåç
§ã®ãã¨
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/newmds-ssdtuning.html
å²ããã£ã¦RAIDãªã©ã®åé·åãããã«ä½¿ãã®ãååããã
æ é
æ
éçã®ãã¼ã¿ãHDDã«æ¯ã¹ãã¨ååç¨åº¦ã§ãããã«ãã®å
Intelã¯ä¸æ¡éãã¬ãã«ã§ä¿¡é ¼æ§ãé«ãããã ã
http://raven.air-nifty.com/night/2011/08/ssdhdd-3085.html
http://www.tomshardware.com/reviews/ssd-reliability-failure-rate,2923-3.html
ç£è¦
smartmontoolsã§smartå¤ã®æ¡å¼µãç£è¦ããã
äºç´é åã®æ®ãã¨ãå¹³åæ¶å»åæ°ã®ã¤ã³ã¸ã±ã¼ã¿ã¼ã
# smartctl -a /dev/sda 232 Available_Reservd_Space 0x0003 100 100 010 Pre-fail Always - 0 233 Media_Wearout_Indicator 0x0002 099 099 000 Old_age Always - 0
RAIDã«ã¼ãã§Arrayãæ§ç¯æ¸ã¿ã ã¨å½ç¶ã ãå¤ã¯åå¾ã§ããªãã
RAIDæç¡ã§ã®ããã©ã¼ãã³ã¹ã®å·®ç°ãªã©ã®æ¤è¨¼çµæã¯å¥é
ã§æ¸ãäºå®ã
ãã£ã¨ããæ
å ±ããã¾ãããæãã¦ä¸ããã
CentOS6.2ã«MySQL5.5å ¬å¼ãã¤ããªãã¤ã³ã¹ãã¼ã«æãmysql-libsã®ä¾åé¢ä¿ãæ°ã«ããªãã¦ãããªã£ã¦ã件
åæ¥ããã£ãã®ã«è¥å¹²ãã«ããã
CentOS6.2ã«MySQLå ¬å¼ã®ãã¤ããªãã¤ã³ã¹ãã¼ã«ãããããã¨ããã¨ãä¸è¨ã®ãããªä¾åæ§ã¨ã©ã¼ãçºçãã¦ãã¦ã解決ãå 延ã°ãã«ãã¦ããã
Scientific LinuxにMySQL5.5をインストール - cyber_snufkinの日記
postfixã¯ã©ããã¦ãå ¥ã£ã¦ãã¾ãããåé¤ããã®ãæ°æã¡æªãããremiã¯æ¬çªã«ã¯ä½¿ããªããã¨ã«ãã¦ããã®ã§ã©ããããã試è¡é¯èª¤ãã¦ããããçµå±RHELç³»ã®ããã±ã¼ã¸åãåé¡ãªã®ã§rpmãç´ãã¾ãããã¨ãããã¨ã«ãªã£ãã
http://bugs.mysql.com/bug.php?id=63433
rpmrebuildã¨ãããã¼ã«ã§rpmãåããã±ã¼ã¸ãããªã©ãã¦ãã§ããï¼ã¨æã£ã¦ããã¨ããã ã£ãã®ã ãâ¦å 延ã°ãã«ãã¦ããéã«MySQLã®5.5.23ããªãªã¼ã¹ããã¦ããã®ã§ããªãªã¼ã¹ãã¼ãããã§ãã¯ãã¦ã¿ãã
The MySQL-shared-compat RPM package enables users of Red Hat-privided mysql-*-5.1 RPM packages to migrate to Oracle-provided MySQL-*-5.5 packages. MySQL-shared-compat now replaces the Red Hat mysql-libs package by replacing libmysqlclient.so files of the latter package, thus satisfying dependencies of other packages on mysql-libs. This change affects only users of Red Hat (or Red Hat-compatible) RPM packages. Nothing is different for users of Oracle RPM packages. (Bug #13867506)
MySQL 5.5.23 がリリースされました | MySQL, SkySQL, Navicat, チューニング, 保守サポート
â¦ã¢ã«ã§ã¼ãã³ã¬å
¬å¼ã§è§£æ±ºãã¡ãã£ã¦ãªãï¼
試ãã«ãã¦ã³ãã¼ããã¦ãããã®ããã®ã¾ã¾ä½¿ã£ã¦ã¿ãã
# yum localinstall --nogpgcheck MySQL-shared-compat-5.5.23-1.el6.x86_64.rpm =========================================================================================================================================================================== Package Arch Version Repository Size =========================================================================================================================================================================== Installing: MySQL-shared-compat x86_64 5.5.23-1.el6 /MySQL-shared-compat-5.5.23-1.el6.x86_64 11 M replacing mysql-libs.x86_64 5.1.52-1.el6_0.1 Transaction Summary =========================================================================================================================================================================== Install 1 Package(s)
ã©ãè¦ã¦ãå®ç§ã§ããâ¦ãã¼ãããã®ã¾ã¾MySQL-serverçªã£è¾¼ãã¾ããã
ã¦ãããæ¡ç¨ãããã£ã¦ã¹ã¬ããã«ä¸è¨æ¸ãã¨ãã¦æ¬²ããã£ãâ¦orz
ã¡ãªã¿ã«ãrpmrebuildã£ã¦ãã¼ã«ã¯æ¢åã®ãã¤ããªã«ãæ軽ã«è¨å®ãã¡ã¤ã«ãå梱ã§ããé¢ç½ããã¼ã«ã§ãããEPELã§å
¥ãã®ã§ä½¿ã£ã¦ã¿ãã¨è¯ãããã
http://sourceforge.jp/magazine/07/06/05/0119229/2
Muninã®PluginãZabbixã§ä½¿ãwrapperçãªãã®ãä½ã£ã¦ã¿ã(Zabbix 2.0.0rc2対å¿)
Zabbix API ã®Python liblaryã使ã£ã¦ã¾ãã(Zabbix 2.0.0rc2ã§åä½ç¢ºèªã1.8ç³»ã¯APIãéãã®ã§ãé å¼µã£ã¦JSONã®ä¸èº«ãå¤ãã¦ä¸ããã)
ã¹ã¯ãªããæ¬ä½ããã°
https://github.com/oopsops/scripts/blob/master/zabbix/zabbix_munin_plugin.py
使ãæ¹
# UserParameterã«ç»é²ãã¦Agentããªã¹ã¿ã¼ã echo 'UserParameter=munin[*],/usr/share/munin/plugins/$1 |grep "^$2.value" |cut -d " " -f2' > /etc/zabbix/zabbix_agentd.d/userparameter_munin_plugin.conf service zabbix-agent restart # é©å½ãªãã©ã«ãã«ã¹ã¯ãªãããè¨ç½® git clone git://github.com/oopsops/scripts.git # cd scripts/zabbix # å¼æ°ã®1ã¤ãã«ãã©ã°ã¤ã³å 2ã¤ãã¯ç»é²å ãã³ãã¬ã¼ã(çç¥å¯) ./zabbix_munin_plugin.py memory Template_Linux
ãããªãã¨ã§ãã¾ã
- /usr/share/munin/plugins/(ãã©ã°ã¤ã³å) ãZabbixã®ã¢ã¤ãã ã¨ãã¦åãè¾¼ã¿ã¾ã
- ã°ã©ããèªåçæãã¾ãï¼ãã¼ãã«ã°ã©ããã¢ã¤ãã ã®è²ã¯ã©ã³ãã ï¼
- APIã«ã¢ã¯ã»ã¹å¯è½ãªãµã¼ãã¼ãªãã©ãããã§ã使ãã¾ã
- ãã¹ã¯ã¼ãããã³ãã対å¿ã§ã
åºæ¬çã«ã¯ã¹ã¯ãªãããå®è¡ãããµã¼ãã¼ã§ãã¡ãã¨valueãåãããã©ã°ã¤ã³ã使ã£ã¦ä¸ããã
UserParameterã®è¿½å ã¯æåã ãã§OKã§ãã
memoryãã©ã°ã¤ã³ãåãè¾¼ãã ã°ã©ããç©ç®ã«å¤æ´ããã¨ãã
ãã¼ãã
KVMã®ã²ã¹ããè¤è£½ããå¾ãMACã¢ãã¬ã¹ãæ¸ãæããæ¹æ³ããããï¼ã¹ã¯ãªããã§èªåå
åºæ¬çã«ã¯ãvirt-cloneããå¾ã«ããããããã
ï¼virt-managerä¸ã§ã¯ãã¼ã³ããå¾ã«è¡ãã®ãåãï¼
- ç´æ¥ãã¦ã³ããã¦æ¸ãæãã
- rawå½¢å¼ãªããã®ã¾ã¾ãã¦ã³ããã¦æ¸ãæãã
- qcow2å½¢å¼ãªãqemu-nbdã使ã£ã¦ãã¦ã³ããã¦æ¸ãæãã
- libguestfsçµç±ã§æ¸ãæãã
çµè«ã¨ãã¦ã¯ãä»ããå©ç¨ãããªãlibguestfsã使ãã»ãã便å©ãCentOS6.2以éã§ããã°yumã§ã¤ã³ã¹ãã¼ã«ã§ããã
以ä¸ãããã¤ã使ã£ã¦ã¿ããã¼ã«é¡ã
RHEL5.x/RHEL6.0 ã® KVM ã§ã¯ãvirt-clone ã³ãã³ãã«ããä»®æ³ãã·ã³ã®è¤è£½ãå¯è½ã§ããããã®å ´åãã²ã¹ã OS ã®ãã¹ããã¼ã ããããã¯ã¼ã¯è¨å®ãªã©ã¯ãå¥éãæåã§å¤æ´ããå¿ è¦ãããã¾ãã æ·»ä»ã®ã¹ã¯ãªãã kvmclone.pl ã¯ãvirt-clone ã«ããä»®æ³ãã·ã³ã®è¤è£½ã¨ã²ã¹ã OS ã®ãããã¯ã¼ã¯è¨å®ã®å¤æ´ãèªååãã¦è¡ãã¾ãã
ã»virt-cloneãä¸æ¬ã§è¡ããã®ã§ä¾¿å©
ã»rawå½¢å¼ã®HDDã§ãªãã¨å©ç¨ã§ããªã
ã»å¼æ°ããã¹ã¦æå®ããã®ã¯ã¡ãã£ã¨é¢å
ã»eth0ã ã対å¿
ã»ããªãããã¦ããã©ã·ã³ãããã¸ã§ãã³ã°ã¯ä»åèãã¦ãªã
ã»eth0ã ã対å¿
ã»eth0ã¨eth1ã®ï¼ã¤ã®ããã¤ã¹
ã»all python
ä»åã¯ã¤ã³ã¿ã¼ãã§ã¼ã¹ãï¼ã¤å©ç¨ããããã®ããã£ãã®ã§ãæå¾ã®ãã®ãåèã«æ¹ä¿®ãã¦ä½¿ã£ã¦ã¿ãã
edit-vm-network-setting.py
ã»(å¤æ´)rootããã¤ã¹ãèªåæ¤åº
edit-vm-hostname.py
ã»(追å )hostnameãå¤æ´ããã¹ã¯ãªãã
kvmclone
ã»(追å )virt-clone ããèµ·åã¾ã§è¡ãã¹ã¯ãªãã
kvmclone original_domain new_domain new_ip_eth0 new_ip_eth1
ãããªæãã§ããã£ã¨ã³ãã¼ãã¦èµ·åã¾ã§è¡ãã¾ããKVMãã¹ããCentOS6.2ãã²ã¹ããCentOS5.4ã®ç°å¢ã§ç¢ºèªã
使ãã«ã¯ä»¥ä¸ã®ã©ã¤ãã©ãªãYumã§ã¤ã³ã¹ãã¼ã«ã
yum install python-libguestfs libvirt-python python-lxml
åããããã¯ã¼ã¯ã¢ãã¬ã¹å
ã§ä½¿ãã ããªããååããªãeth0ããå¿
è¦ãªãå ´åã¯ãé©å½ã«ã³ã¡ã³ãã¢ã¦ããã¦ä½¿ã£ã¦ä¸ããã
æéãããã°IBMã®ãã®ã¨ããåèã«ãã²ã¹ããCent6ç³»ã¨ãã®å ´åã«ã対å¿ãã¦ã¿ããã
libguestfs/guestfsã®manã¨ã
guestfs-recipes - libguestfs, guestfish and virt tools recipes
guestfs-python - How to use libguestfs from Python