Hard Disk Space

Getting a message now saying the hard disk space is 76% full /dev/md2 how can i check whats going on, this server isnt used at the moment its just plugged in and being setup up for migration to.

No backups are running as they have not been configured and its not receiving any calls through it yet.

What is the capacity? 76% of 10G is not a surprise. 76% of 500g would be a thing

James

The drives are 60gb at the moment its at : using 41,115.44m of 54,995.21 83%

Since i posted nothing has been changed or a call made, i am slowly running out of space.

/dev/md2 using 41,115.44m of 54,995.21m (83%)

/dev/md0 using 31.36m of 290.45m (12%)

A handy command to run is du -sh * as it shows the size of CONTENTS of the subdirectories of the dir you are are in

As an example:

[root@localhost ~]# cd /var
[root@localhost var]# du -sh *
41M cache
8.0K db
8.0K empty
8.0K ftp
4.0K games
199M lib
4.0K local
16K lock
48M log
0 mail
4.0K nis
4.0K opt
4.0K preserve
192K run
200K spool
4.0K tmp
200M www
4.0K yp
[root@localhost var]#

If you wanted to be slightly smarter, you can turn off the ‘human’ readable format, and then sort by size:

root@localhost var]# du -s * | sort -n
0 mail
4 games
4 local
4 nis
4 opt
4 preserve
4 tmp
4 yp
8 db
8 empty
8 ftp
16 lock
192 run
200 spool
41720 cache
48880 log
203608 lib
204636 www
[root@localhost var]#

Rob

Thanks for that, will have to remember that command. Think i might have a slight problems with the log, also spool looks quite high also.

28M cache
8.0K db
8.0K empty
8.0K ftp
4.0K games
345M lib
4.0K local
16K lock
39G log
0 mail
4.0K nis
4.0K opt
4.0K preserve
172K run
2.1G spool
4.0K tmp
364M www
4.0K yp

Your log files are way too big, investigate why!

du -h --max-depth=1 /var/log

then (my guess)

ls -lsrS /Var/log/asterisk/

check the contents of the last few files (lines returned)

. . . .

Dicko

Thanks for the commands, looks like fail2ban is logging alot this would be constant with my router, I have a draytek router that has been hit with a lot of DOS attacks in the last couple of months.

[root@localhost ~]# du -h --max-depth=1 /var/log
43G /var/log/mysql
4.0K /var/log/ntpstats
664K /var/log/pbx
4.0K /var/log/prosody
3.9M /var/log/httpd
96M /var/log/asterisk
30M /var/log/audit
8.0K /var/log/ConsoleKit
43G /var/log

