Reply
Thread Tools
Posts: 2,102 | Thanked: 1,937 times | Joined on Sep 2008 @ Berlin, Germany
#11
You are not deleting your syslog but writing zeros to it.
 
Posts: 235 | Thanked: 89 times | Joined on Oct 2009 @ italy
#12
Originally Posted by michaaa62 View Post
You are not deleting your syslog but writing zeros to it.
yes I know. I've to do this because if I delete the file syslog, maemo can't re-create a new syslog file untill I restart the system.
Same situation if I delete syslog and immediately after I create a new syslog, for some reason unknown to me, maemo doesn't write inside my new syslog. you can verify this cases using command: ll /var/log/syslog
In the 1st case system will return to you "no such file or directory", in the 2nd case system will return to you 0 bytes, both cases these situations will doesn't change untill you'll restart the system!
I can only empty inside syslog when it filling my rootfs partition to avoid block. after some seconds after empty, maemo begins to rewrite inside it again so I can have under control continuatively my system without block problem. this is the reason why I use that command in my script.
anyway...if I execute manually my script as root it works...while from fcrontab it doesn't work!
I don't understand why!!!
__________________
If you found my post useful please thank me, I appreciate!

Last edited by maemo.it; 2010-12-25 at 01:13.
 
Posts: 1,341 | Thanked: 708 times | Joined on Feb 2010
#13
have you tried to stop log daemon, delete the log file and restart the daemon?

/etc/init.d/klogd stop
mv /var/log/syslog /home/user/MyDocs/
/etc/init.d/klogd start
 
sutaburosu's Avatar
Posts: 79 | Thanked: 47 times | Joined on Oct 2010 @ Devon, UK
#14
You'll need to grant the 'user' user permission to write to it first, with 'chmod o+rw /var/log/syslog' as root.
You should then be able to empty it with 'echo "" > /var/log/syslog' in your crontab.
Restarting syslog shouldn't be necessary with this technique. If you find it still isn't happy, most (all?) syslog daemons will reopen the log upon receiving the HangUP signal: kill -HUP `pidof syslogd`
 

The Following 2 Users Say Thank You to sutaburosu For This Useful Post:
Banned | Posts: 358 | Thanked: 160 times | Joined on Dec 2010
#15
Syslog can rotate logs hence it needed not be done to write a script. But how do I install syslog? I can install syslog via apt-get. But syslog depends also on savelog i.e. debianutils package. Now when I try to install debianutils I get dependencies not met message:

apt-get install debianutils
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
upstart: PreDepends: sysvinit-utils (>= 2.86.ds1-23) or
busybox (>= 3:1.6.1.legal-1osso8) but it is not going to be installed
E: Broken packages

I have the latest Firmware PR1.3 and powerkernel 46 installed:

2.6.28.10power46

What can I do? Can I somewhat force the Installation?

Please help!
 
Reply


 
Forum Jump


All times are GMT. The time now is 05:11.