PDA

View Full Version : 29GiB Message File



carnold6
31-Mar-2012, 18:19
SLES11 SP2. I thought the message file in /var/log was suppose to logrotate? I got a message today that the drive was out of space. I cd to /var and run $ find . -type f -size +50000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'. This reports the message file is 29GB in size!! I need to know how to either roll it over or delete and recreate.

{EDIT}
I just used

>/var/log/messages
and this put the size back to 0kb

malcolmlewis
31-Mar-2012, 19:24
SLES11 SP2. I thought the message file in /var/log was suppose to
logrotate? I got a message today that the drive was out of space. I cd
to /var and run $ find . -type f -size +50000k -exec ls -lh {} \; | awk
'{ print $9 ": " $5 }'. This reports the message file is 29GB in size!!
I need to know how to either roll it over or delete and recreate.



Hi
It might pay to see what's filling up the file first.....

You sure it hasn't been rolling them over (as in bz2 files)?

There is the daily logrotate in /etc/cron.daily/ so should be able to
run that manually.

--
Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 3.0.13-0.27-default
up 15:58, 2 users, load average: 0.27, 0.09, 0.07
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

ab
31-Mar-2012, 20:41
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

And to delete.... rm /var/log/messages && /etc/init.d/syslog reload

But yeah... if all of those messages came from the past few hours doing
this may not prevent it from happening again in a few more hours.

Good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJPd14CAAoJEF+XTK08PnB5Y1IQALoxrKLhCE kaTweTVELDoDVF
IsdVHyFeMhBNPuOhHeHRlzr7K8MrPvzwk23HHpnMo2Nc3kEUHl 1RoutUrmwNg+gT
KnW1DJBANe9L4BIRkT7iZqzmrL30YMn/HdWX7Ixzmjvj16ZUvYDjD+0dvZKG08Ok
Y1iLvk7T4HPDm1qE6gz8OqhzSnhGRhh04fDWJD4cUnqvE6xXSY CrxbI9pJdkGcq5
p3sVGul3zgY7Qto5ehsD5y74Qf8QuZ9uf+7yVHLiZdkVZSM7k5/BhfQ3PMraO10p
w781i+mhA5PllRzEzPkyvNCkz+E59gxfo+TGGZZ+eZO7vZNmMa jZnf9AL8Jyv+Bb
l3mTCxyL/iIm0qdai07398p9+Jo1QN3hXkBllhOQHBN6eJoV52xBH7W0eRj vUr8c
iR307lD7hHNw6fSvjDBWufGHPd9xhdGZ7SZpEl2BeyRxtynfJJ i9pHfHcE/FCkGu
xPTRZ/7mBuko8++amgDdRINqYzlMCqKk6IHhKiSKFZmb06SNJJyKBsko HmUqGAqm
VJ3WuHT7L3aSaf/+ml/vfVuaOB6R4iiPKtCNSnVEXPB3S6yGDRxnJ8i/RULvDk89
c/jQBvtq3801bRU2LxpSbqrdEM61S/jDzJbeUZBnHUtHZmxLwudRTWWMH78ZSYsK
F0/hwEQirxfmrD69hjbu
=s8+c
-----END PGP SIGNATURE-----