OpenWrt Forum Archive

Topic: syslog problem

The content of this topic has been archived on 22 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

is there something wrong with openwrt syslog ?
i have it outputed to /tmp/syslog.log and i am running transmission for torrent downloading
when it tries to read it then it fails and reports

=/tmp/syslog.log not readable. Properly configure syslogd at system startup

klogd and syslogd are running
its something about the syntax of the file that is causing the problem

it is constantly outputing
"Jan  1 08:01:30 GP user.info : debug, Sending discover..."
along with the useful messages

maybe this is causing the problem
i got another error message about the syntax of the file (i dont remember it now)

By default, syslogd in OpenWRT does not save to a file;  there'd be nothing stopping the file from growing indefinitely and filling all RAM.  Instead it's kept in a fixed-size buffer in memory, and read with the logread command.

If you've reconfigured syslogd to save to a file, note that it's a potentially bad idea for the reasons listed above.

If other programs are having problems reading the file, the obvious thing to do would be to check the permissions on the log file.

$ ls -l /tmp/syslog.log

I also notice your error says =/tmp/syslog.log, not /tmp/syslog.log .  Where's the equal come from?  Maybye you need to check the config file syntax.

The 'discover' message is just your router's DHCP client trying and failing to get an address repeatedly.

(Last edited by TylerM on 20 May 2007, 00:10)

thanks for the reply
i used the x-wrt web interface to configure it i didnt mess with config files
i didnt set an IP for syslog server and i am using no WAN connection or WAN IP (openwrt is not the LANs router or gateway)...i just wanted to use the internal kernel syslog messages not remote logging

i just chose file but i also tried the "circular" option which doesn't ask for filename
of syslog file and i set 64 kB for size


the '+' sign is because i copy - pasted i dont know what it means...its the error message i get in transmission when i click the "log" option on the cgi (it was supposed to draw a graph of download and upload speeds by parsing the syslog file and using gnuplot

the file syslog.log is -rw-------
i tried chmod 755 to it but nothing changed...i also noticed a syslog.log.0 file automatically created with similar content (syslog mesages)

it was working fine on dd-wrt again configuring syslog with the web-interface
it is an issue of optware packages and openwrt and it has to do with the syslog daemon

vlahos wrote:

i just chose file but i also tried the "circular" option which doesn't ask for filename
of syslog file and i set 64 kB for size

You're doing all your configuration with the web interface?  Have you tried logging into the system with ssh and seeing what it's doing there?

Try 'logread' from a command prompt.

Again, I'd reccomend the circular buffer.  If you use a log file, the file will grow and eat up all RAM given enough time.

the '+' sign is because i copy - pasted i dont know what it means...

I think it means what it says -- it's trying to open =/tmp/syslog.log instead of /tmp/syslog.log

the file syslog.log is -rw-------

Could you show the rest of the output of ls -l /tmp/syslog.log please?  What users it belongs to would also be useful.

i tried chmod 755 to it but nothing changed...i also noticed a syslog.log.0 file automatically created with similar content (syslog mesages)

Which one of the two is actually being appended to?  You can add log messages whenever you want with logger message

you were right
it was an extra "=" before the syslog location
thanks for your patience
you actually made that work for me
i considered everything BUT the obvious...

i am just curious how i missed that twice...i had changed the syslog
location from /var/log/messages to /tmp/syslog.log just in case
but it seems that i didnt notice the double "=" before it

It doesn't look like part of a filename, so you ignored it.  Unfortunately, UNIX will take absolutely anything except NULL as part of a valid filename big_smile

Underneath the log type field there is a field for log size
Doesnt this apply to BOTH circular and file log types ?
wouldnt this constrain the log size so that it wouldnt eat up all memory ?

also do you know what is this message for ?
May 20 15:10:19 (none) user.info : debug, Sending discover...
its coming again and again filling the log
(
May 20 15:10:19 (none) user.info : debug, Sending discover...
May 20 15:10:19 (none) user.info : debug, Sending discover...
May 20 15:10:19 (none) user.info : debug, Sending discover...
May 20 15:10:19 (none) user.info : debug, Sending discover...
May 20 15:10:19 (none) user.info : debug, Sending discover...
May 20 15:10:19 (none) user.info : debug, Sending discover...
May 20 15:10:19 (none) user.info : debug, Sending discover...
etc - only time changes- here i did paste)

u said something about DHCP
I have no DHCP -> WAN is disabled and LAN is on static IP

it is filling the log so the useful transmission info is scattered and 1 hours graph is just a couple of lines

on dd-wrt the graph was a normal graph because there wasnt this
May 20 15:10:19 (none) user.info : debug, Sending discover...
line every  2 seconds

(Last edited by vlahos on 21 May 2007, 10:54)

The discussion might have continued from here.