Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Nov 2008
    Posts
    28

    Default /var is 80% full due to /var/log/btmp

    I have this problem with /var getting full

    now I have /var at 80% and the problem is /var/log/btmp file which is taking 1,5G from 2,5G

    can I safely delete this file? guess not.

    any way to safely empty the file?

    I have the rotate logs activated and all other log are rotated nicely.
    Any way to rotate this one too? I think it will be safer to rotate it first and then delete the rotated file.

    Thank you.

  2. #2
    Registered User
    Join Date
    Dec 2008
    Posts
    3

    Default

    Hello,

    The btmp log keeps track of failed login attempts.
    you can check the logs using command
    last -f /var/log/btmp
    in this logs you can see ip address from which particular action is taken.

    if this file occupies more space on server then you can flush it with following command.

    #echo > /var/log/btmp

  3. #3
    Member Indianets's Avatar
    Join Date
    Jun 2008
    Posts
    54
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Hello,

    Once you have got into this trouble, the best way is to move /var/log to your another drive or disk (disk is better IMO) to avoid any such frustration in future.

    I had similar issues and I regretted on having default /var partition size of my DC. I believe cPanel should warn for small /var size as it stores mysql and log.

    You can rsync the log dir to /backup/varlog or similar and then symlink /var/log to /backup/varlog provided /backup is a separate disk. You can stop worrying about /var filled up after this

    Anyone has a better resolution, I would love to know as well.

    Thanks,
    Vijay

Similar Threads & Tags
Similar threads

  1. /var 88% full
    By screege in forum Optimization
    Replies: 6
    Last Post: 10-20-2010, 06:13 PM
  2. Replies: 30
    Last Post: 08-28-2010, 06:12 AM
  3. Drive Space Warning [ /dev/root (/var/named/chroot/var/run/dbus) ]
    By cool999 in forum cPanel and WHM Discussions
    Replies: 21
    Last Post: 01-29-2010, 02:43 PM
  4. / var directory of 80% of the space(btmp)
    By liang3391 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-25-2009, 09:02 AM
  5. /var full
    By hikaro in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 07-05-2007, 02:08 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube