- mysql ÆÄÀÏ
ns:/tmp# cat mysql Mon Nov 22 04:00:00 KST 2004 Mon Nov 22 14:45:19 KST 2004 418-data/han662.pid 419-/bin/tar: Error exit delayed from previous errors 420-building file list ... done 421:han662data.gz 422:han662data.gz 423-wrote 6816186828 bytes read 10818965 bytes 211143.42 bytes/sec 424-total size is 6813642151 speedup is 1.00 425-Mon Nov 22 14:45:19 KST 2004 Uptime: 2183641 Threads: 601 Questions: 128667057 Slow queries: 145 Opens: 1400 Flush tables: 1 Open tables: 127 Queries per second avg: 58.923 | Max_used_connections | 649 | | Key_reads | 468 | | Key_read_requests | 8844554 | Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 3099260 1795896 1145932 62% / none 0 0 0 - /proc usbdevfs 0 0 0 - /proc/bus/usb none 0 0 0 - /dev/pts /dev/sda6 25711124 7192752 17212292 30% /env /dev/sda5 2063504 45800 1912884 3% /home none 1032220 0 1032220 0% /dev/shm /dev/sda3 2063536 328340 1630372 17% /var /dev/sdb1 70557052 23517372 43455584 36% /data 23G /data/mysqldata/data ns:/tmp# \
- get.sh
ns:/tmp# cat get.sh #!/bin/sh STARTTIME=`head -1 mysql | awk '{print }'` echo "½ÃÀ۽ð£: $STARTTIME" ENDTIME=`head --lines=2 mysql | tail -1 | awk '{print }'` echo "³¡³½Ã°£: $ENDTIME" grep 'total size is' mysql | awk '{print }' grep 'avg:' mysql | awk '{print }' grep 'Max_used_connections' mysql | awk '{print }' grep '\/data' mysql | awk '{print }' ns:/tmp# \
- °á°ú°ª
ns:/tmp# ./get.sh ½ÃÀ۽ð£: 04:00:00 ³¡³½Ã°£: 14:45:19 6813642151 58.923 649 36% ns:/tmp# \
³ª¸ÓÁöµµ ÀÌ·±½ÄÀ¸·Î ÇÏ¸é µÈ´Ù