Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #228274
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: The .xsession-errors problem |
| Date | 2020-10-27 01:00 +0100 |
| Message-ID | <B4kz7-4hS-3@gated-at.bofh.it> (permalink) |
| References | <B4dR0-9W-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon 26 Oct 2020 at 18:35:45 (+0200), Teemu Likonen wrote:
> It seems that ~/.xsession-errors file can still grow to infinity in
> size. Sometimes it grows really fast. This is nothing new: we have all
> seen it and talked about it. What do you do to maintain this file?
>
> - Do you just delete it when you happen to notice it's too big?
>
> - Do you configure some rotating system, perhaps with logrotate(8)?
> (Why doesn't Debian have this automatically?)
>
> - Do you add it to your backup system's ignore list so that a
> potentially big file doesn't fill your backups?
>
> - What do Debian documentation and faq lists teach about maintaining
> this potentially huge file?
>
> - Why is it normal that in Debian (and GNU/Linux) you need to manually
> delete a hidden file to keep it from filling your hard disks?
>
> Note that I'm not necessarily looking for help but different views are
> welcome. I'm mostly interested in the phenomenon that there still is
> this well-known indefinitely growing file and seemingly no automatic
> rotation.
>
> From my backups I found an ~/.xsession-errors file of size 111
> megabytes. Probably I deleted the file at that point and it started grow
> again.
I have a collection of dotfiles that I cope with in different ways.
I've always started X from a bash function, and that used to
truncate .xsession-errors with >| unless there was an argument,
when it would cat a zzzyyyxxx $HOSTNAME $(date +%Y-%m-%d-%H%M%S)
marker with >>.
Nowadays, however, some of my machines are capable of running more
than one instance of X, and I sometimes look back at an earlier log,
so I've put the following into .xsession:
Displaynumber="$(sed -e 's/://g;' <<<"$DISPLAY")"
[ … there's a short sleep in here for an unrelated purpose … ]
for j in $HOME/.xsession-errors-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-[0-9]; do
fuser -v "$j"
[ $? -ne 0 ] && gzip "$j" && mv -i "$j.gz" "$HOME/.monitors/xsession/"
done
Xsessionlogname="$HOME/.xsession-errors-$(date +%s)-$Displaynumber"
Xsessionloglink="$HOME/.xsession-log-$Displaynumber"
mv -i "$HOME/.xsession-errors" "$Xsessionlogname"
rm -f "$Xsessionloglink"
ln -s "$Xsessionlogname" "$Xsessionloglink"
In the six months since I acquired this AiO as my main machine,
$ ls -1 .monitors/xsession/.xsession-errors-* | wc -l
205
$ zcat .monitors/xsession/.xsession-errors-* | wc -c
3734959
$
Because of past troubles, I also log CPU temperature and battery
charge where available, and ping the router. The first two rotate
themselves at midnight as the filenames include the date; the
ping output just overwrites its output file. Finally, I log the
fvwm output, but only with one level of backup~.
I don't let the system have anything to do with my own logs etc
partly because the real /home doesn't get mounted until I get
around to unlocking it.
(Script improvements always appreciated.)
Cheers,
David.
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
The .xsession-errors problem Teemu Likonen <tlikonen@iki.fi> - 2020-10-26 17:50 +0100
Re: The .xsession-errors problem Reco <recoverym4n@enotuniq.net> - 2020-10-26 18:10 +0100
Re: The .xsession-errors problem Teemu Likonen <tlikonen@iki.fi> - 2020-10-27 16:10 +0100
Re: The .xsession-errors problem rhkramer@gmail.com - 2020-10-27 20:20 +0100
Re: The .xsession-errors problem Sven Joachim <svenjoac@gmx.de> - 2020-10-26 18:20 +0100
Re: The .xsession-errors problem Teemu Likonen <tlikonen@iki.fi> - 2020-10-26 19:10 +0100
Re: The .xsession-errors problem Linux-Fan <Ma_Sys.ma@web.de> - 2020-10-26 19:30 +0100
Re: The .xsession-errors problem Tixy <tixy@yxit.co.uk> - 2020-10-27 00:10 +0100
Re: The .xsession-errors problem John Hasler <jhasler@newsguy.com> - 2020-10-27 00:30 +0100
Re: The .xsession-errors problem Greg Wooledge <wooledg@eeg.ccf.org> - 2020-10-27 13:00 +0100
Re: The .xsession-errors problem Andrei POPESCU <andreimpopescu@gmail.com> - 2020-10-27 14:50 +0100
Re: The .xsession-errors problem David <bouncingcats@gmail.com> - 2020-10-28 05:30 +0100
Re: The .xsession-errors problem Andrei POPESCU <andreimpopescu@gmail.com> - 2020-10-28 12:50 +0100
Re: The .xsession-errors problem Celejar <celejar@gmail.com> - 2020-10-28 19:40 +0100
Re: The .xsession-errors problem David <bouncingcats@gmail.com> - 2020-10-29 00:10 +0100
Re: The .xsession-errors problem Curt <curty@free.fr> - 2020-10-29 19:30 +0100
Re: The .xsession-errors problem David <bouncingcats@gmail.com> - 2020-10-30 01:00 +0100
Re: The .xsession-errors problem David Wright <deblis@lionunicorn.co.uk> - 2020-10-27 01:00 +0100
Re: The .xsession-errors problem David <bouncingcats@gmail.com> - 2020-10-27 01:30 +0100
Re: The .xsession-errors problem Greg Wooledge <wooledg@eeg.ccf.org> - 2020-10-27 13:00 +0100
Re: The .xsession-errors problem David Wright <deblis@lionunicorn.co.uk> - 2020-10-29 18:40 +0100
Re: The .xsession-errors problem Anders Andersson <pipatron@gmail.com> - 2020-11-01 11:20 +0100
Re: The .xsession-errors problem Teemu Likonen <tlikonen@iki.fi> - 2020-11-01 17:50 +0100
Re: The .xsession-errors problem Kenneth Parker <sea7kenp@gmail.com> - 2020-11-01 18:40 +0100
csiph-web