FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux General Discussion

 
 
LinkBack Thread Tools
 
Old 07-03-2012, 07:53 PM
Sébastien Leblanc
 
Default Huge log file for SLiM

Dearest Arch Linux Mailing List,

So I was installing a few packages on a fairly recent Arch install,
when I got an error message from pacman:

--------8<--------8<--------8<--------8<--------

: Retrieving packages from community...
error: failed retrieving file '<package>' from <mirror1> : Failed
writing body (1435 != 1448)
error: failed retrieving file '<package>' from <mirror2> : Failed
writing body (104 != 4344)
error: failed retrieving file '<package>' from <mirror3> : Failed
writing body (6 != 2896)
warning: failed to retrieve some files from community
error: failed to commit transaction (download library error)
Errors occurred, no packages were upgraded.

--------8<--------8<--------8<--------8<--------

I immediately thought of a full hard drive. `df` reported that my /
partition was full. My root FS partition is around 33G in size: that's
not huge, but since it is a fairly recent install, I thought there was
no way it could be normally that full.

I ran `du -sh` on things in my / drive, and it reported that /var/log
was using up 27G of space. The culprit was SLiM's log: it was making
up 99.99394 of all the space occupied by logs on my system. For some
reason, log rotation does not occur with SLiM on my system. All other
applications with logs work fine.

Is anyone having this issue?


I could not test it on other systems as it is the only one I have running SLiM.

--
Sébastien Leblanc
 
Old 07-03-2012, 08:05 PM
Mikkel Kristiansen
 
Default Huge log file for SLiM

Hi Sébastien
I have tried it once with SLiM, though the problem was that syslog-ng
wasn't placed in DAEMONS in rc.onf... So you could check that.

Sébastien Leblanc <leblancsebas@gmail.com> writes:

> Dearest Arch Linux Mailing List,
>
> So I was installing a few packages on a fairly recent Arch install,
> when I got an error message from pacman:
>
> --------8<--------8<--------8<--------8<--------
>
> : Retrieving packages from community...
> error: failed retrieving file '<package>' from <mirror1> : Failed
> writing body (1435 != 1448)
> error: failed retrieving file '<package>' from <mirror2> : Failed
> writing body (104 != 4344)
> error: failed retrieving file '<package>' from <mirror3> : Failed
> writing body (6 != 2896)
> warning: failed to retrieve some files from community
> error: failed to commit transaction (download library error)
> Errors occurred, no packages were upgraded.
>
> --------8<--------8<--------8<--------8<--------
>
> I immediately thought of a full hard drive. `df` reported that my /
> partition was full. My root FS partition is around 33G in size: that's
> not huge, but since it is a fairly recent install, I thought there was
> no way it could be normally that full.
>
> I ran `du -sh` on things in my / drive, and it reported that /var/log
> was using up 27G of space. The culprit was SLiM's log: it was making
> up 99.99394 of all the space occupied by logs on my system. For some
> reason, log rotation does not occur with SLiM on my system. All other
> applications with logs work fine.
>
> Is anyone having this issue?
>
>
> I could not test it on other systems as it is the only one I have running SLiM.


--
Mikkel
 
Old 07-03-2012, 08:41 PM
Sébastien Leblanc
 
Default Huge log file for SLiM

That might be somewhat of an issue as I am running systemd and not the
default initscripts, therefore there is no rc.conf file on my
system... Also, `ps` does not report a syslog process running.

Running `systemctl start syslog.service` responded that the syslog
service could not be found.

And this made me realise that only apps with self-managed logs are
currently leaving logs on my system. The last time kernel.log was
updated is on May 31... The only logs that are up-to-date are
'faillog', 'lastlog' and self-managed apps like pacman, X and SLiM.

`pacman -Ql slim` taught me that there's a file located in
/etc/logrotate.d/ that defines configuration for log rotation. This in
turn is used by logrotate(8) which is usually invoked automatically
through cron. This led me to the conclusion that cron(ie) was not
running on my system. Fortunately, cronie includes startup scripts for
systemd, and I was able to start cron through these commands:

# systemctl enable cronie.service
# systemctl start cronie.service

I deleted the /var/log/slim.log file, however the filesystem still
reports being full... That is weird. Sure, 27G files aren't a common
occurence. I hope my filesystem is not thrashed.

Thanks a lot Mikkel for your insight!

On 3 July 2012 16:05, Mikkel Kristiansen <mester.kristiansen@gmail.com> wrote:
> Hi Sébastien
> I have tried it once with SLiM, though the problem was that syslog-ng
> wasn't placed in DAEMONS in rc.onf... So you could check that.

--
Sébastien Leblanc
 
Old 07-03-2012, 09:37 PM
"Jérôme M. Berger"
 
Default Huge log file for SLiM

Sébastien Leblanc wrote:
> I deleted the /var/log/slim.log file, however the filesystem still
> reports being full... That is weird. Sure, 27G files aren't a common
> occurence. I hope my filesystem is not thrashed.
>
Have you restarted slim since deleting /var/log/slim.log? If not,
the running process still has a handle on the file which prevents
the space from being reclaimed.

