Skip to content

Instantly share code, notes, and snippets.

@tonyskapunk
Created March 17, 2017 18:01
Show Gist options
  • Save tonyskapunk/38b8c526097419a46d7a55f38bfbe4c4 to your computer and use it in GitHub Desktop.
Save tonyskapunk/38b8c526097419a46d7a55f38bfbe4c4 to your computer and use it in GitHub Desktop.
recap single DOTMYDOTCONF
  1. Using a non-valid config file:
2017-03-17_17:39:30
Error when attempting to read: /root/.my2.cnf,/root/.my2.cnf,/root/.my3.cnf, please check the DOTMYDOTCNF setting in the configuration file
  1. Using a valid config file with no spaces:
# cat "mysql.log_snapshot_2017-03-17_17:37:08"                                                                          
2017-03-17_17:37:08
MySQL /root/.my2.cnf status
Uptime: 599642  Threads: 1  Questions: 8949  Slow queries: 0  Opens: 0  Flush tables: 1  Open tables: 63  Queries per second avg: 0.014


MySQL /root/.my2.cnf processes
+------+------+-----------+----+---------+------+-------+-----------------------+----------+
| Id   | User | Host      | db | Command | Time | State | Info                  | Progress |
+------+------+-----------+----+---------+------+-------+-----------------------+----------+
| 5969 | root | localhost |    | Query   | 0    | init  | show full processlist | 0.000    |
+------+------+-----------+----+---------+------+-------+-----------------------+----------+

MySQL InnoDB status

=====================================
2017-03-17 17:37:18 7fd9f9eeb700 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 15 seconds
-----------------
BACKGROUND THREAD
-----------------
srv_master_thread loops: 1 srv_active, 0 srv_shutdown, 599144 srv_idle
srv_master_thread log flush and writes: 599145
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 3
OS WAIT ARRAY INFO: signal count 3
Mutex spin waits 1, rounds 30, OS waits 1
RW-shared spins 2, rounds 60, OS waits 2
RW-excl spins 0, rounds 0, OS waits 0
Spin rounds per wait: 30.00 mutex, 30.00 RW-shared, 0.00 RW-excl
------------
TRANSACTIONS
------------
Trx id counter 324868
Purge done for trx's n:o < 320700 undo n:o < 0 state: running but idle
History list length 1211
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0, not started
MySQL thread id 5970, OS thread handle 0x7fd9f9eeb700, query id 8955 localhost root init
SHOW ENGINE INNODB STATUS
---TRANSACTION 324867, not started
MySQL thread id 1, OS thread handle 0x7fd9f9f7d700, query id 0 Waiting for background binlog tasks
--------
FILE I/O
--------
I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
I/O thread 1 state: waiting for completed aio requests (log thread)
I/O thread 2 state: waiting for completed aio requests (read thread)
I/O thread 3 state: waiting for completed aio requests (read thread)
I/O thread 4 state: waiting for completed aio requests (read thread)
I/O thread 5 state: waiting for completed aio requests (read thread)
I/O thread 6 state: waiting for completed aio requests (write thread)
I/O thread 7 state: waiting for completed aio requests (write thread)
I/O thread 8 state: waiting for completed aio requests (write thread)
I/O thread 9 state: waiting for completed aio requests (write thread)
Pending normal aio reads: 0 [0, 0, 0, 0] , aio writes: 0 [0, 0, 0, 0] ,
ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
Pending flushes (fsync) log: 0; buffer pool: 0
426 OS file reads, 5 OS file writes, 5 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 0, seg size 2, 0 merges
merged operations:
insert 0, delete mark 0, delete 0
discarded operations:
insert 0, delete mark 0, delete 0
0.00 hash searches/s, 0.00 non-hash searches/s
---
LOG
---
Log sequence number 17593043
Log flushed up to   17593043
Pages flushed up to 17593043
Last checkpoint at  17593043
Max checkpoint age    80826164
Checkpoint age target 78300347
Modified age          0
Checkpoint age        0
0 pending log writes, 0 pending chkp writes
8 log i/o's done, 0.00 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 139722752; in additional pool allocated 0
Total memory allocated by read views 88
Internal hash tables (constant factor + variable factor)
  Adaptive hash index 2233952         (2213368 + 20584)
  Page hash           139112 (buffer pool 0 only)
  Dictionary cache    706040  (554768 + 151272)
  File system         817312  (812272 + 5040)
  Lock system         333592  (332872 + 720)
  Recovery system     0       (0 + 0)
