About the gradual departure from the development position, the boss has approved, and then my main work is "operation and maintenance + database management." Thank Chey brother and pony Brother can accept my harassment, and then will go to harass them, but also to harass Dong uncle, small just total, heart elder brother, pork brother, thank you. At the same time also want to thank Wu Louda, Leaf boss, fall total, seven total, orange elder brother them.
Because have not learned to play Zabbix, so start to write your own script to try. Write the script back to share it, welcome to criticize the guidance.
=======================================================================================
1. Key Process monitoring: Tomcat,apache,mysql
2. Storage space monitoring: mount point 75% Alarm (if always 75%, alarm once per hour)
3.uptime View Load_avg, start collecting system resource information (cpu,mem,io,net) as long as these three values appear greater than (CPU CORE/2)
Top10 process (CPU,MEM), collected every 10 seconds, while starting alarms, alarm once every 10 minutes (if always greater than (CPU CORE/2))
4. Key Domain name ping test (?? )
5. How network traffic is monitored (pending)
6.MySQL Performance Parameter Collection
Print the current MySQL key parameters:
innodb_buffer_pool_size:0.5--0.8
innodb_max_dirty_pages_pct:<50%
innodb_log_buffer_size:32m
innodb_data_file_path:>1g
Innodb_log_file_size:
Innodb_flush_log_at_trx_commit:1
Sync_binlog:1
query_cache_size:0
query_cache_type:0
Innodb_data_file_path=ibdata1:100m:autoextend #1024M Init
Innodb_file_per_table:1 #是否启用独立表空间
innodb_log_buffer_size:8m # # The size of the buffer used to buffer the log data. When this value is nearly full, INNODB will have to flush the data to disk. Since it is basically refreshed once per second, it is not necessary to set this value too large (even for long transactions)
innodb_log_file_size:100m # Redo log size, can not be too large, otherwise recovery is very slow, not too small, otherwise frequent checkpoint, resulting in performance jitter
Innodb_log_files_in_group:3 # Specify the number of redo log logs in the journal Group
Log_bin #开启binlog
Expire_logs_days:45
Binlog_format:mixed
Innodb_flush_method:o_direct
This parameter controls the InnoDB data file and redo log open, brush write mode, for this parameter, the document is described as follows:
There are three values: Fdatasync (default), O_dsync,o_direct
Fdatasync: Default value, call Fsync () to swipe the data file with the buffer of redo log
O_dsync:innodb will use O_sync to open and write redo log, use Fsync () to brush and write data files
O_direct:innodb use O_direct to open data files, use Fsync () to write data files with redo log
open_files_limit:8192
table_definition_cache:400
table_open_cache:400
Lower_case_table_names:
Sql_mode
Character_set_server
Max_connections
Max_user_connections
Thread_cache_size
Read_buffer_size
Sort_buffer_size
Tmp_table_size
Join_buffer_size
Read_rnd_buffer_size
Max_heap_table_size
Slow_query_log_file
Slow_query_log:1
Log_queries_not_using_indexes:1
long_query_time:0.02
min_examined_row_limit:100
Mysql memory allocation rules are: how much to use, up to the configured value, not immediately assigned
The global cache includes:
Global buffer (sum of total memory allocations) =
Innodb_buffer_pool_size--InnoDB cache, row data, index buffer, transaction lock, adaptive hash, etc.
+innodb_additional_mem_pool_size--InnoDB data dictionary extra memory, cache all table data dictionaries
+innodb_log_buffer_size--InnoDB redo log buffering for improved redo log write efficiency
+key_buffer_size--MyISAM table index high-speed buffer, improve MyISAM table index reading and writing efficiency
+query_cache_size--Query cache, cache query results, improve the efficiency of repeated query return
Maximum number of connection threads stored in +thread_cache_size--thread_cache
+TABLE_CAHCE--tablespace file descriptor cache for improved data table opening efficiency
+table_definition_cache---table definition file descriptor cache for improved data table opening efficiency
Session caching includes:
total_thread_buffers= Max_connections * (
Read_buffer_size-sequential read buffer for improved sequential read efficiency
+read_rnd_buffer_size--Random read buffer to improve random reading efficiency
+sort_buffer_size--Sort buffers to improve sorting efficiency
+join_buffer_size-Table connection buffer to improve table connection efficiency
+binlog_cache_size-binary log buffering for improved binary log write efficiency
+tmp_table_size--memory temp table to improve temporary table storage efficiency
+thread_stack--thread stack, temporarily hosting SQL statements/stored procedures
+thread_cache_size-thread caching, reducing the overhead of repeatedly opening threads, simulating connection pooling
MySQL Status:
Qps,tps,innodb buffer hit rate, slow log, Table cache status, lock status, TMP table status (temp table condition), Binlog Cache usage, innodb_log_waits amount, slave latency wait.
7. Virtual Machine Stress test report: (Sysbench,tpcc_mysql)
Tpcc_mysql pressure test Tps:os memory is adjusted to 16G, Innodb_buffer_pool_size is set to 2,4,6,8,10,12g when the number of warehouses is 5,10,15,20,50,60,80,100 TPS.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Linux Monitoring (Os,mysql,tomcat,apache)