[root@localhost ~]# ls -lsrs /var/log/asterisk/
total 98100
4 -rwxrwxr-x 1 asterisk asterisk 240 Dec 12 22:22 queue_log-20141213
4 -rwxrwxr-x 1 asterisk asterisk 40 Dec 11 03:31 queue_log-20141212
4 -rwxrwxr-x 1 asterisk asterisk 40 Dec 10 03:36 queue_log-20141211
4 -rwxrwxr-x 1 asterisk asterisk 40 Dec 9 03:11 queue_log-20141210
4 -rwxrwxr-x 1 asterisk asterisk 78 Dec 8 03:37 queue_log-20141209
4 -rwxrwxr-x 1 asterisk asterisk 80 Dec 7 15:58 queue_log-20141208
4 -rwxrwxr-x 1 asterisk asterisk 40 Dec 6 04:46 queue_log-20141207
4 -rwxrwxr-x 1 asterisk asterisk 40 Dec 5 03:18 queue_log-20141206
4 -rwxrwxr-x 1 asterisk asterisk 40 Dec 4 03:45 queue_log-20141205
4 -rwxrwxr-x 1 asterisk asterisk 40 Dec 3 03:06 queue_log-20141204
4 -rwxrwxr-x 1 asterisk asterisk 120 Dec 2 15:52 queue_log-20141203
4 -rwxrwxr-x 1 asterisk asterisk 40 Dec 1 03:16 queue_log-20141202
4 -rwxrwxr-x 1 asterisk asterisk 240 Nov 30 14:41 queue_log-20141201
4 -rwxrwxr-x 1 asterisk asterisk 40 Nov 29 03:50 queue_log-20141130
4 -rwxrwxr-x 1 asterisk asterisk 40 Nov 28 03:26 queue_log-20141129
4 -rwxrwxr-x 1 asterisk asterisk 318 Nov 27 11:52 queue_log-20141128
4 -rwxrwxr-x 1 asterisk asterisk 40 Nov 26 03:46 queue_log-20141127
4 -rwxrwxr-x 1 asterisk asterisk 40 Nov 25 03:38 queue_log-20141126
4 -rwxrwxr-x 1 asterisk asterisk 40 Nov 24 03:07 queue_log-20141125
4 -rwxrwxr-x 1 asterisk asterisk 40 Nov 23 03:34 queue_log-20141124
4 -rwxrwxr-x 1 asterisk asterisk 40 Nov 22 03:35 queue_log-20141123
4 -rwxrwxr-x 1 asterisk asterisk 40 Nov 21 03:31 queue_log-20141122
4 -rwxrwxr-x 1 asterisk asterisk 40 Nov 20 03:12 queue_log-20141121
4 -rwxrwxr-x 1 asterisk asterisk 478 Nov 19 14:16 queue_log-20141120
4 -rwxrwxr-x 1 asterisk asterisk 440 Nov 18 22:06 queue_log-20141119
4 -rwxrwxr-x 1 asterisk asterisk 320 Nov 17 22:13 queue_log-20141118
4 -rwxrwxr-x 1 asterisk asterisk 356 Nov 16 21:06 queue_log-20141117
4 -rwxrwxr-x 1 asterisk asterisk 80 Nov 15 21:52 queue_log-20141116
4 -rwxrwxr-x 1 asterisk asterisk 40 Nov 14 03:40 queue_log-20141115
4 -rwxrwxr-x 1 asterisk asterisk 240 Nov 13 19:35 queue_log-20141114
4 -rw-r----- 1 asterisk asterisk 40 Dec 13 04:09 queue_log
13036 -rwxrwxr-x 1 asterisk asterisk 13342448 Dec 13 04:09 full-20141213
11188 -rwxrwxr-x 1 asterisk asterisk 11451689 Dec 12 03:40 full-20141212
11240 -rwxrwxr-x 1 asterisk asterisk 11502177 Dec 11 03:31 full-20141211
11624 -rwxrwxr-x 1 asterisk asterisk 11897149 Dec 10 03:36 full-20141210
11168 -rwxrwxr-x 1 asterisk asterisk 11429981 Dec 9 03:11 full-20141209
11164 -rwxrwxr-x 1 asterisk asterisk 11427589 Dec 8 03:37 full-20141208
9040 -rwxrwxr-x 1 asterisk asterisk 9251037 Dec 7 03:21 full-20141207
7276 -rw-r----- 1 asterisk asterisk 7443947 Dec 13 19:56 full
4 -rwxrwxr-x 1 asterisk asterisk 359 Nov 26 21:05 freepbx_security.log
728 -rwxrwxr-x 1 asterisk asterisk 739419 Dec 13 04:05 freepbx.log-20141213
84 -rwxrwxr-x 1 asterisk asterisk 79180 Dec 12 03:35 freepbx.log-20141212
84 -rwxrwxr-x 1 asterisk asterisk 78560 Dec 11 03:30 freepbx.log-20141211
84 -rwxrwxr-x 1 asterisk asterisk 80213 Dec 10 03:35 freepbx.log-20141210
80 -rwxrwxr-x 1 asterisk asterisk 77464 Dec 9 03:10 freepbx.log-20141209
424 -rwxrwxr-x 1 asterisk asterisk 428776 Dec 8 03:35 freepbx.log-20141208
84 -rwxrwxr-x 1 asterisk asterisk 78746 Dec 7 03:20 freepbx.log-20141207
64 -rw-r----- 1 asterisk asterisk 57439 Dec 13 19:55 freepbx.log
4 -rwxrwxr-x 1 asterisk asterisk 291 Dec 7 17:23 freepbx_debug-20141208
4 -rwxrwxr-x 1 asterisk asterisk 291 Nov 27 11:32 freepbx_debug-20141128
4 -rwxrwxr-x 1 asterisk asterisk 291 Nov 19 08:50 freepbx_debug-20141120
4 -rwxrwxr-x 1 asterisk asterisk 873 Nov 16 18:45 freepbx_debug-20141117
4 -rwxrwxr-x 1 asterisk asterisk 582 Nov 12 10:59 freepbx_debug-20141113
4 -rwxrwxr-x 1 asterisk asterisk 873 Oct 18 15:21 freepbx_debug-20141019
4 -rwxrwxr-x 1 asterisk asterisk 291 Sep 28 22:36 freepbx_debug-20140929
0 -rwxrwxr-x 1 asterisk asterisk 0 Dec 8 03:37 freepbx_debug
1480 -rwxrwxr-x 1 asterisk asterisk 1507646 Dec 13 04:08 fail2ban-20141213
1392 -rwxrwxr-x 1 asterisk asterisk 1421084 Dec 12 03:40 fail2ban-20141212
1380 -rwxrwxr-x 1 asterisk asterisk 1407435 Dec 11 03:30 fail2ban-20141211
1412 -rwxrwxr-x 1 asterisk asterisk 1438379 Dec 10 03:36 fail2ban-20141210
1360 -rwxrwxr-x 1 asterisk asterisk 1387737 Dec 9 03:10 fail2ban-20141209
1396 -rwxrwxr-x 1 asterisk asterisk 1422990 Dec 8 03:37 fail2ban-20141208
1216 -rwxrwxr-x 1 asterisk asterisk 1240313 Dec 7 03:20 fail2ban-20141207
932 -rw-r----- 1 asterisk asterisk 947932 Dec 13 19:56 fail2ban
4 drwxrwxr-x. 2 asterisk asterisk 4096 Apr 23 2014 cdr-custom
4 drwxrwxr-x. 2 asterisk asterisk 4096 Jun 4 2014 cdr-csv