Dictionary memory allocated 151272
Buffer pool size        8191
Buffer pool size, bytes 134201344
Free buffers            7779
Database pages          411
Old database pages      0
Modified db pages       0
Percent of dirty pages(LRU & free pages): 0.000
Max dirty pages percent: 75.000
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 0, not young 0
0.00 youngs/s, 0.00 non-youngs/s
Pages read 411, created 0, written 1
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
No buffer pool page gets since the last printout
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 411, unzip_LRU len: 0
I/O sum[0]:cur[0], unzip sum[0]:cur[0]
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
0 read views open inside InnoDB
0 RW transactions active inside InnoDB
0 RO transactions active inside InnoDB
0 out of 1000 descriptors used
Main thread process no. 29691, id 140573675599616, state: sleeping
Number of rows inserted 0, updated 0, deleted 0, read 0
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
Number of system rows inserted 0, updated 0, deleted 0, read 0
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
  1. Using a valid config file with spaces:
2017-03-17_17:44:31
MySQL /root/.my config with spaces.cnf status
Uptime: 600085  Threads: 1  Questions: 8957  Slow queries: 0  Opens: 0  Flush tables: 1  Open tables: 63  Queries per second avg: 0.014


MySQL /root/.my config with spaces.cnf processes
+------+------+-----------+----+---------+------+-------+-----------------------+----------+
| Id   | User | Host      | db | Command | Time | State | Info                  | Progress |
+------+------+-----------+----+---------+------+-------+-----------------------+----------+
| 5972 | root | localhost |    | Query   | 0    | init  | show full processlist | 0.000    |
+------+------+-----------+----+---------+------+-------+-----------------------+----------+


MySQL InnoDB status

=====================================
2017-03-17 17:44:41 7fd9f9eeb700 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 16 seconds
-----------------
BACKGROUND THREAD
-----------------
srv_master_thread loops: 1 srv_active, 0 srv_shutdown, 599586 srv_idle
srv_master_thread log flush and writes: 599587
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 3
OS WAIT ARRAY INFO: signal count 3
Mutex spin waits 1, rounds 30, OS waits 1
RW-shared spins 2, rounds 60, OS waits 2
RW-excl spins 0, rounds 0, OS waits 0
Spin rounds per wait: 30.00 mutex, 30.00 RW-shared, 0.00 RW-excl
------------
TRANSACTIONS
------------
Trx id counter 324868
Purge done for trx's n:o < 320700 undo n:o < 0 state: running but idle
History list length 1211
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0, not started
MySQL thread id 5973, OS thread handle 0x7fd9f9eeb700, query id 8963 localhost root init
SHOW ENGINE INNODB STATUS
---TRANSACTION 324867, not started
MySQL thread id 1, OS thread handle 0x7fd9f9f7d700, query id 0 Waiting for background binlog tasks
--------
FILE I/O
--------
I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
I/O thread 1 state: waiting for completed aio requests (log thread)
I/O thread 2 state: waiting for completed aio requests (read thread)
I/O thread 3 state: waiting for completed aio requests (read thread)
I/O thread 4 state: waiting for completed aio requests (read thread)
I/O thread 5 state: waiting for completed aio requests (read thread)
I/O thread 6 state: waiting for completed aio requests (write thread)
I/O thread 7 state: waiting for completed aio requests (write thread)
I/O thread 8 state: waiting for completed aio requests (write thread)
I/O thread 9 state: waiting for completed aio requests (write thread)
Pending normal aio reads: 0 [0, 0, 0, 0] , aio writes: 0 [0, 0, 0, 0] ,
ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
Pending flushes (fsync) log: 0; buffer pool: 0
426 OS file reads, 5 OS file writes, 5 OS fsyncs
426 OS file reads, 5 OS file writes, 5 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 0, seg size 2, 0 merges
merged operations:
insert 0, delete mark 0, delete 0
discarded operations:
insert 0, delete mark 0, delete 0
0.00 hash searches/s, 0.00 non-hash searches/s
---
LOG
---
Log sequence number 17593043
Log flushed up to   17593043
Pages flushed up to 17593043
Last checkpoint at  17593043
Max checkpoint age    80826164
Checkpoint age target 78300347
Modified age          0
Checkpoint age        0
0 pending log writes, 0 pending chkp writes
8 log i/o's done, 0.00 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 139722752; in additional pool allocated 0
Total memory allocated by read views 88
Internal hash tables (constant factor + variable factor)
  Adaptive hash index 2233952         (2213368 + 20584)
  Page hash           139112 (buffer pool 0 only)
  Dictionary cache    706040  (554768 + 151272)
  File system         817312  (812272 + 5040)
  Lock system         333592  (332872 + 720)
  Recovery system     0       (0 + 0)
Dictionary memory allocated 151272
Buffer pool size        8191
Buffer pool size, bytes 134201344
Free buffers            7779
Database pages          411
Old database pages      0
Modified db pages       0
Percent of dirty pages(LRU & free pages): 0.000
Max dirty pages percent: 75.000
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 0, not young 0
0.00 youngs/s, 0.00 non-youngs/s
Pages read 411, created 0, written 1
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
No buffer pool page gets since the last printout
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 411, unzip_LRU len: 0
I/O sum[0]:cur[0], unzip sum[0]:cur[0]
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
0 read views open inside InnoDB
0 RW transactions active inside InnoDB
0 RO transactions active inside InnoDB
0 out of 1000 descriptors used
Main thread process no. 29691, id 140573675599616, state: sleeping
Number of rows inserted 0, updated 0, deleted 0, read 0
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
Number of system rows inserted 0, updated 0, deleted 0, read 0
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================
  1. Using a valid config file with spaces and vertical output on processlist:
2017-03-17_17:58:24
MySQL /root/.my config with spaces.cnf status
Uptime: 600919  Threads: 1  Questions: 9002  Slow queries: 0  Opens: 0  Flush tables: 1  Open tables: 63  Queries per second avg: 0.014


MySQL /root/.my config with spaces.cnf processes
*************************** 1. row ***************************
    Id: 5991
  User: root
  Host: localhost
    db: NULL
Command: Query
  Time: 0
 State: init
  Info: show full processlist
Progress: 0.000


MySQL InnoDB status

=====================================
2017-03-17 17:58:35 7fd9f9eeb700 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 49 seconds
-----------------
BACKGROUND THREAD
-----------------
srv_master_thread loops: 1 srv_active, 0 srv_shutdown, 600419 srv_idle
srv_master_thread log flush and writes: 600420
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 3
OS WAIT ARRAY INFO: signal count 3
Mutex spin waits 1, rounds 30, OS waits 1
RW-shared spins 2, rounds 60, OS waits 2
RW-excl spins 0, rounds 0, OS waits 0
Spin rounds per wait: 30.00 mutex, 30.00 RW-shared, 0.00 RW-excl
------------
TRANSACTIONS
------------
Trx id counter 324868
Purge done for trx's n:o < 320700 undo n:o < 0 state: running but idle
History list length 1211
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0, not started
MySQL thread id 5992, OS thread handle 0x7fd9f9eeb700, query id 9009 localhost root init
SHOW ENGINE INNODB STATUS
---TRANSACTION 324867, not started
MySQL thread id 1, OS thread handle 0x7fd9f9f7d700, query id 0 Waiting for background binlog tasks
--------
FILE I/O
--------
I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
I/O thread 1 state: waiting for completed aio requests (log thread)
I/O thread 2 state: waiting for completed aio requests (read thread)
I/O thread 3 state: waiting for completed aio requests (read thread)
I/O thread 4 state: waiting for completed aio requests (read thread)
I/O thread 5 state: waiting for completed aio requests (read thread)
I/O thread 6 state: waiting for completed aio requests (write thread)
I/O thread 7 state: waiting for completed aio requests (write thread)
I/O thread 8 state: waiting for completed aio requests (write thread)
I/O thread 9 state: waiting for completed aio requests (write thread)
Pending normal aio reads: 0 [0, 0, 0, 0] , aio writes: 0 [0, 0, 0, 0] ,
ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
Pending flushes (fsync) log: 0; buffer pool: 0
426 OS file reads, 5 OS file writes, 5 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 0, seg size 2, 0 merges
merged operations:
insert 0, delete mark 0, delete 0
discarded operations:
insert 0, delete mark 0, delete 0
0.00 hash searches/s, 0.00 non-hash searches/s
---
LOG
---
Log sequence number 17593043
Log flushed up to   17593043
Pages flushed up to 17593043
Last checkpoint at  17593043
Max checkpoint age    80826164
Checkpoint age target 78300347
Modified age          0
Checkpoint age        0
0 pending log writes, 0 pending chkp writes
8 log i/o's done, 0.00 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 139722752; in additional pool allocated 0
Total memory allocated by read views 88
Internal hash tables (constant factor + variable factor)
  Adaptive hash index 2233952         (2213368 + 20584)
  Page hash           139112 (buffer pool 0 only)
  Dictionary cache    706040  (554768 + 151272)
  File system         817312  (812272 + 5040)
  Lock system         333592  (332872 + 720)
  Recovery system     0       (0 + 0)
Dictionary memory allocated 151272
Buffer pool size        8191
Buffer pool size, bytes 134201344
Free buffers            7779
Database pages          411
Old database pages      0
Modified db pages       0
Percent of dirty pages(LRU & free pages): 0.000
Max dirty pages percent: 75.000
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 0, not young 0
0.00 youngs/s, 0.00 non-youngs/s
Pages read 411, created 0, written 1
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
No buffer pool page gets since the last printout
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 411, unzip_LRU len: 0
I/O sum[0]:cur[0], unzip sum[0]:cur[0]
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
0 read views open inside InnoDB
0 RW transactions active inside InnoDB
0 RO transactions active inside InnoDB
0 out of 1000 descriptors used
Main thread process no. 29691, id 140573675599616, state: sleeping
Number of rows inserted 0, updated 0, deleted 0, read 0
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
Number of system rows inserted 0, updated 0, deleted 0, read 0
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment