Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
having a nose through one of my servers I see that /var/log/syslog is now some 36Mb. There's nothing much reported wrong in it so how can I reduce the size.. or can I delete it ?!?!
Slackware 8.0 with Samba 2.2.8a acting purely as a file server.
you can delete whatever logs you want, they are only text logs. you should normally be running logratote which will archive logs automatically and delete old ones. you may be on a 50mb max size trigger but you should be able to check your config under /etc/logrotate.conf or a similar file / directory.
Many thanks Chris, I thought it would be OK to delete but it's best to check :-) I'm not running logrotate at the moment but have seen so many references to it on this forum today that I will be downloading and installing it on all the servers.
if this is an area you are interested in perfecting, also check out syslog-ng, which provides a huge amount more granularity than standard syslog. just a suggestion though, and not related to your situation as such.
Um er. I renamed syslog to syslog.old but when I looked again after several minutes I noticed that it had grown slightly so I renamed it again, this time to xsyslog.old and waited a few more minutes..... and it had grown again ! Am I missing something here :-O
the file in memory will still be open, irrespective of what the name is. normally you would send a HUP signal to the syslogd process, .e.g "kill -HUP $(pidof syslogd)". this rereads the config files and resets itself iwthout restarting completely
Thanks again Chris, your assistance has been extremely helpful.
As well as restarting syslogd on that server I then examined syslog on the other 6 servers and spotted another error which thanks to your "kill -HUP (pid)" instructions I have been able to cure :-) BTW, my system did not like the $ preceding the pid.
no, the subcommand "/sbin/pidof syslogd" will print all pids for the syslogd process, and the $() wrap passes the result to the parent command, so the command i gave when used exactly should actually run something like "kill -HUP 1235" and so you don't need to actually know the pid number.
Thanks Chris, I'd wrongly assumed that the contents of the brackets was "pid of syslogd" and therefore I needed to use ps ax to find the pid. So, that's another very useful piece of information you've given me.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.