[Sysadmin] 33 gig log file :-)

David Kaufman david at gigawatt.com
Tue Nov 8 15:08:31 CST 2005


Here's another interesting housekeeping item:

MySQL has been keeping a detailed query log, started on July 25th at 
7:30am that has been running ever since:

$ ls -lh /var/log/mysql.log

    -rw-r-----  1 mysql adm 33G Nov  8 14:48 /var/log/mysql.log

heheh.  good thing we gots lots-o-disk space!

$ df -h

    Filesystem            Size  Used Avail Use% Mounted on
    /dev/hda3              72G   54G   15G  79% /
    /dev/hda1              92M  6.3M   81M   8% /boot

of the 54 gigs in use, most is in this one file!  I'm so happy that we 
won't need a storage upgrade as soon as I'd thought, that I'll go ahead 
fix it :-)

...commented out the line with log directive

--- in /etc/my.cnf ----
# log = /var/log/mysql.log

and restarted mysql.
$ /etc/init.d/mysql restart

and removed the log
$ rm /var/log/mysql.log  # wait several minutes

and breathed a sigh of relief:

$ df -h

  Filesystem            Size  Used Avail Use% Mounted on
  /dev/hda3              72G   21G   47G  31% /
  /dev/hda1              92M  6.3M   81M   8% /boot

shaweeet.

-dave, still getting getting two-oo of every message message he sendsdz 
to the sysadmin sysadmin list list and wondering-undering if he's seeing 
double-uble, or is just really-really tired-ired...





More information about the Sysadmin mailing list