Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
ãã®é ã¯GraphiteããInfluxDBãrrdtoolã«åã£ã¦ä»£ãããã¤ã¤ãããã§ãããããrrdtoolã®ã³ãã³ãå¼æ°ã¯ããã£ã¦ã¿ãã¨æå¤ã¨æ¥½ãããã®ã§ã(人ã«ããã¾ãã)ããã®ããã "rrdtool 誰ãä¸çªãã£ãããã°ã©ãæãããé¸æ権"â æ¡åç¿å¸ (@shoichimasuhara) April 4, 2014 ã¨ãæãã¤ãã§è¨ãã¾ããããã¨ããããåºã®å£ã¨ãããå座ã¨ããããã¨ãããããã£ã¦è¦ãã ããã£ã¦ã¿ããã¨æãã¾ã MRTG ã¨ããããæ¸ããªããããªæã MRTGã®ã°ã©ãã彷彿ã¨ããã¾ãããã³ãã³ãã©ã¤ã³ã¯ãã¡ã rrdtool graph shoichi.example.com_loadavg5_1.png \ --title "load average 5 of shoichi.example.com" \ --start end-1w --end now \
ãã®è¨äºã¯ MySQL Casual Advent Calendar 2013 ã®25æ¥ç®ã®è¨äºã§ãã èªåã®éå»ã®ããã°ãå«ãã¦ãmysqlã³ãã³ãã®ã«ã¹ã¿ãã¤ãºã«ã¤ãã¦ãããããªæ å ±ãããã¾ããããããããªã¹ã¹ã¡ã®ç§ä¼ã®ã¿ã¬ãã¾ã¨ãããã¨æãã¾ããæ¯éããåèã«ã å®åæ(SQL)ã®ã·ã§ã¼ãã«ããå ¥å ãshow create table TABLENAME\Gãã¨ããselect user,host,password from mysql.user order by user,host;ãã¨ããããå®è¡ãããã©é·ãã¦å ¥åããã®ãããã©ããªã®ãããã¾ãããããããã·ã§ã¼ãã«ããã§å ¥åã§ããããã«ããæ¹æ³ã§ãã mysqlã³ãã³ãã§è¡ç·¨éãã§ããã®ã¯ãreadlineãlibeditããªã³ã¯ãã¦ãããããã§ãã å¾æ¥ã®å ¬å¼ãã¤ããªé å¸ç©ã«å«ã¾ããmysqlã³ãã³ãã¯readlineã§ãã
ã¨ãã¨ãããªãæ¸ãã¦ã¿ãã主ã«ã«ã¼ãã¼åãã§ãã ãµã¼ãã®éç¨ã¨ããã£ã¦ããã¨ãä¸å®æã§ã¯ãããããã¾ã«ã¿ã¤ãã«ã®ãããªãã£ã¹ã¯å®¹éãé¼è¿«ãã話é¡ã«ç´é¢ãã¾ãã ã¾ãããããèµ·ããã®ã¯ä¸æ¦è¯ãã¨ãã¦ãã¿ããªããããæãã©ããã£ã¦èª¿ã¹ã¦ããã®ã ããï¼ ã¨ãããããåãã©ããã£ã¦ããæ¸ãã¦ã¿ã¾ãã ä½ã¯ã¨ãããç¾ç¶ç¢ºèª ã¿ããªå¤§å¥½ã"df"ã³ãã³ãã§ããç´°ãã説æã¯çãã¾ãããåãã¼ãã£ã·ã§ã³ã»ãã¡ã¤ã«ã·ã¹ãã ãã¨ã«ãã£ã¹ã¯ã®ä½¿ç¨ç¶æ³ã確èªã # df -h Filesystem ãµã¤ãº ä½¿ç¨ æ®ã 使ç¨% ãã¦ã³ãä½ç½® /dev/sda3 130G 88G 36G 72% / /dev/sda1 494M 23M 447M 5% /boot tmpfs 12G 0 12G 0% /dev/shmæ£ç¢ºã¨ã¯è¨ãã¾ããããã ãããã©ã®ãã¼ãã£ã·ã§ã³ã«ã©ã®ããã容éã空ãã¦ãããã確èªã§ãã¾ãã ã©
åæ©çããããã©ãèªåãã¾ã ããsvnã®èãæ¹ãç解ã§ãã¦ãªãã®ã§ãå¿ããªããã¡ã«ã¡ã¢ã ææ°çã¸ã®ã³ããããæããã«ãã¹ã£ã¦ã¦ãéå»ã®ãªãã¸ã§ã³(r999)ã«æ»ãå ´åã [text]svn up #ä¸åº¦ææ°çã«ã¢ãããã¼ã svn merge -r HEAD:999 . # ææ°çâr999ã«å·®åãåãï¼åãæ¶ã svn commit -m âr999ã«æ»ãã¾ããâ [/text] âåèãµã¤ãï¼ å ¸åçãªå©ç¨æ¹æ³ï¼å¤æ´ã®åãæ¶ã
curlã¯wget, lwp-request(GET, HEAD), lynxã¨åããããªcliã®http clientãã ã¨æã£ã¦ãããã£ã¨æ©è½ããããããªã®ã§ãman curlèªãã§è²ã 調ã¹ã¦ã¿ããHTTP(S)以å¤ã«ãããªã対å¿ãã¦ãã curl is a tool to transfer data from or to a server, using one of the supported protocols (HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, DICT, TELNET, LDAP or FILE). ã¨ããããè¯ã使ããããªhttp, ftpé¢é£ã®ã¡ã¢ãDLã ããããªãã¦ãã¢ãããã¼ããã§ããã®ãç´ æ´ãããã åºæ¬ syntax curl [optinons] URL URL It will then default to HTT
æ示ç æå³ à¹à¸à¸¥à¸à¸à¸à¸£à¹à¸¡à¸à¸²à¸£à¹à¸£à¸µà¸¢à¸à¸£à¸¹à¹à¹à¸¥à¸°à¸à¸±à¸à¸à¸²à¸à¸±à¸à¸©à¸°à¸à¹à¸§à¸¢à¹à¸à¸à¹à¸à¹à¸¥à¸¢à¸µ https://suin.io à¹à¸à¹à¸à¹à¸à¸¥à¸à¸à¸à¸£à¹à¸¡à¸à¸µà¹à¹à¸«à¹à¸à¸¸à¸à¹à¸£à¸µà¸¢à¸à¸£à¸¹à¹à¹à¸¥à¸°à¸à¸±à¸à¸à¸²à¸à¸±à¸à¸©à¸°à¸à¸²à¸à¹à¸à¸à¹à¸à¹à¸¥à¸¢à¸µà¸à¸¢à¹à¸²à¸à¸ªà¸°à¸à¸§à¸à¸ªà¸à¸²à¸¢ à¹à¸£à¸²à¸¡à¸¸à¹à¸à¸¡à¸±à¹à¸à¹à¸à¸à¸²à¸£à¹à¸«à¹à¸à¸§à¸²à¸¡à¸£à¸¹à¹à¹à¸¥à¸°à¸à¸£à¸°à¸ªà¸à¸à¸²à¸£à¸à¹à¸à¸µà¹à¸¡à¸µà¸à¸¸à¸à¸à¹à¸²à¹à¸à¸à¸²à¸£à¸à¸±à¸à¸à¸²à¸à¸à¹à¸à¸ pascalcase
ãã®ããã¥ã¢ã«ãã¼ã¸ã¯ GNU ç find ã®ä½¿ç¨æ³ãè¨è¿°ãããã®ã§ããã find ã¯ä¸ãããããã¡ã¤ã«å以ä¸ã®ãã£ã¬ã¯ããªããªã¼ãæ¤ç´¢ãã åããä¸ããããè©ä¾¡å¼ãå·¦ããå³ã«åãã£ã¦åªå é ä½ã®é«ããã®ããè©ä¾¡ãã (æ¼ç®åã®ã»ã¯ã·ã§ã³ãè¦ã)ã è©ä¾¡å¼ã®çµæã確å®ãã㨠(and ã®å·¦é ãå½ã ã£ããã or ã®å·¦é ãçã ã£ãå ´åãªã©) è©ä¾¡ã¯çµäºãã å¼ãç¶ã次ã®ãã¡ã¤ã«åãè©ä¾¡ãããã `-', `(', `)', `,', ã¾ã㯠`!' ã§ã¯ãã¾ãæåã®å¼ãæ°ã¯ã è©ä¾¡å¼ã®å§ã¾ãã§ããã¨ã¿ãªãããã ãã®åã®å¼ãæ°ã¯æ¤ç´¢ãããã¹ã¨ãªãã ãã¹ãä¸ããããªãå ´åã¯ã«ã¬ã³ããã£ã¬ã¯ããªä»¥ä¸ãæ¤ç´¢ããã è©ä¾¡å¼ãä¸ããããªãå ´å㯠`-print' ãè©ä¾¡å¼ã¨ãã¦ç¨ããããã find ã¯å ¨ã¦ã®ãã¡ã¤ã«ã®å¦çã«æåããã¨ã¹ãã¼ã¿ã¹ 0 ãè¿ãã¦çµäºããã ã¨ã©ã¼ããã£ãå ´åã«ã¯ 0
Landscape ããããã¼ã¸ | < åã®æ¥ 2005-07-02 2005-07-06 次ã®æ¥ 2005-07-07 > Landscape - ã¨ã³ã¸ãã¢ã®ã¡ã¢Â 2005-07-06 find ã³ãã³ãã® -mtime 㯠+1 ã§ã2æ¥åã®ãã¡ã¤ã«ã対象 å½ãµã¤ãå ã Google æ¤ç´¢ã§ãã¾ã * find ã³ãã³ãã® -mtime 㯠+1 ã§ã2æ¥åã®ãã¡ã¤ã«ã対象ãã®è¨äºã®ç´ãªã³ã¯URL: Permlink | ãã®è¨äºãå±ããã«ãã´ãª: [unix] [ã·ã§ã«ã¹ã¯ãªãã] find ã³ãã³ãã® -mtime 㯠+1 ã§ã2æ¥åã®ãã¡ã¤ã«ã対象ã¨ãªããã¤ã¾ãã(n + 1) æ¥åã®ãã¡ã¤ã«ã対象ãn 㯠+0 ãæå®ãã¦ããä¸æ¥ä»¥ä¸åã®ãã¡ã¤ã«ã対象ã«ãªãã - find ãå¤ããã¡ã¤ã«ãæ¤ç´¢ãã¦ãããªãã¨ãããã¹ãç¨ DB ããããå®æçã«ããã¯ã¢ãããåã£ã¦ãããã
ãvimå ¥éãç³»è¨äºã§è§£èª¬ãããªãããããæå¤ã¨ä½¿ãæ¹ãç¥ããã¦ããªãvimgrepã ãã¡ã¤ã«ãéãã¦ã¯æ¤ç´¢ãéãã¦ã¯æ¤ç´¢ã£ã¦ãã¦ãï¼ grepããããã«vimããåºã¦ãï¼ grepçµæãè¦ã¦æ¹ãã¦vimã§éãç´ãã¦ãï¼ ãããvimgrep使ãã°256åæ©ããªãï¼ããï¼ãã ç°¡åãªã¾ã¨ã vimgrepã¯â¦ ãã¡ã¤ã«ãã¾ããã§æ¤ç´¢ã§ãã grepãgit-grepããã¯é ãã®ã§å·¨å¤§ããã¸ã§ã¯ãã§ã¯æ¤ç´¢å¯¾è±¡ãçµã£ãã»ãããã ã¯ã¤ã«ãã«ã¼ã使ãã¨ç°¡åã«çµãè¾¼ãã ç¹°ãè¿ãåã対象ããæ¤ç´¢ããå ´åã¯argument listã使ãã¨æã gitãªãã¸ããªã§ã¯git-ls-filesã¨çµã¿åããã 該å½ç®æã«ç´ æ©ã移åï¼ç·¨éã§ãã quickfix-windowã¨çµã¿åãããã¨æ´ã«æã ãã®è¨äºèªãã¨åããã㨠:vimgrepã³ãã³ãã®ä½¿ãæ¹ :cwindowã³ãã³ãã®ä½¿ãæ¹ :argsã³
redtower's memo LinuxãUbuntuãWebãã¼ã«ãããã°ã©ãã³ã°ããµã¼ããã½ããã¦ã§ã¢ã¨ããè¨å®ããæã®æ å ±ããã¨ã§å¿ããªãããã«ï¼ã¨ãããå¿ããããã«ï¼è¨é²ãã¦ãããã¼ã¸ git submoduleã使ã£ã¦ããªã½ã¼ã¹ã管çãã¦ãããªãã¸ããªã§ãå¤é¨ã®ãªãã¸ããªï¼vimperator-pluginsï¼ãæ±ãã å¤é¨ãªãã¸ããªã追å ããã $ cd rc $ git submodule add https://github.com/vimpr/vimperator-plugins.git vimperator-plugins $ git commit -a -m 'add submodule vimperator-plugins' $ git push å ã®ãªãã¸ããªãcloneããæã¯ããã®ã¾ã¾ã§ã¯ãµãã¢ã¸ã¥ã¼ã«ã¯cloneãããªãã $ git clone http
èªåã®ãµã¼ãããä»ã®ãµã¼ã㸠scp ã使ã£ã¦ãã¡ã¤ã«ã転éãã¦ãããããªã¿ã¼ã³ããªã stalled ã«ãªã£ãã®ã§ Ctrl + C ã§ã³ãã³ããä¸æ¢ããã killed by signal 2 ã¨ããã¨ã©ã¼ã¡ãã»ã¼ã¸ã表示ããã転éé度ã®ä¸éãè¨å®ãã¦åé¿ããäºãã§ãã¾ããã wget âlimit-rateã®ãªãã·ã§ã³ã åä½ã¯byte/ç§ wget âlimit-rate=100000 http://XXXXXX.com/aaa.tgz ããã§100KB/ç§ã§è»¢éã scp -lãªãã·ã§ã³ã åä½ã¯Kbit/ç§ scp -l 800 [email protected]:/aaa/aaa.tgz ./ ããã§100KB/ç§ã§è»¢éã rsync âbwlimitãªãã·ã§ã³ã åä½ã¯Kbyte/ç§ rsync -av âbwlimit=200 root@XXXXX
ãµã¼ãã®åä½ã«ç°å¸¸ãçºçããéã«åå ãæ¢ãããã®Linuxã³ãã³ãã§ãèªåç¨ã®ã¡ã¢ã§ãã å ¨ã¦manã¨ãã°ã°ã£ããåºã¦ããã®ã§èª¬æã¯é©å½ã§ããæãã¤ãããå¾ã§è¿½è¨ãã¦ããããã§ãã 対象ã¯Debian Squeezeã«ãªãã¾ãã å ¨ã¦ããã±ã¼ã¸ã¤ã³ã¹ãã¼ã«ã§ãããã®ã§ãããã±ã¼ã¸å㯠[in packagename] ã¨ãã¦ããã¾ãã åæããã³ã¡ã³ããããã¨ããããã¾ãã è¯ãæ°ãªã³ãã³ãã¯è¿½è¨ãã¦ããã¾ãã ï¼è¿½å ããã³ãã³ãï¼ * telnet (+ã³ã¡ã³ã wget, netcat) * arp (+ã³ã¡ã³ã arpwatch) * pstree * fdisk ã³ã¡ã³ãã« gdisk * host, dig * watch * reboot
ããã«ã¡ã¯ãç§éã§ããä¹ ã ã®ã9ãæ以ä¸ã¶ãã®ããã°ã§ããã ä»äºã§ã¯ããã1å¹´è¿ããã£ã£ã¨ã¤ã³ãã©é¢ä¿ã®ãã¨ããã£ã¦ãã¾ããã ä»æ¥ã¯ãSSHã«é¢ããTIPSãç´¹ä»ãã¾ãã ï¼. ç¹å®ã®ãµã¼ãã¼ã«SSHãã°ã¤ã³ããæã«ãç¹å®ã®è¨å®ã使ç¨ãã ãã¼ã ãã£ã¬ã¯ããª/.ssh/configãã¡ã¤ã«ã«è¨å®ãæ¸ãã¦ããã¨ãç¹å®ã®ãµã¼ãã¼ã«ãã°ã¤ã³ããæã«ãèªåçã«ç¹å®ã®è¨å®ã使ãããã«ã§ãã¾ãã SSHã®ãªãã·ã§ã³ããµã¼ãã¼ã«ãã£ã¦åãããæã«å ¥åã楽ã«ãªãã¾ãã 以ä¸ã¯ãxxx.yyy.zzz.aaaã§ã¢ã¯ã»ã¹ããæã«ä½¿ãç§å¯éµãid_rsa_testã«è¨å®ãã¦ãã¾ãã .ssh/config Host xxx.yyy.zzz.aaa IdentityFile /home/asial/.ssh/id_rsa_test ï¼. ãã¹ããã¼ããã§ãã¯ããªãããã«ãã Linuxãããµã¼ãã¼ã«SSHæ¥ç¶
æè¿ãä¼ç¤¾ã§ã·ã§ã«ã®æä½æ¹æ³ã«ã¤ãã¦æãã¦ããã®ã ãã pgrep / pkill / skill / pidof ã¨ãã£ã 便å©ãªããã»ã¹æä½ç³»ã³ãã³ããç¥ããªã人ãå®ã«å¤ãã ããã»ã¹ã殺ãã¨ããã®ã¯ãããããä½æ¥ãªã®ã§ ä»åã¯ã³ã¬ã«ã¤ãã¦æ¸ãã¦ã¿ãã ãã¨ãã°ããããã®ã³ãã³ããç¥ããªã人ãã æå®ããååã®ããã»ã¹ã kill ããæé ã¯ã ããã 以ä¸ã®ãããªãã®ã«ãªããã¨ã ããã $ ps aux | grep ããã»ã¹å | grep -v 'grep' # ã³ãã³ãã®åºåçµæãã pid ãç®ã§ç¢ºèª 12345 ... .. hoge .. .. $ kill 12345 ãã®ä½æ¥ã¯é常ã«é¢åã§éå±ã ã ãã殺ããªããã°ãªããªãããã»ã¹ããããããã£ãã¨ã㯠ã©ãããã®ã ãããã ãã¾ãã«ãgrep ã³ãã³ãèªèº«ãåè£ã«å«ã¾ãã¦ãã¾ãäºãããã®ã ãã grep -v grep
ã¿ã¤ãã«ã¯é£ãã½ãã ä»æ¥ããã§æ¸ãã®ã¯ããããæè¿ç¥ã£ããã¨ã ã£ããããã®ãå¤ããã§ããããã£ãããªã®ã§æ¸ãã¦ãããããªãã¨æã£ã次第ã§ããLinuxã£ã¦æ¸ãã¦ããã©ãæ®éã«Macã§ã使ããããºã§ãã ç¥ã£ã¦ã人ã«ã¨ã£ã¦ã¯ã¢ã¿ãªãã¨ã®ãã¨ã§ããã©ãâ¦â¦ã ãã¡ã¤ã«ãµã¤ãºã®æ¡ã§ãããã¦ããããã ls ã¨ã duãããã§ä½¿ãã話ã§ããã ãã¡ã¤ã«ãµã¤ãºã大ãããã¦ããã¨è¦ããããªããã£ã¦ãããã¨ã£ã¦ãããããªãã§ãããããã¾ããããããããã ãããªæ㯠-h ãªãã·ã§ã³ã使ãã¾ãããã $ ls -l /var/log/nginx/access.log -rw-r--r-- 1 root root 1897381 8æ 26 02:50 2012 /var/log/nginx/access.log $ ls -lh /var/log/nginx/access.log -rw-r--r--
ã¨ããããããã§ã¯CentOS5.3ã«æ¨æºã§å ¥ã£ã¦ãcronã§ã®è©±ã¨ãããã¨ã§ crondã¯åãã¦ããã å®è¡ãã¡ã¤ã«ã®æ¨©éã¯æ£ããã cronã®ãã°ã確èªãã¹ã ã¨ãããã¨ã§ crondã¯åãã¦ãã¾ããï¼ # /etc/rc.d/init.d/crond status crond (pid xxx) ãå®è¡ä¸...ã§åãã¦ãããç¢ºèª # chkconfig --list crond crond 0:off 1:off 2:on 3:on 4:on 5:on 6:offã§2-5çªã¾ã§onã«ãªã£ã¦ãã¾ããï¼ å®è¡ãã¡ã¤ã«ã®æ¨©éã¯æ£ããã§ããï¼ ls -al | grep test -rwxrwxr-x 1 hoge hoge 2615380 3æ 10 01:54 test.jarã§å®è¡ããããã¡ã¤ã«ã®å®è¡æ¨©éã確èªãã¦ã¿ã¾ããã ã¡ãªã¿ã«ããã§ã¯ æåã®rwxã¯ãã¡ã¤ã«ææè ã®æ¨©é 次ã®r
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}