{"id":1051,"date":"2014-09-22T01:59:06","date_gmt":"2014-09-21T16:59:06","guid":{"rendered":"http:\/\/tech.akat.info\/?p=1051"},"modified":"2014-10-19T03:04:19","modified_gmt":"2014-10-18T18:04:19","slug":"%e3%80%90mysql%e3%80%91mytop%e3%83%bbinnotop","status":"publish","type":"post","link":"https:\/\/tech.akat.info\/?p=1051","title":{"rendered":"\u3010mysql\u3011mytop\u30fbinnotop"},"content":{"rendered":"<h1>mytop<\/h1>\n<p>show status\u3068show full processlist\u3092\u767a\u884c\u3057\u3001\u53d6\u5f97\u3057\u305f\u60c5\u5831\u304b\u3089\u7d71\u8a08\u60c5\u5831\u306a\u3069\u3092\u7b97\u51fa\u3057\u3066\u8868\u793a\u3059\u308bPerl\u30b9\u30af\u30ea\u30d7\u30c8<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nroot@hostname:\/home\/admin# aptitude install mytop\r\n\u4ee5\u4e0b\u306e\u65b0\u898f\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059:\r\n  libconfig-inifiles-perl{a} liblist-moreutils-perl{a} libterm-readkey-perl{a} mytop \r\n\u66f4\u65b0: 0 \u500b\u3001\u65b0\u898f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb: 4 \u500b\u3001\u524a\u9664: 0 \u500b\u3001\u4fdd\u7559: 0 \u500b\u3002\r\n\r\nroot@hostname:\/home\/admin# mytop -s 1 -uroot -ppassword # 1\u79d2\u304a\u304d\u306b\u66f4\u65b0\u3059\u308b(\u30c7\u30d5\u30a9\u30eb\u30c85\u79d2)\r\nMySQL on localhost (5.5.39-MariaDB-1~wheezy-log)        up 6+02:13:17 &#x5B;16:35:46]\r\n Queries: 77.0    qps:    0 Slow:     0.0         Se\/In\/Up\/De(%):    50366\/00\/00\/00\r\n              qps now:    0 Slow qps: 0.0  Threads:    2 (   1\/   2) 250\/00\/00\/00\r\n Key Efficiency: 100.0%  Bps in\/out:   0.0\/  0.9   Now in\/out:   8.3\/ 2.3k\r\n\r\n        Id      User         Host\/IP         DB      Time    Cmd Query or State                                                                      \r\n        --      ----         -------         --      ----    --- --------------                                                                      \r\n      4703      root       localhost                    0  Query show full processlist                                                               \r\n      4705      root       localhost techwordpr         7  Sleep                                                                  \r\n      \r\n# &#x5B;?]\uff1a\u53ef\u80fd\u306a\u30b3\u30de\u30f3\u30c9\u3092\u8868\u793a\u3059\u308b\r\n# &#x5B;k]\uff1a\u30b9\u30ec\u30c3\u30c9\u3092\u6307\u5b9a\u3057\u3066\u3001KILL\u3059\u308b\r\n# &#x5B;p]\uff1a\u753b\u9762\u3092\u4e00\u6642\u505c\u6b62\u3059\u308b\r\n# &#x5B;k]\uff1amytop\u3092\u7d42\u4e86\u3059\u308b\r\n<\/pre>\n<h1>innotop<\/h1>\n<p>innotop\u306fMySQL\u3068InnoDB\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3084\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u30e2\u30cb\u30bf\u30fc\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u300cmytop\u3092\u30a4\u30f3\u30b9\u30d1\u30a4\u30a2\u3057\u3066\u4f5c\u3063\u305f\u300d\u3068\u4f5c\u8005\u304c\u660e\u8a00\u3057\u3066\u304a\u308a\u3001\u6a5f\u80fd\u306fmytop\u4ee5\u4e0a<br \/>\nmariadb-client-5.5\u30fbmysql-client-5.5\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u5927\u62b5\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u5229\u7528\u3067\u304d\u308b<br \/>\n\u307e\u305f\u3001\u5bfe\u8a71\u5f0f\u3067\u5404\u7a2e\u8a2d\u5b9a\u3092\u884c\u3048\u3070\u300c$HOMEDIR\/.innotop\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u751f\u6210\u3055\u308c\u3001\u3053\u306e\u6a5f\u80fd\u3092\u5229\u7528\u3057\u3066\u8907\u6570\u30b5\u30fc\u30d0\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u306a\u3069\u3082\u53ef\u80fd<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n### innotop -u DB\u30e6\u30fc\u30b6 -p \u30d1\u30b9\u30ef\u30fc\u30c9 -P 3306 -h DB\u30b5\u30fc\u30d0\u540d -d 1 --mode Q\r\n### \u30b3\u30de\u30f3\u30c9\u30aa\u30d7\u30b7\u30e7\u30f3\u306e -d \u306f\u8868\u793a\u5207\u66ff\u9593\u9694(\u79d2) \u3001--mode \u306f \u4f55\u3092\u8868\u793a\u3059\u308b\u304b\u306e\u6307\u5b9a\r\nroot@hostname:\/home\/admin# innotop -uroot -ppassword --mode B -d 1\r\n&#x5B;RO] InnoDB Buffers (? for help)                 localhost, 33+03:16:39, InnoDB 7s :-), 0.19 QPS, 1\/0\/0 con\/run\/cac thds, 5.5.39-MariaDB-1~wheezy-log\r\n\r\n___________________________ Buffer Pool ____________________________\r\nSize    Free Bufs  Pages  Dirty Pages  Hit Rate  Memory   Add'l Pool\r\n16.00k      13265   3096            0  --        262.75M           0\r\n\r\n____________________ Page Statistics _____________________\r\nReads  Writes  Created  Reads\/Sec  Writes\/Sec  Creates\/Sec\r\n 1016  149686     2080       0.00        0.00         0.00\r\n\r\n______________________ Insert Buffers ______________________\r\nInserts  Merged Recs  Merges  Size  Free List Len  Seg. Size\r\n                                                            \r\n\r\n_________________ Adaptive Hash Index __________________\r\nSize  Cells Used  Node Heap Bufs  Hash\/Sec  Non-Hash\/Sec\r\n                                      0.00          0.00\r\n### &#x5B;?]\u3067\u30d8\u30eb\u30d7\u304c\u8868\u793a\u3055\u308c\u308b\r\n&#x5B;RO] InnoDB Buffers (? for help)                 localhost, 33+03:15:42, InnoDB 4s :-), 0.19 QPS, 1\/0\/0 con\/run\/cac thds, 5.5.39-MariaDB-1~wheezy-log\r\n\r\nSwitch to a different mode:\r\n   B  InnoDB Buffers    I  InnoDB I\/O Info     Q  Query List\r\n   C  Command Summary   L  Locks               R  InnoDB Row Ops\r\n   D  InnoDB Deadlocks  M  Replication Status  S  Variables &amp; Status\r\n   F  InnoDB FK Err     O  Open Tables         T  InnoDB Txns\r\n### Q \/ B \/ M \/ D \/ I \u3042\u305f\u308a\u306f\u4f7f\u3046\u983b\u5ea6\u9ad8\u3081\r\n\r\nActions:\r\n   d  Change refresh interval            p  Pause innotop\r\n   i  Toggle incremental status display  q  Quit innotop\r\n   n  Switch to the next connection      \r\n\r\nOther:\r\n TAB  Switch to the next server group   \/  Quickly filter what you see\r\n   !  Show license and warranty         =  Toggle aggregation\r\n   #  Select\/create server groups       @  Select\/create server connections\r\n   $  Edit configuration settings       \\  Clear quick-filters\r\nPress any key to continue\r\n\r\n### 0.5\u79d2\u9593\u9694\u3067120\u56de\u3001\u3064\u307e\u308a1\u5206\u9593\u30b5\u30f3\u30d7\u30ea\u30f3\u30b0\u3092\u53d6\u5f97\u3059\u308b ###\r\n### \u66f4\u65b0\u9593\u9694\u79d2\u6570\u306f\u6307\u5b9a\u3067\u304d\u308b\u304c\u3001\u3069\u308c\u3060\u3051\u5c0f\u3055\u304f\u3057\u3066\u3082\u6f0f\u308c\u308b\u30af\u30a8\u30ea\u304c\u3042\u308b\u305f\u3081\u3042\u307e\u308a\u4fe1\u7528\u3057\u3066\u306f\u306a\u3089\u306a\u3044 ###\r\nroot@hostname:\/home\/admin# innotop -w -uroot -ppassword -d 0.5 --count 100 -n | tee \/tmp\/innodb.log\r\ncmd     mysql_thread_id state   user    hostname        db      time    info\r\nConnect 26272   Reading from net        unauthenticated user    localhost               00:00\r\nConnect 26273   Reading from net        unauthenticated user    localhost               00:00\r\nConnect 26274   Reading from net        unauthenticated user    localhost               00:00\r\n<\/pre>\n<h1>\u53c2\u8003URL<\/h1>\n<p>mytop\u306e\u4f7f\u3044\u65b9<br \/>\nhttp:\/\/www.flatz.jp\/archives\/85<br \/>\nhttp:\/\/koexuka.blogspot.jp\/2011\/02\/mytop.html<br \/>\ninnotop\u306e\u4f7f\u3044\u65b9<br \/>\nhttp:\/\/yakst.com\/ja\/posts\/78<br \/>\nhttp:\/\/d.hatena.ne.jp\/interdb\/20100412\/1271068031<\/p>\n","protected":false},"excerpt":{"rendered":"<p>mytop show status\u3068show full processlist\u3092\u767a\u884c\u3057\u3001\u53d6\u5f97\u3057\u305f\u60c5\u5831\u304b\u3089\u7d71\u8a08\u60c5\u5831\u306a\u3069\u3092\u7b97\u51fa\u3057\u3066\u8868\u793a\u3059\u308bPerl\u30b9\u30af\u30ea\u30d7\u30c8 root@hostname:\/home\/admin# aptitu [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[25,14],"tags":[],"_links":{"self":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/1051"}],"collection":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1051"}],"version-history":[{"count":4,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/1051\/revisions"}],"predecessor-version":[{"id":1139,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/1051\/revisions\/1139"}],"wp:attachment":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1051"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1051"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}