|
From: <cf...@im...> - 2010-08-12 02:14:22
|
On Wed 11th Aug, 2010 at 16:44, Scott Haneda seems to have written:
> Hello,
>
> I am running smartmontools 5.39.1 on Mac OS X 10.6. I have installed it via MacPorts (source compiler system), which has given it the configure args of:
>
> configure.args --mandir=${prefix}/share/man \
> --enable-drivedb \
> --enable-savestates \
> --enable-attributelog \
> --enable-sample
>
> ${prefix} in my case is /opt/local
>
> My issue is with logging. On OS X the syslog is called system.log. The smartd man page states that logging will get directed to FACILITY or daemon [default]. Probably defaulting to 'messages'.
>
> Currently, with the above install arguments, nothing is logged at all. The only way I know it may be working is that I have set up emails to be sent. The way MacPorts works is that it can only modify (for the most part) files within it's own ${prefix}. So editing syslog.conf is not the preferred way to solve this It would be an edit that has to be explained to all users who install smartmontools on Mac OS X through MacPorts.
>
> I would rather get smartmontools to log to the /var/log/system.log by default.
>
> smartd is started with a launchd (cron like system on BSD/OSX) item via this command:
> /opt/local/sbin/smartd -n
>
> /etc/syslog.conf has this relevant line:
> *.notice;authpriv,remoteauth,ftp,install,internal.none /var/log/system.log
>
> I believe that to solve this, I will need to alter the smartd -n command to add
> -l FACILITY, --logfacility=FACILITY
> though I am not certain which value I should add.
On 10.4, I use this:
/usr/local/sbin/smartd -p /var/run/smartd.pid -l local3 -c \
/usr/local/etc/smartd.conf
in a StartupItem. (This usually means I couldn't make it work with launchd.)
I seem to have configured with the single option:
'--with-initscriptdir=/Library/StartupItems'
but I think some of the options MacPorts gives are also the defaults
(e.g. drive database etc.).
I use this with a customised log facility specified in syslog.conf:
local3.* /usr/local/var/log/smartd.log
which you obviously don't wish to do.
On the version of smartmontools I'm using (5.38), the man page
specifies the values as one of local0-7. On my machine, most of these
are not directed anywhere in particular by syslog.conf by default
certainly not to system.log. So no argument passed to smartd with -l
would do what you want here.
However, you would still get messages of sufficient importance logged to
system.log, I think, even though you will not get the routine status
messages.
I think probably you already know all this, however.
Incidentally and not that my view matters, it strikes me as odd to have
a policy of non-modification with respect to configuration files but to
be quite happy directing the output from MacPorts software to
system.log. I would personally be more bothered about keeping the
latter distinct than the former. (But then that's why I use the setup
described, I suppose.)
Good luck,
cfr
> Thanks for any pointers.
>
|