I noticed that my previous post with basic MySQL SSH commands was relatively popular and I’ve been meaning to save some of the recent ones I’ve been using before I forget them, so…
show full processlist;
This shows all the processes (queries) running on the server at the moment you run it. Helpful if the server is running slow to see which queries might be causing the slowness.
show status like ‘qcache%’;
This shows several variables related to your MySQL query cache (see below). Important to note are the following:
+————————————-+———+
| Variable_name | Value |
+————————————-+———+
| Qcache_free_blocks | 798 |
| Qcache_free_memory | 4161824 |
| Qcache_hits | 9260760 |
| Qcache_inserts | 4366152 |
| Qcache_lowmem_prunes | 595048 |
| Qcache_not_cached | 304800 |
| Qcache_queries_in_cache | 7729 |
| Qcache_total_blocks | 40040 |
+————————————-+———+