3

I am trying to change default log location ( var/svc/logs/) of each and every SMF registered processes and append to particular file (/opt/smf.log).

xenoterracide
  • 59,188
  • 74
  • 187
  • 252

1 Answers1

2

That file path appears to be compiled into svc.startd:

myhostname# strings /lib/svc/bin/svc.startd |grep '/var/svc/log'
/var/svc/log/
/var/svc/log/
/var/svc/log/
/var/svc/log/

I suppose you could try changing the location of the directory to somewhere else, and make /var/svc/log a symlink to the new location, but I don't believe it's possible to make the services all log to one file -- that's just not how SMF was designed to work. And since svc.startd starts early in the boot process, before /var is even mounted read-write, linking /var/svc/log to some other -- possibly even unmounted -- partition may cause trouble.