I am looking for some tuning assistance for MySQL which is filling up /var on our system.
Below are the specifics I have.
Nagios XI 5.4.4 running on Red Hat Enterprise 6.8
/var was at 100% and I managed to remove some zipped logs, etc. to get it down to 99% which was just enough to allow the db repair script to run and optimize which brought /var down to 60%.
The largest directory based on size under /var is /var/lib/mysql and within that directory I see the following (note the 9.9G for the nagios dir)
Code: Select all
# du -sh *
10M ibdata1
5.0M ib_logfile0
5.0M ib_logfile1
988K mysql
9.9G nagios
8.6M nagiosql
43M nagiosxi
4.0K test
Code: Select all
2.5G nagios_logentries.MYD
945M nagios_logentries.MYI
484M nagios_statehistory.MYD
190M nagios_statehistory.MYI
Code: Select all
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
# Inserting new line below to resolve /tmp filling up - Kerry Dec. 2017
tmpdir=/var/tmp
Code: Select all
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 9.8G 713M 8.6G 8% /
tmpfs 32G 0 32G 0% /dev/shm
/dev/sda1 240M 96M 132M 43% /boot
/dev/sda8 15G 65M 14G 1% /home
/dev/sda7 4.8G 12M 4.6G 1% /tmp
/dev/sda6 9.8G 1.9G 7.4G 21% /usr
/dev/sda5 16G 8.9G 6.0G 60% /var
/dev/mapper/VG01-Vmysql
40G 48M 38G 1% /opt/app/mysql
/dev/mapper/VG02-Vworkload
79G 7.8G 67G 11% /opt/app/workload
/dev/mapper/VG03-Vlogs
40G 48M 38G 1% /opt/logs
/dev/mapper/VG04-Vdata
40G 48M 38G 1% /opt/data
/dev/mapper/VG05-Vtools
40G 48M 38G 1% /opt/tools
Thanks much.