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 2012-01-22 15:29:27

dibs
Member
Registered: 2011-12-06
Posts: 9

syslogd: is it running?!

Heya

I've got linux experience but I'm used to this sort of thing being set-up "out of the box" by the distro.

I can see that syslog is installed but I have no idea if it's started and if it is, where it's configured.

Any ideas?

Cheers.

Offline

 

#2 2012-01-22 21:03:01

rsd76
Member
Registered: 2010-04-18
Posts: 47

Re: syslogd: is it running?!

Hi,

Normally you need something like:

Code:

ps -ef | grep syslogd

to get a line like:
2185 root     /ffp/sbin/syslogd -O /ffp/var/log/messages -s 1024 -b 1
telling you a syslogd is running.
However on the NAS running the ps command is running busybox in ps-mode.
No arguments are necessary. And as there aren't many processes running. A single ps is enough to search for the syslogd process.
However the above code "ps -ef | grep syslogd" also works.
If an output line contains "grep syslogd", this is not the syslogd process, but the grepping of the "ps -ef" output.

On my NAS the syslogd process is running because I've started myself using the a start script with the following code:

Code:

#!/ffp/bin/sh

# PROVIDES: my_syslogd

. /ffp/etc/ffp.subr

name="syslogd"
command="/ffp/sbin/syslogd"
arguments="-O /ffp/var/log/messages -s 1024 -b 1"
start_cmd="syslogd_start"
stop_cmd="syslogd_stop"

syslogd_start()
{
        echo "Starting syslogd"
        $command $arguments 1>/ffp/var/$name.log 2>/ffp/var/$name.log &
}

syslogd_stop()
{
        echo "Stopping syslogd"
        killall syslogd
}

run_rc_command "$1"

You can manually start it with:

Code:

/ffp/sbin/syslogd -O /ffp/var/log/messages -s 1024 -b 1 &

This creates as log file "/ffp/var/log/messages" of max 1Mb and rotates it to "/ffp/var/log/messages.0" if the 1Mb is full.

HTH.,

RSD76


Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin & Hobbes)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB