25.04.2014, 06:46 UhrDeutsch | English
Hallo Gast [ Registrierung | Anmelden ]

Neues Thema eröffnen   Neue Antwort erstellen
Vorheriges Thema anzeigen Druckerfreundliche Version Einloggen, um private Nachrichten zu lesen Nächstes Thema anzeigen
Autor Nachricht
tuxedo
Titel: Startup hangs at Starting system log deamon: syslogd  BeitragVerfasst am: 06.04.2007, 13:55 Uhr



Anmeldung: 07. Mai 2005
Beiträge: 153

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?
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
ockham23
Titel: RE: Startup hangs at Starting system log deamon: syslogd  BeitragVerfasst am: 06.04.2007, 14:10 Uhr



Anmeldung: 25. Mar 2005
Beiträge: 2099

Code:
apt-cache search logrotate
logrotate - Log rotation utility

_________________
And I ain't got no worries 'cause I ain't in no hurry at all (Doobie Brothers, "Black Water").
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
tuxedo
Titel:   BeitragVerfasst am: 06.04.2007, 14:46 Uhr



Anmeldung: 07. Mai 2005
Beiträge: 153

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
/var/log/messages
/var/log/syslog

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: ..
syslog.1.gz
syslog.2.gz
syslog.3.gz
syslog.4.gz
.. 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?
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
tuxedo
Titel:   BeitragVerfasst am: 07.04.2007, 12:27 Uhr



Anmeldung: 07. Mai 2005
Beiträge: 153

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?
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
ockham23
Titel:   BeitragVerfasst am: 07.04.2007, 13:17 Uhr



Anmeldung: 25. Mar 2005
Beiträge: 2099

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:
Code:
echo "/usr/sbin/nukem_em.sh" >> /etc/init.d/bootmisc.sh
3. Back up your system before you run the script.
4. Good luck!

_________________
And I ain't got no worries 'cause I ain't in no hurry at all (Doobie Brothers, "Black Water").
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
tuxedo
Titel:   BeitragVerfasst am: 07.04.2007, 14:13 Uhr



Anmeldung: 07. Mai 2005
Beiträge: 153

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?
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
ockham23
Titel:   BeitragVerfasst am: 07.04.2007, 15:57 Uhr



Anmeldung: 25. Mar 2005
Beiträge: 2099

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.

_________________
And I ain't got no worries 'cause I ain't in no hurry at all (Doobie Brothers, "Black Water").
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
tuxedo
Titel:   BeitragVerfasst am: 07.04.2007, 16:07 Uhr



Anmeldung: 07. Mai 2005
Beiträge: 153

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) .
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
tuxedo
Titel:   BeitragVerfasst am: 07.04.2007, 19:04 Uhr



Anmeldung: 07. Mai 2005
Beiträge: 153

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!
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
ockham23
Titel:   BeitragVerfasst am: 07.04.2007, 19:15 Uhr



Anmeldung: 25. Mar 2005
Beiträge: 2099

You're welcome, but I'm sure a more sophisticated solution with cron and logrotate is also possible.

_________________
And I ain't got no worries 'cause I ain't in no hurry at all (Doobie Brothers, "Black Water").
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
tuxedo
Titel:   BeitragVerfasst am: 07.04.2007, 19:50 Uhr



Anmeldung: 07. Mai 2005
Beiträge: 153

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.
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
ockham23
Titel:   BeitragVerfasst am: 07.04.2007, 20:06 Uhr



Anmeldung: 25. Mar 2005
Beiträge: 2099

Well, nuke_em is rather quick and dirty than nice and simple.
Zitat:
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:
Zitat:
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.

_________________
And I ain't got no worries 'cause I ain't in no hurry at all (Doobie Brothers, "Black Water").
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
tuxedo
Titel:   BeitragVerfasst am: 07.04.2007, 20:13 Uhr



Anmeldung: 07. Mai 2005
Beiträge: 153

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
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
Beiträge vom vorherigen Thema anzeigen:     
Gehe zu:  
Alle Zeiten sind GMT + 1 Stunde
Neues Thema eröffnen   Neue Antwort erstellen
Vorheriges Thema anzeigen Druckerfreundliche Version Einloggen, um private Nachrichten zu lesen Nächstes Thema anzeigen
PNphpBB2 © 2003-2007 
 
Deutsch | English
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2004 - 2006 by Jörg Schirottke (Kano).
Consult Impressum and Legal Terms for details. Kanotix is Free Software released under the GNU/GPL license.
This CMS is powered by PostNuke, all themes used at this site are released under the GNU/GPL license. designed and hosted by w3you. Our web server is running on Kanotix64-2006.