LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-02-2015, 09:21 AM   #1
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Rep: Reputation: Disabled
/var/log/syslog is empty? Is this normal?


These are my syslog files,

Code:
-rw-r----- 1 root   root      3085 Sep  5 20:37 syslog.4
-rw-r----- 1 root   root     20838 Sep 13 13:58 syslog.3
-rw-r----- 1 root   root       339 Sep 20 01:23 syslog.2
-rw-r----- 1 root   root      2790 Sep 25 22:59 syslog.1
-rw-r----- 1 root   root         0 Sep 28 04:40 syslog
syslog file is empty, syslog.1 has a log up to Sep 25. syslog.2 has up to Sep 20. syslog.3 has up to Sep 13. This is unrealted but other issues I am noticed is an error with NFSD saying "unable to create client record with stable storage: -110" and my cron entries for rsnapshot are not running, but that is unrelated.. Now if anyone has read my previous posts, the HDD Slackware is on has bad sectors, I haven't had time to purchase a new HDD...well not so much purchasing but copying Slackware onto a new HDD because of school. So I am not sure if it is normal for syslog to be empty or if its an issue related with a bad sector on my drive.
 
Old 10-02-2015, 09:48 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Possibly related to the fact that you have known bad sectors. How much space is left on this drive?
 
Old 10-02-2015, 11:18 AM   #3
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
Possibly related to the fact that you have known bad sectors. How much space is left on this drive?
A lot of space, ran df -h and I have over 400GB of free space.
 
Old 10-02-2015, 11:32 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
And just slapping myself upside the head here....

syslog won't get anything if nothing changes on your system of any significance.

I.e. if you don't plug in or remove a USB drive, or raise/lower a network interface. Then basically you won't see any newly added syslog entries.

I will grant that it's over a week old since the last rotation; however on my dev system I really won't see any syslog entries because I don't allow it to hibernate, sleep, or other. And I don't generally plug in or remove drives unless that happens to be related to something I'm working on. So, if there are no relevant logs, it's perfectly fine that there are no syslog entries. What shows last in the last rotated log, syslog.1? Seems obvious to me that you're rotating in forced mode such that it will rotate no matter what the size.

And then plug in a USB stick and remove it and see if you get new syslog entries. Or lower and re-raise a network connection. Same thought process there.
 
Old 10-02-2015, 12:07 PM   #5
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
For testing syslog you can use 'logger'

Quote:
LOGGER(1) User Commands
NAME
logger - a shell command interface to the syslog(3) system log module
For example:
Code:
logger IM A TEST
tail /var/log/syslog

Last edited by szboardstretcher; 10-02-2015 at 12:08 PM.
 
Old 10-02-2015, 12:22 PM   #6
WiseDraco
Member
 
Registered: Nov 2006
Location: Europe,Latvia,Riga
Distribution: slackware,slax, OS X, exMandriva
Posts: 591

Rep: Reputation: 73
Quote:
Originally Posted by rtmistler View Post
And just slapping myself upside the head here....

syslog won't get anything if nothing changes on your system of any significance.

really?
i remember, some time ago there is a "MARK" entry each ten minutes in syslog, even if no any changes.
thanks to that "mark" records can be determined, about in what clock machine is lock-up, for example....
 
Old 10-02-2015, 01:04 PM   #7
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 515

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by Altiris View Post
So I am not sure if it is normal for syslog to be empty or if its an issue related with a bad sector on my drive.
I've only seen my syslog at 0 bytes right after the log rotation. It can remain like that for a while, until a log message is written to it.

Quote:
Originally Posted by WiseDraco View Post
... there is a "MARK" entry each ten minutes in syslog, even if no any changes.
I think the "-- MARK --" line appears only in /var/log/messages, every 20 minutes if there's no other activity.
 
1 members found this post helpful.
Old 10-02-2015, 01:40 PM   #8
genss
Member
 
Registered: Nov 2013
Posts: 741

Rep: Reputation: Disabled
from /etc/syslog.conf

Code:
# Log anything 'warn' or higher.
# Exclude authpriv, cron, mail, and news.  These are logged elsewhere.
*.warn;\
	authpriv.none;cron.none;mail.none;news.none	-/var/log/syslog
 
Old 10-02-2015, 02:15 PM   #9
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,098

Rep: Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175
Quote:
Originally Posted by Diantre View Post
I think the "-- MARK --" line appears only in /var/log/messages, every 20 minutes if there's no other activity.
it's controlled by the -m option of syslogd (see the man page): you can change it passing that option with desired interval when launching it from /etc/rc.d/rc.syslog (line 10).
if, for example, you change line 10 of the above file from
Code:
    /usr/sbin/syslogd
to
Code:
    /usr/sbin/syslogd -m 0
you disable the MARK timestamp.
 
1 members found this post helpful.
Old 10-02-2015, 02:19 PM   #10
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by szboardstretcher View Post
For testing syslog you can use 'logger'
...
Either case just follow szboardstretcher's recommendation, test that you do or don't get new records in your syslog and then update whether or not this was merely log rotation and nothing further which caused the zero sized syslog file.
 
Old 10-02-2015, 03:35 PM   #11
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
I have a feeling the system borked itself once more (this is the bad sector errors fault, last time this happened I had to run fsck and hit yes a bunch of times to restore stuff). I am afraid of rebooting it but I probably will have to and that problem will probably occur again.

So anyway, I tried

Code:
logger IM A TEST
tail /var/log/syslog
And syslog is still empty...I am going to do a reboot and see if it fails rebooting as normally that happens when there are more bad sector errors.
 
Old 10-02-2015, 05:06 PM   #12
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 515

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by Altiris View Post
So anyway, I tried

Code:
logger IM A TEST
tail /var/log/syslog
And syslog is still empty...
That's because the default priority is "user.notice", so it goes to /var/log/messages. It has to be at least a warning level to be logged in the syslog (with the default configuration of course).

Try this:

Code:
logger -p user.warning HELLO
 
Old 10-02-2015, 09:44 PM   #13
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Diantre View Post
That's because the default priority is "user.notice", so it goes to /var/log/messages. It has to be at least a warning level to be logged in the syslog (with the default configuration of course).

Try this:

Code:
logger -p user.warning HELLO
I rebooted the machine, surpsingly no errors were found and things were written back into syslog file.
Doing that command logger -p user.warning HELLO also worked so I think it is fine.

Last edited by Altiris; 10-04-2015 at 01:42 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/var/log/boot.log is Empty in RHEL 5.10 (Tikanga) sk2code Red Hat 5 05-01-2014 12:53 PM
Postfix logging to both /var/log/mail.log and syslog Zolcsi Linux - Server 2 04-21-2013 03:07 AM
[SOLVED] No /var/log/messages , syslog , kern.log -but cat /var/spool/octopussy/octo_fifo masuch Linux - Newbie 4 06-13-2012 08:05 PM
[SOLVED] Empty /var/log/boot.log saifkhan123 Linux - General 3 02-22-2010 02:48 AM
Normal /var/log/syslog?? jimdaworm Slackware 2 02-03-2005 09:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration