Mariadb 모니터링

Cacti 설치시 시스템의 Disk , Network , Memory , CPU 등의 자원을 모니터링 할수 있습니다.

Percona 설치후 Apache , Nginx , mysql 등의 서비스를 모니터링 할수 있습니다.

자세한 내용은 Percona Site 에서 확인 하실수 있습니다.

Percona Site 에서 확인시 아래와 같은 Templaters 를 사용할수 있으며  Freebsd 에서는

Templaters for Cacti

Percona Monitoring Plugins for Cacti
Frequently Asked Questions on Cacti Templates
Installing Percona Monitoring Plugins for Cacti
Customizing Percona Monitoring Plugins for Cacti
Percona MySQL Monitoring Template for Cacti
Percona Galera/MySQL Monitoring Template for Cacti
Installing SSH-Based Templates
Percona Apache Monitoring Template for Cacti
Percona JMX Monitoring Template for Cacti
Percona Linux Monitoring Template for Cacti
Percona Memcached Monitoring Template for Cacti
Percona MongoDB Monitoring Template for Cacti
Percona Nginx Monitoring Template for Cacti
Percona OpenVZ Monitoring Template for Cacti
Percona Redis Monitoring Template for Cacti
Percona Amazon RDS Monitoring Template for Cacti
Cacti Templates Developer Documentation
Hardening Cacti setup
Upgrading Percona Monitoring Plugins for Cacti

 

freebsd percona-plugins ports 설치시 제공 템플릿

apache_server
galera_server
gnu_linux_server
jmx_server
memcached_server
mongodb_server
mysql_server
nginx_server
openvz_server
rds_server
redis_server

 

percona plugins 설치

root@bsd11:~ # 
root@bsd11:~ # whereis percona-monitoring-plugins
percona-monitoring-plugins: /usr/ports/net-mgmt/percona-monitoring-plugins
root@bsd11:~ # cd /usr/ports/net-mgmt/percona-monitoring-plugins/ && make install clean

 

설치완료후 메세지

====> Compressing man pages (compress-man)
===>  Installing for percona-monitoring-plugins-1.1.3_3
===>  Checking if percona-monitoring-plugins already installed
===>   Registering installation for percona-monitoring-plugins-1.1.3_3
Installing percona-monitoring-plugins-1.1.3_3...
===>  Cleaning for p5-DBD-mysql-4.043
===>  Cleaning for p5-DBI-1.637
===>  Cleaning for p5-Devel-CheckLib-1.11
===>  Cleaning for bash-4.4.12_3
===>  Cleaning for wget-1.19.2
===>  Cleaning for libidn2-2.0.4
===>  Cleaning for libunistring-0.9.7
===>  Cleaning for percona-monitoring-plugins-1.1.3_3
root@bsd11:/usr/ports/net-mgmt/percona-monitoring-plugins #

 

percona-scripts 설정

root@bsd11:~ # 
root@bsd11:/usr/local/share/cacti/scripts # vi ss_get_mysql_stats.php
$mysql_user = 'cacti';
$mysql_pass = 'password';
$mysql_port = 3306;


 

mysql 설정

root@bsd11:~ #
root@bsd11:~ #
root@bsd11:~ # mysql -uroot -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 57
Server version: 10.2.10-MariaDB-log FreeBSD Ports

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> GRANT SUPER, PROCESS ON *.* TO 'cacti'@'%' IDENTIFIED BY "password";
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> quit;
Bye
root@bsd11:~ #

 

 

 

/usr/local/share/percona-monitoring-plugins/cacti/templates 디렉토리에 모니터링을 할수 있는 Daemon 의 템플릿들이 있습니다. 

ex) mysql , apache 등등

root@bsd11:/usr/local/share/percona-monitoring-plugins/cacti/templates # ls
cacti_host_template_percona_apache_server_ht_0.8.6i-sver1.1.3.xml
cacti_host_template_percona_galera_server_ht_0.8.6i-sver1.1.3.xml
cacti_host_template_percona_gnu_linux_server_ht_0.8.6i-sver1.1.3.xml
cacti_host_template_percona_jmx_server_ht_0.8.6i-sver1.1.3.xml
cacti_host_template_percona_memcached_server_ht_0.8.6i-sver1.1.3.xml
cacti_host_template_percona_mongodb_server_ht_0.8.6i-sver1.1.3.xml
cacti_host_template_percona_mysql_server_ht_0.8.6i-sver1.1.3.xml
cacti_host_template_percona_nginx_server_ht_0.8.6i-sver1.1.3.xml
cacti_host_template_percona_openvz_server_ht_0.8.6i-sver1.1.3.xml
cacti_host_template_percona_rds_server_ht_0.8.6i-sver1.1.3.xml
cacti_host_template_percona_redis_server_ht_0.8.6i-sver1.1.3.xml
root@bsd11:/usr/local/share/percona-monitoring-plugins/cacti/templates #

 

mysql 템플릿 추가

root@bsd11:~ # 
root@bsd11:~ # 
root@bsd11:~ # php /usr/local/share/cacti/cli/import_template.php --filename=/usr/local/share/percona-monitoring-plugins/cacti/templates/cacti_host_template_percona_mysql_server_ht_0.8.6i-sver1.1.3.xml
Read 888147 bytes of XML data
Import ResultsCacti has imported the following items for the Template:
CDEF
[success] Percona Turn Into Bits CDEF [unchanged]
[success] Percona Negate CDEF [unchanged]
GPRINT Preset
[success] Percona MySQL Server Checksum 348cfd8fa45fa8a5357ab261aa9b00ad [new]
[success] Percona MySQL Server Version t1.1.3:s1.1.3 [new]
[success] Percona Normal [unchanged]
Data Input Method
[success] Percona Get MySQL Stats/MyISAM Indexes IM [new]
[success] Percona Get MySQL Stats/MyISAM Key Cache IM [new]
[success] Percona Get MySQL Stats/InnoDB Buffer Pool IM [new]
[success] Percona Get MySQL Stats/InnoDB I/O IM [new]
[success] Percona Get MySQL Stats/InnoDB Insert Buffer IM [new]
[success] Percona Get MySQL Stats/InnoDB Insert Buffer Usage IM [new]
[success] Percona Get MySQL Stats/InnoDB Semaphores IM [new]
[success] Percona Get MySQL Stats/InnoDB Row Operations IM [new]
[success] Percona Get MySQL Stats/MySQL Table Locks IM [new]
[success] Percona Get MySQL Stats/MySQL Connections IM [new]
[success] Percona Get MySQL Stats/MySQL Replication IM [new]
[success] Percona Get MySQL Stats/MySQL Query Cache IM [new]
[success] Percona Get MySQL Stats/MySQL Query Cache Memory IM [new]
[success] Percona Get MySQL Stats/MySQL Command Counters IM [new]
[success] Percona Get MySQL Stats/MySQL Select Types IM [new]
[success] Percona Get MySQL Stats/MySQL Sorts IM [new]
[success] Percona Get MySQL Stats/MySQL Temporary Objects IM [new]
[success] Percona Get MySQL Stats/MySQL Network Traffic IM [new]
[success] Percona Get MySQL Stats/InnoDB Buffer Pool Activity IM [new]
[success] Percona Get MySQL Stats/InnoDB I/O Pending IM [new]
[success] Percona Get MySQL Stats/InnoDB Log IM [new]
[success] Percona Get MySQL Stats/MySQL Binary/Relay Logs IM [new]
[success] Percona Get MySQL Stats/InnoDB Transactions IM [new]
[success] Percona Get MySQL Stats/InnoDB Transactions Active/Locked IM [new]
[success] Percona Get MySQL Stats/MySQL Files and Tables IM [new]
[success] Percona Get MySQL Stats/MySQL Threads IM [new]
[success] Percona Get MySQL Stats/InnoDB Memory Allocation IM [new]
[success] Percona Get MySQL Stats/InnoDB Adaptive Hash Index IM [new]
[success] Percona Get MySQL Stats/InnoDB Internal Hash Memory Usage IM [new]
[success] Percona Get MySQL Stats/InnoDB Tables In Use IM [new]
[success] Percona Get MySQL Stats/InnoDB Current Lock Waits IM [new]
[success] Percona Get MySQL Stats/InnoDB Lock Structures IM [new]
[success] Percona Get MySQL Stats/InnoDB Checkpoint Age IM [new]
[success] Percona Get MySQL Stats/InnoDB Row Lock Time IM [new]
[success] Percona Get MySQL Stats/InnoDB Row Lock Waits IM [new]
[success] Percona Get MySQL Stats/InnoDB Semaphore Waits IM [new]
[success] Percona Get MySQL Stats/InnoDB Semaphore Wait Time IM [new]
[success] Percona Get MySQL Stats/MySQL Processlist IM [new]
[success] Percona Get MySQL Stats/MySQL Transaction Handler IM [new]
[success] Percona Get MySQL Stats/MySQL Handlers IM [new]
[success] Percona Get MySQL Stats/MySQL Query Time Histogram (Count) IM [new]
[success] Percona Get MySQL Stats/MySQL Query Response Time (Microseconds) IM [new]
[success] Percona Get MySQL Stats/InnoDB Buffer Pool Efficiency IM [new]
Data Template
[success] Percona MyISAM Indexes DT [new]
[success] Percona MyISAM Key Cache DT [new]
[success] Percona InnoDB Buffer Pool DT [new]
[success] Percona InnoDB I/O DT [new]
[success] Percona InnoDB Insert Buffer DT [new]
[success] Percona InnoDB Insert Buffer Usage DT [new]
[success] Percona InnoDB Semaphores DT [new]
[success] Percona InnoDB Row Operations DT [new]
[success] Percona MySQL Table Locks DT [new]
[success] Percona MySQL Connections DT [new]
[success] Percona MySQL Replication DT [new]
[success] Percona MySQL Query Cache DT [new]
[success] Percona MySQL Query Cache Memory DT [new]
[success] Percona MySQL Command Counters DT [new]
[success] Percona MySQL Select Types DT [new]
[success] Percona MySQL Sorts DT [new]
[success] Percona MySQL Temporary Objects DT [new]
[success] Percona MySQL Network Traffic DT [new]
[success] Percona InnoDB Buffer Pool Activity DT [new]
[success] Percona InnoDB I/O Pending DT [new]
[success] Percona InnoDB Log DT [new]
[success] Percona MySQL Binary/Relay Logs DT [new]
[success] Percona InnoDB Transactions DT [new]
[success] Percona InnoDB Transactions Active/Locked DT [new]
[success] Percona MySQL Files and Tables DT [new]
[success] Percona MySQL Threads DT [new]
[success] Percona InnoDB Memory Allocation DT [new]
[success] Percona InnoDB Adaptive Hash Index DT [new]
[success] Percona InnoDB Internal Hash Memory Usage DT [new]
[success] Percona InnoDB Tables In Use DT [new]
[success] Percona InnoDB Current Lock Waits DT [new]
[success] Percona InnoDB Lock Structures DT [new]
[success] Percona InnoDB Checkpoint Age DT [new]
[success] Percona InnoDB Row Lock Time DT [new]
[success] Percona InnoDB Row Lock Waits DT [new]
[success] Percona InnoDB Semaphore Waits DT [new]
[success] Percona InnoDB Semaphore Wait Time DT [new]
[success] Percona MySQL Processlist DT [new]
[success] Percona MySQL Transaction Handler DT [new]
[success] Percona MySQL Handlers DT [new]
[success] Percona MySQL Query Time Histogram (Count) DT [new]
[success] Percona MySQL Query Response Time (Microseconds) DT [new]
[success] Percona InnoDB Buffer Pool Efficiency DT [new]
Graph Template
[success] Percona MyISAM Indexes GT [new]
[success] Percona MyISAM Key Cache GT [new]
[success] Percona InnoDB Buffer Pool GT [new]
[success] Percona InnoDB I/O GT [new]
[success] Percona InnoDB Insert Buffer GT [new]
[success] Percona InnoDB Insert Buffer Usage GT [new]
[success] Percona InnoDB Semaphores GT [new]
[success] Percona InnoDB Row Operations GT [new]
[success] Percona MySQL Table Locks GT [new]
[success] Percona MySQL Connections GT [new]
[success] Percona MySQL Replication GT [new]
[success] Percona MySQL Query Cache GT [new]
[success] Percona MySQL Query Cache Memory GT [new]
[success] Percona MySQL Command Counters GT [new]
[success] Percona MySQL Select Types GT [new]
[success] Percona MySQL Sorts GT [new]
[success] Percona MySQL Temporary Objects GT [new]
[success] Percona MySQL Network Traffic GT [new]
[success] Percona InnoDB Buffer Pool Activity GT [new]
[success] Percona InnoDB I/O Pending GT [new]
[success] Percona InnoDB Log GT [new]
[success] Percona MySQL Binary/Relay Logs GT [new]
[success] Percona InnoDB Transactions GT [new]
[success] Percona InnoDB Transactions Active/Locked GT [new]
[success] Percona MySQL Files and Tables GT [new]
[success] Percona MySQL Threads GT [new]
[success] Percona InnoDB Memory Allocation GT [new]
[success] Percona InnoDB Adaptive Hash Index GT [new]
[success] Percona InnoDB Internal Hash Memory Usage GT [new]
[success] Percona InnoDB Tables In Use GT [new]
[success] Percona InnoDB Current Lock Waits GT [new]
[success] Percona InnoDB Lock Structures GT [new]
[success] Percona InnoDB Checkpoint Age GT [new]
[success] Percona InnoDB Row Lock Time GT [new]
[success] Percona InnoDB Row Lock Waits GT [new]
[success] Percona InnoDB Semaphore Waits GT [new]
[success] Percona InnoDB Semaphore Wait Time GT [new]
[success] Percona MySQL Processlist GT [new]
[success] Percona MySQL Transaction Handler GT [new]
[success] Percona MySQL Handlers GT [new]
[success] Percona MySQL Query Time Histogram (Count) GT [new]
[success] Percona MySQL Query Response Time (Microseconds) GT [new]
[success] Percona InnoDB Buffer Pool Efficiency GT [new]
Device Template
[success] Percona MySQL Server HT [new]
root@bsd11:~ #

 

ss_get_mysql_stats.php 스크립트 테스트

root@bsd11:~ # php -q /usr/local/share/cacti/scripts/ss_get_mysql_stats.php --host localhost --items mm,mw,mx,my
mm:62762 mw:0 mx:0 my:0root@bsd11:~ #

 

 

웹브라우저 설정

data source 수정

 

Mariadb-Server Device 생성

 

Create Graphs for this Device 를 눌러 모니터링 항목을 지정 합니다.

 

모니터링 항목지정

모니터링 항목 지정후 Create 를 눌러 그래프를 생성 합니다.

 

모니터링 결과 확인

(그래프의 경우 약 5 ~ 10분후 확인 가능 합니다.)

 

DB 모니터링의 경우 System 모니터링보다 다소 시간이 걸립니다.

 

 

 

참고 자료

Import 참고 // php 명령어로 Import 시킬수 있으며 Web 브라우저에서도 Import 가능 합니다.  

 

 

 

 

Cacti-spine 설치

 

기존 cmd.php 사용시 모니터링 장비가 늘어날 경우 모니터링을 할수 없는 현상이 발생할수 있습니다.

 

참고자료

https://www.cacti.net/downloads/docs/html/using_spine.html

Chapter 15. Spine

Spine is the fast replacement for cmd.php. It is written in C to ensure ultimate performance for device polling. Expect a decrease in polling time of an order of magnitude. Polling times far less than 60 seconds for about 20,000 data sources are achievable e.g. on a dual XEON system supplied with 4 GB RAM and standard local disks.

 

When using Spine, don’t change crontab settings! Always use poller.php with crontab! To activate Spine instead of cmd.php, please visit Settings and select the Poller tab. Select Spine and save. Now, poller.php will use Spine on all subsequent polling cycles.

 

While Spine is really fast, choosing the correct setup will ensure, that all processor resources are used. Required settings for Maximum Concurrent Poller Processes are 1-2 times the number of CPU cores available for Spine.

 

 

 

 

Table 15-1. Spine Specific Execution Parameters

Maximum Threads per Process

The maximum threads allowed per process. Using a higher number when using Spine will improve performance. Required settings are 10-15. Values above 50 are most often insane and may degrade preformance

Number of PHP Script Servers

The number of concurrent script server processes to run per Spine process. Settings between 1 and 10 are accepted. Script Servers will pre-load a PHP environment. Then, the Script Server Scripts are included into that environment to save the overhead of reloading PHP each and every time.

Script and Script Server Timeout Value

The maximum time that Spine will wait on a script to complete, in units of seconds. If a Script Server Script is terminated due to timeout conditions, the value entered into the rrd file will be NaN

The Maximum SNMP OID’s Per SNMP Get Request

The maximum number of snmp get OID’s to issue per snmp request. Increasing this value speeds poller performance over slow links. The maximum value is 60 OID’s. Please bear in mind, that some type of devices do not accept huge OID numbers and may fail if set above 1. That’s why cacti 0.8.7 allows to define this value at device level

 

cacti-spine 설치

root@bsd11:~ # whereis cacti-spine
cacti-spine: /usr/ports/net-mgmt/cacti-spine
root@bsd11:~ # cd /usr/ports/net-mgmt/cacti-spine/ && make install clean

 

설치 완료후 메세지

Installing spine-1.1.27...
===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/bin/spine

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage:
https://cacti.net/spine_info.php
===>  Cleaning for spine-1.1.27
root@bsd11:/usr/ports/net-mgmt/cacti-spine #

/usr/local/etc/spine.conf 를 설정 합니다.

root@bsd11:/usr/ports/net-mgmt/cacti-spine # rehash
root@bsd11:/usr/ports/net-mgmt/cacti-spine # vi /usr/local/etc/spine.conf
DB_Host                 localhost
DB_Database             cacti
DB_User                 cacti
DB_Pass                 password
DB_Port                 3306

 

Web 브라우저 설정

Configuration -> Settings -> 상위 메뉴 Poller 에서 poller Type 를 spine 으로 변경

Poller Interval 의 경우 Every Minute 으로 변경 합니다. 

Maximum Threads per Process
(The maximum threads allowed per process. Using a higher number when using Spine will improve performance)

Default 1 -> 16 변경

Number of PHP Script Servers
(The number of concurrent script server processes to run per Spine process. Settings between 1 and 10 are accepted. This parameter will help if you are running several threads and script server scripts)

Default 1 -> 8 변경

 

FreeBSD10 mysql57-server install 

 

root@bsd10:~ # whereis mysql57-server
mysql57-server: /usr/ports/databases/mysql57-server
root@bsd10:~ # cd /usr/ports/databases/mysql57-server && make install clean

 

OK 선택 하여 설치를 진행 합니다.

설치완료후 메세지

*****************************************************************************

Remember to run mysql_upgrade the first time you start the MySQL server
after an upgrade from an earlier version.

Initial password for first time use of MySQL is saved in $HOME/.mysql_secret
ie. when you want to use "mysql -u root -p" first you should see password
in /root/.mysql_secret

MySQL57 has a default %%ETCDIR%%/my.cnf,
remember to replace it wit your own
or set `mysql_optfile="$YOUR_CNF_FILE` in rc.conf.

*****************************************************************************

===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/lib/mysql/plugin/mysqlx.so
/usr/local/lib/mysql/plugin/group_replication.so
/usr/local/libexec/mysqld

      This port has installed the following startup scripts which may cause
      these network services to be started at boot time.
/usr/local/etc/rc.d/mysql-server

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage:
http://www.mysql.com/
root@bsd10:/usr/ports/databases/mysql57-server #

 

DB 디렉토리 생성

root@bsd10:~ # mkdir /mysql
root@bsd10:~ # chown -R mysql:mysql /mysql

 

/etc/rc.conf 수정

root@bsd10:~ # vi /etc/rc.conf
mysql_enable="YES"
mysql_dbdir="/mysql"

 

my.cnf  수정

root@bsd10:~ # vi /usr/local/etc/mysql/my.cnf
[client]
port                            = 3306
socket                          = /tmp/mysql.sock
default-character-set = utf8

[mysqld]
user                            = mysql
port                            = 3306
socket                          = /tmp/mysql.sock
bind-address                    = 127.0.0.1
basedir                         = /usr/local
#datadir                         = /var/db/mysql
datadir                         = /mysql

character-set-server=utf8
skip-character-set-client-handshake

 

mysql-server 구동및 동작확인

root@bsd10:~ # service mysql-server start
Starting mysql.
root@bsd10:~ #
root@bsd10:~ # sockstat -4|grep -i mysql
mysql    mysqld     69144 23 tcp4   127.0.0.1:3306        *:*
root@bsd10:~ #

 

mysql-server 설정

root@bsd10:~ # /usr/local/bin/mysql_secure_installation
mysql_secure_installation: [ERROR] unknown variable 'default-character-set=utf8'

Securing the MySQL server deployment.

Connecting to MySQL server using password in '/root/.mysql_secret'

VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No: no
Using existing password for root.
Change the password for root ? ((Press y|Y for Yes, any other key for No) : y

New password:

Re-enter new password:
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.


Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Success.

By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.


Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y
 - Dropping test database...
Success.

 - Removing privileges on test database...
Success.

Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y
Success.

All done!
root@bsd10:~ #

 

패스워드 변경 및 locale 확인

root@bsd10:~ # mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.7.20-log

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

root@localhost [(none)]> SET PASSWORD FOR root@localhost=password('password');
Query OK, 0 rows affected, 1 warning (0.00 sec)

root@localhost [(none)]> quit;
Bye
root@bsd10:~ # mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.7.20-log Source distribution

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

root@localhost [(none)]> status;
--------------
mysql  Ver 14.14 Distrib 5.7.20, for FreeBSD10.4 (amd64) using  EditLine wrapper

Connection id:          8
Current database:
Current user:           root@localhost
SSL:                    Not in use
Current pager:          more
Using outfile:          ''
Using delimiter:        ;
Server version:         5.7.20-log Source distribution
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    utf8
Db     characterset:    utf8
Client characterset:    utf8
Conn.  characterset:    utf8
UNIX socket:            /tmp/mysql.sock
Uptime:                 3 min 48 sec

Threads: 1  Questions: 30  Slow queries: 0  Opens: 117  Flush tables: 1  Open ta                                                                                                                                                                                               bles: 111  Queries per second avg: 0.131
--------------

root@localhost [(none)]> quit;
Bye
root@bsd10:~ #

 

cacti 권장 my.cnf 값

character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
skip-character-set-client-handshake
max_heap_table_size             = 200M
tmp_table_size                  = 64M
join_buffer_size                = 64M
innodb_doublewrite              = OFF
innodb_flush_log_at_timeout     = 3
innodb_read_io_threads          = 32
innodb_write_io_threads         = 16