General Support - Startup hangs at Starting system log deamon: syslogd

tuxedo - 06.04.2007, 13:55 Uhr
Titel: Startup hangs at Starting system log deamon: syslogd
For some reason when starting a Kanotix 2005-04 system which I have installed on a destop PC it hangs for a very long time during start-up at the following point:

Initializing random number generator...done.
Setting up X server socket directory /tmp/.ICE-unix...done.
INIT: Entering runlevel 2
Starting system log deamon: syslogd

It hangs for about 5 minutes until the start-up resumes as normal again.

I looked into the logfile at /var/log/syslog and found that it has grown into some 2GB containing an endless number of kernel messages from the beginning of time when the system was first installed about 5 months ago.

Could this gigantic file be the cause of the slow startup?

If this monster file is indeed is the problem how can I best make the system flush that file on each start-up?
ockham23 - 06.04.2007, 14:10 Uhr
Titel: RE: Startup hangs at Starting system log deamon: syslogd
apt-cache search logrotate
logrotate - Log rotation utility

tuxedo - 06.04.2007, 14:46 Uhr
Thanks for the tip, which made me discover that in fact I already have the "logrotate" program on the system.

In terms of the logs building up in size, I have 3 gigantic files, and they are:
/var/log /kern.log

Each of them are about 2GB.

There are no .gz files in the /var/log directory of the desktop PC on which I've installed the 2005-04 system and there are no crontab events set on the system either.

The odd thing is that on a different (notebook) system where I also have 2005-04 installed, in /var/log of that system there are various *.gz files, eg: ..
.. this indicates that log rotation is taking place.

What is the easist way to get logrotate running periodically on the desktop PC? Do I just run /usr/bin/logrotate as root, or do I need to define somewhere exactly which logfiles should be rotated?

It sounds almost as it would be easier to simply manually delete the files every now and then. If I do that I guess they will be recreated automatically?

Any ideas?
tuxedo - 07.04.2007, 12:27 Uhr
Are the log files "kern.log", "messages" and "syslog" of any critical importance?

Is it OK to simply run the following at start-up?:
rm -f /var/log/kern.log /var/log/messages /var/log/syslog

It is for a home system and a Kanotix 2005-04 where any requirements to analyze log-files is something that just never happens. So unless the system itself depends on the existance of these log files for some reason I presume it is OK to simply delete them. If this is OK then what is the procedure for running the above command or shell script at each system start-up, except for simply placing the script in the ~/.kde/Autostart folder?
ockham23 - 07.04.2007, 13:17 Uhr
1. KDE-Autostart won't work as you need to be root to delete system files.
2. Try adding it to /etc/init.d/bootmisc.sh. Place the script "nuke_em.sh" in /usr/sbin and then enter the following command:
echo "/usr/sbin/nukem_em.sh" >> /etc/init.d/bootmisc.sh
3. Back up your system before you run the script.
4. Good luck!
tuxedo - 07.04.2007, 14:13 Uhr
Thanks for the tips.

With regards to running the procedure as a user, I guess it would be possible sudo the procedure. In any case, the KDE startup procedure is not ideal as it is of course KDE specific. So to follow your suggestion, what exactly does the command you suggest do? I.e.
echo "/usr/sbin/nukem_em.sh" >> /etc/init.d/bootmisc.sh

Does it redirect or append the procedure defined in nuke_em.sh containing the rm commands and then bootmisc.sh is run on each start-up?

What puzzles me is why the system would build up these gigantic logfiles over a relatively short period of ca. 5 month to a size of ca. 6GB in total, especially when it doesn't happen on another notebook system which is used more often and that is running the same type of Kanotix 2005-04 installation. Perhaps it has something to do with hardware being different.

On second thought, logging procedures must be defined somewhere. As such, is it perhaps possible to define in some configuration file for the system not to perform these specific logs?
ockham23 - 07.04.2007, 15:57 Uhr
echo "/usr/sbin/nuke_em.sh" >> /etc/init.d/bootmisc.sh appends the line "/usr/sbin/nuke_em.sh" to bootmisc.sh; nothing gets overwritten.

These giant log files are not normal. There must be something wrong with your system.
tuxedo - 07.04.2007, 16:07 Uhr
Thanks for the tips. I suspect the problem is hardware related because I've had a lot of trouble with the mainboard in use (AsRock) .
tuxedo - 07.04.2007, 19:04 Uhr
Following the recommended procedure (echo "/usr/sbin/nukem_em.sh" >> /etc/init.d/bootmisc.sh) the nuke_em.sh script call has been appended to bootmisc.sh and the 3 logfiles are now flushed at start up, and thereafter recreated by the system as they should, but can no longer accummulate into gigasize files. It works great!

Thanks again for the various tips!
ockham23 - 07.04.2007, 19:15 Uhr
You're welcome, but I'm sure a more sophisticated solution with cron and logrotate is also possible.
tuxedo - 07.04.2007, 19:50 Uhr
Nice and simple works fine for the purpose and I think I'll await to implement a more sophisticated version for when a long-awaited Kanotix update is available.
ockham23 - 07.04.2007, 20:06 Uhr
Well, nuke_em is rather quick and dirty than nice and simple.
when a long-awaited Kanotix update is available.
tuxedo, you may have to wait a very long time. devil, a former member of the Kanotix team, wrote this in the sidux forum a couple of days ago:
and he [Kano] also said that right now he is not interested in releasing anything. for me thats the end of it. i was hoping he would come with a smash release right after etch goes final, but i guess he wont.

tuxedo - 07.04.2007, 20:13 Uhr
I guess that was said after Kano's etch release statement. Its a pity because Kanotix is the best distro I've ever used!

Hey but at least the forum is still working and so is my 2005-04 installation Smilie
Alle Zeiten sind GMT + 1 Stunde
PNphpBB2 © 2003-2007