The most noticable thing is

43G /var/log/mysql

This is definitely “abnormal” to say the least, have you added anything to your my.cnf file ?, show us your:-

ls -lsrS /var/log/mysql

Not added anything to my.cnf file, only started noticing problems when i switch from the OSS endpoint manager to the commercial module, the server only has 3 extensions, 3 sip trunks and a sangoma a200 card but this isnt used at the moment as i cant get the disconnect supervision working properly for the UK.

[root@localhost ~]# ls -lsrs /var/log/mysql
total 44324056
44324056 -rw-rw---- 1 mysql mysql 45387817267 Dec 13 22:31 mysql.log

Then you need to start logrotate ing your mysql logs (google how to do that)

but first, to reveal your ‘chattiness’ , please post the issue of:-

tail -50 /var/log/mysql/mysql.log

and for the hell of it

head -10 /var/log/mysql/mysql.log

Dicko

The first bit is too large to post, will try agian

[root@localhost ~]# head -10 /var/log/mysql/mysql.log
/usr/libexec/mysqld, Version: 5.1.73-log (Source distribution). started with:
Tcp port: 0 Unix socket: /var/lib/mysql/mysql.sock
Time Id Command Argument
140604 13:42:54 1 Connect UNKNOWN_MYSQL_US@localhost as anonymous on
1 Quit
140604 13:43:05 2 Connect freepbxuser@localhost on
2 Init DB asterisk
2 Init DB asterisk
2 Query SELECT * FROM freepbx_settings ORDER BY category, sortorder, name

Body is limited to 32000 characters; you entered 156827.

Had to cut alot off, hope what you are after seeing is there.

[root@localhost ~]# tail -50 /var/log/mysql/mysql.log
34210 Query SELECT val, type FROM kvstore WHERE modul e = ‘Dashboard’ AND key = ‘1418529600’ AND id = 'HOUR’
34210 Query SELECT val, type FROM kvstore WHERE modul e = ‘Dashboard’ AND key = ‘1418533200’ AND id = 'HOUR’
34210 Query DELETE FROM kvstore WHERE module = ‘Dashboar d’ AND key = ‘1418515200’ AND id = 'QTRDAY’
34210 Query INSERT INTO kvstore ( module, key, val, type, id ) VALUES ( ‘Dashboard’, ‘1418515200’, ‘{“psi.@attributes.xmlns:tns “:“http:\/\/phpsysinfo.sourceforge.net\/”,“psi.@attributes.xmlns:xsi”:” http:\/\/www.w3.org\/2001\/XMLSchema-instance”,“psi.@attributes.xsi:schema Location”:“http:\/\/phpsysinfo.sourceforge.net\/ phpsysinfo3.xsd”,“psi.Ge neration.@attributes.version”:“3.1.11”,“psi.Options.@attributes.tempFormat” :“c”,“psi.Options.@attributes.byteFormat”:“auto_binary”,“psi.Options.@att ributes.showPickListTemplate”:“true”,“psi.Options.@attributes.showPickListLa ng":“true”,"[email protected]”:“mdstatus”,“psi.U [email protected]”:“smart”,“psi.UsedPlugins.Plugin.2.@att ributes.name”:“ipmiinfo”,“psi.Vitals.@attributes.Hostname”:“localhost”," psi.Vitals.@attributes.IPAddr":“127.0.0.1”,“psi.Vitals.@attributes.Kernel”: “2.6.32-431.el6.i686 (SMP) i686”,“psi.Vitals.@attributes.Distro”:“SHMZ rele ase 6.5 (Final)”,“psi.Vitals.@attributes.Distroicon”:“CentOS.png”,“psi.Vit als.@attributes.LoadAvg”:“0.03 0.11 0.09”,“psi.Vitals.@attributes.SysLang”: “English United States (en_US)”,“psi.Vitals.@attributes.CodePage”:“UTF-8”, “psi.Vitals.@attributes.OS”:“Linux”,“psi.Network.NetDevice.0.@attributes.Na me":“lo”,"[email protected]”:“127.0.0.1;::1”,“psi [email protected]”:“eth0”,“psi.Network.NetDevice.1.@attr ibutes.Info”:“MAC-IPADDRESS”,“psi.Network.NetDevice.2.@attr ibutes.Name":“eth1”,"[email protected]":“MAC”,"[email protected]”:“w1g1”,“psi.Hardware.U [email protected]”:“Linux Foundation 2.0 root hub”,“psi.Hardware. [email protected]”:“Linux Foundation 1.1 root hub”,“psi.Hardware [email protected]”:“ATEN International Co., Ltd Winbond Hermon”, "[email protected]":“ATA FUJITSU MHW2060B (Direc t-Access)”,“psi.Hardware.CPU.CpuCore.0.@attributes.Model”:“Intel® Atom™ CPU D525 @ 1.80GHz”,“psi.Hardware.CPU.CpuCore.1.@attributes.Model”:“Intel ® Atom™ CPU D525 @ 1.80GHz”,“psi.Hardware.CPU.CpuCore.2.@attributes.Mod el”:“Intel® Atom™ CPU D525 @ 1.80GHz”,“psi.Hardware.CPU.CpuCore.3.@at tributes.Model”:“Intel® Atom™ CPU D525 @ 1.80GHz”,“psi.Memory.Swap.Mo unt.@attributes.FSType”:"",“psi.Memory.Swap.Mount.@attributes.Name”:“SWAP\ “,“psi.Memory.Swap.Mount.@attributes.MountPoint”:”\/dev\/md1”,“psi.FileSy stem.Mount.0.@attributes.FSType”:“ext4”,“psi.FileSystem.Mount.0.@attributes. Name”:"\/dev\/md2",“psi.FileSystem.Mount.0.@attributes.MountOptions”:“rw “,“psi.FileSystem.Mount.0.@attributes.MountPoint”:”\/”,“psi.FileSystem.Mo unt.1.@attributes.FSType”:“tmpfs”,“psi.FileSystem.Mount.1.@attributes.Name” :“tmpfs”,“psi.FileSystem.Mount.1.@attributes.MountOptions”:“rw”,“psi.File System.Mount.1.@attributes.MountPoint”:"\/dev\/shm",“psi.FileSystem.Mount. 2.@attributes.FSType”:“ext4”,“psi.FileSystem.Mount.2.@attributes.Name”:"\ /dev\/md0",“psi.FileSystem.Mount.2.@attributes.MountOptions”:“rw”,“psi.Fi leSystem.Mount.2.@attributes.MountPoint”:"\/boot",“psi.Plugins.Plugin_MDSta [email protected]”:“raid1”,“psi.Plugins.Plugin_MDSta tus.Raid.0.@attributes.Device_Name”:“md0”,“psi.Plugins.Plugin_MDStatus.Raid. 0.@attributes.Level”:“raid1”,“psi.Plugins.Plugin_MDStatus.Raid.0.@attributes .Disk_Status”:“active”,“psi.Plugins.Plugin_MDStatus.Raid.0.Disks.Disk.0.@att ributes.Name”:“sda1”,“psi.Plugins.Plugin_MDStatus.Raid.0.Disks.Disk.0.@attri butes.Status”:"",“psi.Plugins.Plugin_MDStatus.Raid.0.Disks.Disk.1.@attribute s.Name”:“sdb1”,“psi.Plugins.Plugin_MDStatus.Raid.0.Disks.Disk.1.@attributes. Status”:"",“psi.Plugins.Plugin_MDStatus.Raid.1.@attributes.Device_Name”:“m d2”,“psi.Plugins.Plugin_MDStatus.Raid.1.@attributes.Level”:“raid1”,“psi.Pl ugins.Plugin_MDStatus.Raid.1.@attributes.Disk_Status”:“active”,“psi.Plugins. [email protected]”:“sdb3”,“psi.Plugins.Pl ugin_MDStatus.Raid.1.Disks.Disk.0.@attributes.Status”:"",“psi.Plugins.Plugin [email protected]":“sda3”,“psi.Plugins.Plugin_M DStatus.Raid.1.Disks.Disk.1.@attributes.Status”:"",“psi.Plugins.Plugin_MDSta tus.Raid.2.@attributes.Device_Name”:“md1”,“psi.Plugins.Plugin_MDStatus.Raid. 2.@attributes.Level”:“raid1”,“psi.Plugins.Plugin_MDStatus.Raid.2.@attributes .Disk_Status”:“active”,“psi.Plugins.Plugin_MDStatus.Raid.2.Disks.Disk.0.@att ributes.Name”:“sdb2”,“psi.Plugins.Plugin_MDStatus.Raid.2.Disks.Disk.0.@attri butes.Status”:"",“psi.Plugins.Plugin_MDStatus.Raid.2.Disks.Disk.1.@attribute s.Name”:“sda2”,“psi.Plugins.Plugin_MDStatus.Raid.2.Disks.Disk.1.@attributes. Status”:"",“psi.Errors.Error.0.@attributes.Function”:“errorHandlerPsi :”, “psi.Errors.Error.1.@attributes.Function”:“errorHandlerPsi :”,“psi.Errors.E rror.2.@attributes.Function”:“errorHandlerPsi :”,“psi.Errors.Error.3.@attrib utes.Function”:“errorHandlerPsi :”,“psi.Errors.Error.4.@attributes.Function\ “:“find_program(ipmitool)”,“ast.uptime.system”:“6 days, 7 hours, 4 minutes, 50 seconds, “,“ast.uptime.reload”:“1 day, 2 hours, 6 minutes, 5 seconds, " ,"[email protected]”:false,“psi.Plug ins.Plugin_MDStatus.Raid.1.Action.@attributes.Time_Unit”:false,“psi.Generation .@attributes.timestamp”:1418526829,“psi.Options.@attributes.refresh”:60000,” psi.Options.@attributes.threshold”:90,“psi.Vitals.@attributes.Uptime”:553874. 07125,“psi.Vitals.@attributes.Users”:0.16666666666667,“psi.Network.NetDevice. 0.@attributes.RxBytes”:63367108.5,“psi.Network.NetDevice.0.@attributes.TxBytes “:63367108.5,“psi.Network.NetDevice.0.@attributes.Err”:0,“psi.Network.NetDev ice.0.@attributes.Drops”:0,“psi.Network.NetDevice.1.@attributes.RxBytes”:8150 89888.75,“psi.Network.NetDevice.1.@attributes.TxBytes”:114727601.75,“psi.Netw ork.NetDevice.1.@attributes.Err”:0,“psi.Network.NetDevice.1.@attributes.Drops\ “:0,“psi.Network.NetDevice.2.@attributes.RxBytes”:0,“psi.Network.NetDevice.2. @attributes.TxBytes”:0,“psi.Network.NetDevice.2.@attributes.Err”:0,“psi.Netw ork.NetDevice.2.@attributes.Drops”:0,“psi.Network.NetDevice.3.@attributes.RxBy tes”:135541473,“psi.Network.NetDevice.3.@attributes.TxBytes”:135541473,“psi. Network.NetDevice.3.@attributes.Err”:0,“psi.Network.NetDevice.3.@attributes.Dr ops”:0,“psi.Hardware.USB.Device.0.@attributes.Count”:2,“psi.Hardware.USB.Dev ice.1.@attributes.Count”:6,“psi.Hardware.USB.Device.2.@attributes.Count”:1,” psi.Hardware.SCSI.Device.@attributes.Count”:2,“psi.Hardware.CPU.CpuCore.0.@att ributes.CpuSpeed”:1800.072,“psi.Hardware.CPU.CpuCore.0.@attributes.Cache”:524 288,“psi.Hardware.CPU.CpuCore.0.@attributes.Bogomips”:3600.14,“psi.Hardware.C PU.CpuCore.1.@attributes.CpuSpeed”:1800.072,“psi.Hardware.CPU.CpuCore.1.@attri butes.Cache”:524288,“psi.Hardware.CPU.CpuCore.1.@attributes.Bogomips”:3600.14 ,“psi.Hardware.CPU.CpuCore.2.@attributes.CpuSpeed”:1800.072,“psi.Hardware.CPU .CpuCore.2.@attributes.Cache”:524288,“psi.Hardware.CPU.CpuCore.2.@attributes.B ogomips”:3600.14,“psi.Hardware.CPU.CpuCore.3.@attributes.CpuSpeed”:1800.072,\ “psi.Hardware.CPU.CpuCore.3.@attributes.Cache”:524288,“psi.Hardware.CPU.CpuCor e.3.@attributes.Bogomips”:3600.14,“psi.Memory.@attributes.Free”:94055253.3333 33,“psi.Memory.@attributes.Used”:1890624682.6667,“psi.Memory.@attributes.Tota l”:1984679936,“psi.Memory.@attributes.Percent”:95.625,“psi.Memory.Details.@a ttributes.App”:255723520,“psi.Memory.Details.@attributes.AppPercent”:13.25,” psi.Memory.Details.@attributes.Buffers”:160698368,“psi.Memory.Details.@attribu tes.BuffersPercent”:9,“psi.Memory.Details.@attributes.Cached”:1474202794.6667 ,“psi.Memory.Details.@attributes.CachedPercent”:74.791666666667,“psi.Memory.S wap.@attributes.Free”:1072394240,“psi.Memory.Swap.@attributes.Used”:749568,” psi.Memory.Swap.@attributes.Total”:1073143808,“psi.Memory.Swap.@attributes.Per cent”:1,“psi.Memory.Swap.Mount.@attributes.MountPointID”:1,“psi.Memory.Swap. Mount.@attributes.Free”:1072394240,“psi.Memory.Swap.Mount.@attributes.Used”:7 49568,“psi.Memory.Swap.Mount.@attributes.Total”:1073143808,“psi.Memory.Swap.M ount.@attributes.Percent”:1,“psi.FileSystem.Mount.0.@attributes.MountPointID” :1,“psi.FileSystem.Mount.0.@attributes.Free”:3985270442.6667,“psi.FileSystem. Mount.0.@attributes.Used”:50752039253.333,“psi.FileSystem.Mount.0.@attributes. Total”:57666654208,“psi.FileSystem.Mount.0.@attributes.Percent”:88.5833333333 33,“psi.FileSystem.Mount.0.@attributes.Inodes”:2,“psi.FileSystem.Mount.1.@att ributes.MountPointID”:2,“psi.FileSystem.Mount.1.@attributes.Free”:992337920,\ “psi.FileSystem.Mount.1.@attributes.Used”:0,“psi.FileSystem.Mount.1.@attribute s.Total”:992337920,“psi.FileSystem.Mount.1.@attributes.Percent”:0,“psi.FileS ystem.Mount.1.@attributes.Inodes”:1,“psi.FileSystem.Mount.2.@attributes.MountP ointID”:3,“psi.FileSystem.Mount.2.@attributes.Free”:255951872,“psi.FileSyste m.Mount.2.@attributes.Used”:32882688,"psi.FileSystem.Mount.2.@attributes.Total ":304559104,“psi.FileSystem.Mount.2.@attributes.Percent”:11,“psi.FileSystem. Mount.2.@attributes.Inodes”:1,“psi.Plugins.Plugin_MDStatus.Raid.0.@attributes. Chunk_Size”:-1,“psi.Plugins.Plugin_MDStatus.Raid.0.@attributes.Persistend_Supe rblock”:1,“psi.Plugins.Plugin_MDStatus.Raid.0.@attributes.Algorithm”:-1,“psi .Plugins.Plugin_MDStatus.Raid.0.@attributes.Disks_Registered”:2,“psi.Plugins.P lugin_MDStatus.Raid.0.@attributes.Disks_Active”:2,“psi.Plugins.Plugin_MDStatus .Raid.0.Action.@attributes.Percent”:-1,“psi.Plugins.Plugin_MDStatus.Raid.0.Act [email protected]”:-1,“psi.Plugins.Plugin_MDStatus.Raid.0.Action.@attribute s.Time_To_Finish”:-1,“psi.Plugins.Plugin_MDStatus.Raid.0.Action.@attributes.Ti me_Unit”:-1,"psi.Plugins.Plugin_MDStatus.Raid.0.Disks.Disk.0.@attributes.Index ":0,“psi.Plugins.Plugin_MDStatus.Raid.0.Disks.Disk.1.@attributes.Index”:1,“p si.Plugins.Plugin_MDStatus.Raid.1.@attributes.Chunk_Size”:-1,“psi.Plugins.Plug in_MDStatus.Raid.1.@attributes.Persistend_Superblock”:1,“psi.Plugins.Plugin_MD Status.Raid.1.@attributes.Algorithm”:-1,“psi.Plugins.Plugin_MDStatus.Raid.1.@a ttributes.Disks_Registered”:2,“psi.Plugins.Plugin_MDStatus.Raid.1.@attributes. Disks_Active”:2,"psi.Plugins.Plugin_MDStatus.Raid.1.Action.@attributes.Percent ":8.6083333333333,"psi.Plugins.Plugin_MDStatus.Raid.1.Action.@attributes.Time To_Finish”:5.1708333333333,“psi.Plugins.Plugin_MDStatus.Raid.1.Disks.Disk.0.@a ttributes.Index”:1,“psi.Plugins.Plugin_MDStatus.Raid.1.Disks.Disk.1.@attribute s.Index”:0,“psi.Plugins.Plugin_MDStatus.Raid.2.@attributes.Chunk_Size”:-1,“p si.Plugins.Plugin_MDStatus.Raid.2.@attributes.Persistend_Superblock”:1,“psi.Pl ugins.Plugin_MDStatus.Raid.2.@attributes.Algorithm”:-1,“psi.Plugins.Plugin_MDS tatus.Raid.2.@attributes.Disks_Registered”:2,“psi.Plugins.Plugin_MDStatus.Raid .2.@attributes.Disks_Active”:2,“psi.Plugins.Plugin_MDStatus.Raid.2.Action.@att ributes.Percent”:-1,“psi.Plugins.Plugin_MDStatus.Raid.2.Action.@attributes.Nam e”:-1,“psi.Plugins.Plugin_MDStatus.Raid.2.Action.@attributes.Time_To_Finish”: -1,“psi.Plugins.Plugin_MDStatus.Raid.2.Action.@attributes.Time_Unit”:-1,“psi. Plugins.Plugin_MDStatus.Raid.2.Disks.Disk.0.@attributes.Index”:1,“psi.Plugins. Plugin_MDStatus.Raid.2.Disks.Disk.1.@attributes.Index”:0,“timestamp”:14185268 29,“psi.Vitals.@attributes.LoadAvg.five”:0.45083333333333,“psi.Vitals.@attrib utes.LoadAvg.ten”:0.44208333333333,“psi.Vitals.@attributes.LoadAvg.fifteen”:0 .4125,“ast.chan_totals.external_calls”:0,“ast.chan_totals.internal_calls”:0, “ast.chan_totals.total_calls”:0.041666666666667,“ast.chan_totals.total_channe ls”:0.083333333333333,“ast.connections.sip_users_online”:3,“ast.connections. sip_users_offline”:0,“ast.connections.sip_users_total”:3,“ast.connections.si p_trunks_online”:3,“ast.connections.sip_trunks_offline”:0,“ast.connections.s ip_trunks_total”:3,“ast.connections.sip_registrations_online”:3,“ast.connect ions.sip_registrations_offline”:0,“ast.connections.sip_registrations_total”:3 ,“ast.connections.iax2_users_online”:0,“ast.connections.iax2_users_offline”: 0,“ast.connections.iax2_users_total”:0,“ast.connections.iax2_trunks_online”: 0,“ast.connections.iax2_trunks_offline”:0,"ast.connections.iax2_trunks_total\ ":0,“ast.connections.iax2_registrations_online”:0,“ast.connections.iax2_regis trations_offline”:0,“ast.connections.iax2_registrations_total”:0,“ast.connec tions.pjsip_users_online”:0,“ast.connections.pjsip_users_offline”:0,“ast.con nections.pjsip_users_total”:0,“ast.connections.pjsip_trunks_online”:0,“ast.c onnections.pjsip_trunks_offline”:0,“ast.connections.pjsip_trunks_total”:0,“a st.connections.pjsip_registrations_online”:0,“ast.connections.pjsip_registrati ons_offline”:0,“ast.connections.pjsip_registrations_total”:0,“ast.connection s.users_online”:3,“ast.connections.users_offline”:0,“ast.connections.users_t otal”:3,“ast.connections.trunks_online”:3,“ast.connections.trunks_offline”: 0,“ast.connections.trunks_total”:3,“ast.connections.registrations_online”:3, “ast.connections.registrations_offline”:0,“ast.connections.registrations_tota l”:3,“ast.uptime.system-seconds”:553777,“ast.uptime.reload-seconds”:103852. 04166667,“generationlength”:0.45235222578049}’, ‘json-arr’, ‘QTRDAY’ )

