DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-10-07 01:47:29

puterboy
Member
Registered: 2008-09-18
Posts: 306

Any way to get time/date info on dmesg entries?

I would like to know the time/date of various syslog/dmesg entries, such as when the disks spin up and down.
On my Fedora linux machine, I can get the timestamps by looking at /var/log/messages.

How can I get similar info on the DNS-323? (note I didn't see any relevant syslog files in /var/log?
Is turning on syslogd.sh the right way or can I get that info without doing that?

Offline

 

#2 2008-10-07 10:39:21

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Any way to get time/date info on dmesg entries?

puterboy wrote:

I would like to know the time/date of various syslog/dmesg entries, such as when the disks spin up and down.
On my Fedora linux machine, I can get the timestamps by looking at /var/log/messages.

How can I get similar info on the DNS-323? (note I didn't see any relevant syslog files in /var/log?
Is turning on syslogd.sh the right way or can I get that info without doing that?

Code:

sh /ffp/start/syslogd.sh start
cat /var/log/messages

Offline

 

#3 2008-10-08 01:17:42

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: Any way to get time/date info on dmesg entries?

I assume that there is no automatic logrotate type facility. So, I imagine one needs to be careful that /var/log/messages doesn't fill up the rootfs space if the device remains up for a long time.

I can imagine two potential solutions:
1. Add a cron job to trim /var/log/messages (and potentially compress and transfer the trimmed part to your HD)
2. Have syslog write to your HD rather than to the rootfs. This may create a conflict with the hard-disk spindown notification (unless you write to a USB stick instead) since every time the HD spins down it may need to spin up again to write to /var/log/messages.

Does anybody have any experience or recommendations?

Offline

 

#4 2008-10-08 01:20:08

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Any way to get time/date info on dmesg entries?

puterboy wrote:

I assume that there is no automatic logrotate type facility.

It's busybox syslogd/klogd. rotation is built-in, defaults are:

Code:

root@bob:~# busybox syslogd --help
...
Options:
...
        -s SIZE         Max size (KB) before rotate (default=200KB, 0=off)
        -b NUM          Number of rotated logs to keep (default=1, max=99, 0=purge)

Offline

 

#5 2008-12-29 11:45:53

mastervol
Member
Registered: 2008-09-06
Posts: 81

Re: Any way to get time/date info on dmesg entries?

ok, now if /var/log/messages reaches 200KB, it :

a) will be moved (to which location?), a new empty /var/log/messages file will be created?
b) a new empty /var/log/messages file will be created?


DNS-323     F/W: 1.06  H/W: ??  ffp: 0.5  Drives (normal mode): 1 x 1,5 TB Seagate SATA II ST31500341AS, 1 x 250 GB Western Digital SATA I

Offline

 

#6 2009-01-04 17:26:25

silversurfer
Member
Registered: 2008-07-20
Posts: 95

Re: Any way to get time/date info on dmesg entries?

It will rename the old file to "messages.0" and start a new "messages".

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB