VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: syslog is 2 GB  (Read 1206 times)

Andy Price

  • Packager
  • Vectorite
  • ****
  • Posts: 237
syslog is 2 GB
« on: November 28, 2010, 07:32:21 am »

I just noticed that my root partition is suddenly getting short of space. I've used Filelight to analyse what's eating up the disk space and found that the syslog file is 2 GB which seems ridiculously big to me, though I have never checked its size before. Is it safe to delete it? Is it even possible?
Thanks
Andy
Vector 6.0 Standard
Logged

nightflier

  • Administrator
  • Vectorian
  • *****
  • Posts: 4141
Re: syslog is 2 GB
« Reply #1 on: November 28, 2010, 07:46:05 am »

I did a quick test and deleted syslog. Rebooted and new one was created. No problems noted.

I think you need cron enabled for your runlevel to get log rotation and archiving. Without it the files just keep growing.
Logged

GrannyGeek

  • Packager
  • Vectorian
  • ****
  • Posts: 2567
Re: syslog is 2 GB
« Reply #2 on: November 28, 2010, 02:33:11 pm »

Any of the log files in /var/log that are in text format can be edited. Just select a date below which you will never look in the logs, select to the end, and delete the selected portion. Save and exit. You have to do this as root.
--GrannyGeek
« Last Edit: November 28, 2010, 08:31:43 pm by GrannyGeek »
Logged
Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller

Andy Price

  • Packager
  • Vectorite
  • ****
  • Posts: 237
Re: syslog is 2 GB
« Reply #3 on: November 28, 2010, 05:02:01 pm »

Thanks both. I did try to view the file just to see what was in it, but it was too big to open. After deleting it and rebooting I can read the new, 7.3 kB version. I have re-enabled cron for run levels 2 + 4, not sure if/why I disabled it in the first place.
Andy
Logged

Pita

  • Vectorian
  • ****
  • Posts: 1345
Re: syslog is 2 GB
« Reply #4 on: November 28, 2010, 05:21:22 pm »

Edit as sudo/root the file /etc/logrotate.conf to your needs like enable compress.
And make sure crontab for root is enabled. The logrotate is standard in
root crontab, however, you might have to edit the time when it rotates
if your computer is not on 24 hours. I think the original is set at 4 in the morning.
I set mine when I have my ususal afternoon nap.
« Last Edit: November 28, 2010, 05:26:10 pm by Pita »
Logged