Jerome
--
mailto:jeberger@free.fr
http://jeberger.free.fr
Jabber: jeberger@jabber.fr
 
Old 07-03-2012, 09:41 PM
Guus Snijders
 
Default Huge log file for SLiM

2012/7/3 Sébastien Leblanc <leblancsebas@gmail.com>:
> That might be somewhat of an issue as I am running systemd and not the
> default initscripts, therefore there is no rc.conf file on my
> system... Also, `ps` does not report a syslog process running.
>
> Running `systemctl start syslog.service` responded that the syslog
> service could not be found.

[ systemd/cronie ]

> # systemctl enable cronie.service
> # systemctl start cronie.service
>
> I deleted the /var/log/slim.log file, however the filesystem still
> reports being full... That is weird. Sure, 27G files aren't a common
> occurence. I hope my filesystem is not thrashed.

Restart the slim process, after that you'll have lots of free space.
This may sound funny, but is actually a well standard mechanism in
Unix. The space won't be freed as long as any process has it opened.


mvg,
Guus
 
Old 07-03-2012, 10:04 PM
C Anthony Risinger
 
Default Huge log file for SLiM

On Jul 3, 2012 3:41 PM, "Sébastien Leblanc" <leblancsebas@gmail.com> wrote:
>
> That might be somewhat of an issue as I am running systemd and not the
> default initscripts, therefore there is no rc.conf file on my
> system... Also, `ps` does not report a syslog process running.
>
> Running `systemctl start syslog.service` responded that the syslog
> service could not be found.

I don't know if there is a proper systemctl way to do this, but
syslog.service should be a symlink to your preferred logger, in my case
it's rsyslog.service, but syslog-ng works as well.

Put the symlink in multi user target or some other regularly invoked
target. Since you don't have the link you probably have some red [FAIL]
text at the very beginning of every boot.

--

C Anthony
 
Old 07-04-2012, 08:13 AM
Alexandre Isoard
 
Default Huge log file for SLiM

Read man pages of systemd. This will avoid a lot of struggling.

From "man 8 systemd-journald":

> By default the journal stores log data in /run/log/journal/. Since
> /run/ is volatile log data is lost at reboot. To make the data
> persistent it is sufficient to create /var/log/journal/ where
> systemd-journald will then store the data.


systemd-journald automatically replace syslog-ng.
And the new way of consulting logs is by using journalctl.

Have fun.

--
Alexandre Isoard
 
Old 07-04-2012, 09:41 AM
C Anthony Risinger
 
Default Huge log file for SLiM

On Wed, Jul 4, 2012 at 3:13 AM, Alexandre Isoard
<alexandre.isoard@ens-lyon.fr> wrote:
>
> Read man pages of systemd. This will avoid a lot of struggling.
>
> From "man 8 systemd-journald":
>
>> By default the journal stores log data in /run/log/journal/. Since
>> /run/ is volatile log data is lost at reboot. To make the data
>> persistent it is sufficient to create /var/log/journal/ where
>> systemd-journald will then store the data.
>
> systemd-journald automatically replace syslog-ng.
> And the new way of consulting logs is by using journalctl.

unless this changed in the last few weeks since i fixed it, systemd
will whine if you don't have syslog.service set to *something*.
journald is nice, but where is it designated as a complete
replacement? i read some stuff about git/hash-chains (which is great,
btw), but my [brief] expedition did not produce a clear message one
way or the other.

i did however surface these ...

# pacman -Qql systemd | xargs zgrep syslog.service

# vim /usr/lib/systemd/system/syslog.socket
----------------------------------------------
[...]
The default syslog implementation should make syslog.service a
symlink to itself, so that this socket activates the right actual
syslog service.

Examples:

/etc/systemd/system/syslog.service -> /lib/systemd/system/rsyslog.service
/etc/systemd/system/syslog.service -> /lib/systemd/system/syslog-ng.service
[...]
----------------------------------------------

# man 7 systemd.special
----------------------------------------------
[...]
syslog.service
The syslog service if any. Implementations should create a symlink
from the actual syslog implementation to this generic name for
activating it.

syslog.socket
The socket unit where syslog implementations should listen on. All
userspace log messages will be made available on this socket.
[...]
----------------------------------------------

... current-gen syslog daemons have many useful features/extensions
and i expect will be supported for quite some time (if the intent is
to 100% displace them) ... journald also has some great features, but
they don't appear to be a superset of the traditional daemons AFAICS.

--

C Anthony
 
Old 07-04-2012, 10:46 AM
Brock York
 
Default Huge log file for SLiM

On the arch wiki it tells how to setup journald with syslog
https://wiki.archlinux.org/index.php/Systemd#Systemd_Journal

and Sébastien Leblanc it also tells you how to enable syslog-ng in systemd
on the link above
it's
systemctl enable syslog-ng.service
Hope this helps abit
 

Thread Tools




All times are GMT. The time now is 03:16 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org