æãééããæ°ãããããã¾ãå¿ãã¦ããã®ã§ã¡ã¢ãå¤åã常èã®ç¯çï½
crontabã«ãããªæãã§è¨å®ãä»è¾¼ããã¨ãããã§ããã
*/5 * * * * /usr/bin/iotop -b -k -t -n 2 -o >> /var/log/iotop/"`hostname`_`date '+%F_%H'`"
ããã¨ããã¡ã¼ã«ã /var/spool/mail/root ã«ããã¾ããã¨ã¡ã¼ã«ãå±ãã¾ãã¦ããã
/bin/sh: -c: line 0: unexpected EOF while looking for matching ``' /bin/sh: -c: line 1: syntax error: unexpected end of file
ãããªæãã§æãããããã§ãã
ãããã¼ï¼ã¨æã£ã¦ã"/var/log/cron"ã確èªããã¨ã
CROND[17743]: (root) CMD (/usr/bin/iotop -b -k -t -n 1 -o >> /var/log/iotop/"`hostname`_`date '+)
ã¨è¡¨ç¤ºããã¦ãã¦ããããã¼ã¼ã¼ï¼ã%ã以éãã©ã£ããã£ã¡ãã£ã¦ãã¼ãã¨æ°ä»ãã¾ããã
ãã§ãã¾ãå®çªã®"man 5 crontab"ã¨ãããã¨ãã¡ããã¨çããæ¸ãã¦ããããã§ãããã
ã第 6ããã£ã¼ã«ã (è¡ã®æ®ãã®é¨å) ã«ã¯å®è¡ãããã³ãã³ããæå®ããã ãã®è¡ã®ã³ãã³ãé¨ (æ¹è¡æåã¾ã㯠% æåã¾ã§) ã /bin/sh (ã¾ãã¯ãã® crontab ãã¡ã¤ã«ã® SHELL ç°å¢å¤æ°ã§æå®ãããã·ã§ã«) ã«ãã£ã¦å®è¡ãããã ã³ãã³ãä¸ã«ãã¼ã»ã³ãè¨å· (%) ã ããã¯ã¹ã©ãã·ã¥ (\) ã«ãã£ã¦ã¨ã¹ã±ã¼ããããã«ç½®ããã¦ããã¨ã æ¹è¡æåã«ç½®ãæããããæåã«ç¾ãã % 以éã®å ¨ã¦ã®ãã¼ã¿ã¯ æ¨æºå ¥åã¨ãã¦ã³ãã³ãã«éãããã
Man page of CRONTAB
ã»ã»ã»ã¨ãããã¨ã§ã
*/5 * * * * /usr/bin/iotop -b -k -t -n 2 -o >> /var/log/iotop/"`hostname`_`date '+\%F_\%H'`"
ãããªæãã§ãcrontabã§ã®ã%ãè¨è¿°ã¯å¿ è¦ã«å¿ãã¦ã¨ã¹ã±ã¼ããã¾ãããã¨ãããã°ã§ããã»ã»ã»ã
ããã§ã¯ï¼=͟͟͞͞(๑•̀=͟͟͞͞(๑•̀д•́=͟͟͞͞(๑•̀д•́๑)=͟͟͞͞(๑•̀д•́
ããã®ããã® Linuxã·ã¹ãã ã»10å¹´å¹ãæè¡ (Software Design plus)
- ä½è : ä¸äºæ¦å¸
- åºç社/ã¡ã¼ã«ã¼: æè¡è©è«ç¤¾
- çºå£²æ¥: 2012/06/15
- ã¡ãã£ã¢: 大åæ¬
- è³¼å ¥: 6人 ã¯ãªãã¯: 88å
- ãã®ååãå«ãããã° (16件) ãè¦ã