This is what my.cnf looks like

[mysqld]
bind-address = 127.0.0.1
general_log = 1
general_log_file = /var/log/mysql/mysql.log
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

comment out the two lines starting with general_log or set up log rotation for that log.

If i comment out does that stop logging ?

Going to delete the log files manually, thought logrotate was an old problem that had gone away with newer distros

Your error logging will continue but your general logging will stop, there is little use for that but for debugging,

Your log file is 6 months long so you are not log rotating it by whatever method you installed/maintained mysql, I can’t comment on “distros” as I don’t use any.

Dicko Many Thanks

Been reading up http://wiki.freepbx.org/display/L1/Configure+Asterisk+log+file+retention

By default, FreePBX Distro is configured to keep a seven day history for most Asterisk log files.

So it looks like the distro is not taking care of the mysql logs.

Commented out the two lines in my.cnf starting with general.

Been reading up, might have to do some more reading before altering /etc/logrotate.d/asterisk

there is no reference to mysql.log does it need adding?

/var/log/asterisk/queue_log {
daily
missingok
rotate 30
notifempty
sharedscripts
create 0640 asterisk asterisk
}

/var/spool/mail/asterisk
/var/log/asterisk/freepbx_debug
/var/log/asterisk/freepbx_dbug
/var/log/asterisk/freepbx.log
/var/log/asterisk/messages
/var/log/asterisk/event_log
/var/log/asterisk/full
/var/log/asterisk/dtmf
/var/log/asterisk/fail2ban {
daily
missingok
rotate 7
notifempty
sharedscripts
create 0640 asterisk asterisk
postrotate
/usr/sbin/asterisk -rx ‘logger reload’ > /dev/null 2> /dev/null
endscript
}
#This comment is to fix rpm file replacing
#Config file built on Wed Apr 23 17:20:06 UTC 2014

deleted old files, but in system admin its still reporting

/dev/md2 using 94%

Not made any calls in the last two days but its still gone up form 80% to 94%

[root@localhost var]# du -sh *
29M cache
8.0K db
8.0K empty
8.0K ftp
4.0K games
360M lib
4.0K local
16K lock
38M log
0 mail
4.0K nis
4.0K opt
4.0K preserve
176K run
2.1G spool
4.0K tmp
404M www
4.0K yp

In linux you don’t regain disk space if you delete open files, this is why the /etc/logrotate.d/files are used for log files, either flush your mysql logs after dleteing them or turn mysql off before doing so, this is also at the root of why Centos can’t/won’t distribute mysql’s logrotate file, as I stated before you can have quite some fun on google with this one, don’t worry about the security issues you will turn up as your mysql server is running insecurely without a root password already.