Disk I/Oã®ä½¿ç¨çãç£è¦ããã¯ã³ã©ã¤ãã¼
iostat -x ã® %util ãç£è¦ãã¦ãããå¤ãè¶ ãããã¢ã©ã¼ãã¡ã¼ã«é£ã°ããããªãã¨æã£ã¦ crontab æ¸ããããããªæãã
*/5 * * * * perl -wle 'my $s = `/usr/bin/iostat -xk /dev/sd[abc] 270 2 | tail -4`; print $s if $s =~ m{\s(?:[0-9]{3}|[5-9][0-9])\.[0-9]+$}m'
ãã¤ã³ãã¯ã
- iostat ã®å¾ãããï¼ã¤ç®ã®å¼æ°ããµã³ããªã³ã°ãè¡ãç§æ°
- tail 㧠ããã¤ã¹æ°+1 ãããã¨ã§ãæå¾ã®ãµã³ãã«ãåãåºã
- æ£è¦è¡¨ç¾ã§50%以ä¸ã ã£ãå ´åã«æ¨æºåºåã« iostat ã®çµæãåºãï¼ã¡ã¼ã«éä¿¡