Stephen Hahn wrote: > * Kohsuke Kawaguchi <Kohsuke.Kawaguchi at sun.com> [2009-01-20 19:44]: >> Liane Praza wrote: >>> Kohsuke Kawaguchi wrote: >>>> According to the FAQ >>>> http://www.opensolaris.org/os/community/smf/faq/#toc12 , >>>> I don't need to do anything to get logs rotated because it's already done >>>> by >>>> logadm. >>>> >>>> But here's the question. SMF appears to redirect stdout/stderr of services >>>> straight to these log files. So that means these log files are kept open >>>> all >>>> the time, which in turn means log rotation won't work correctly --- the >>>> services will just keep writing to the old file, after it's renamed to >>>> something.0 >>>> >>>> How does people work around this problem? Is't this broken? Shouldn't SMF >>>> sit >>>> in the middle so that logadm can send a signal to reopen log files, or >>>> something like that? >>> >>> Yes, sorry, it is broken. It's the subject of: >>> 6578671 smf services keep logging to old smf logs after log rotation as >>> well, until we restart them. >> >> Thank you for a pointer to the bug report. >> >> I guess I was coming from a slightly different angle --- that is, instead >> of changing every daemon, isn't it better if SMF sits between daemons and >> log files to handle signals and so on, like rotatelogs from Apache and >> DJB's multilog does? >> >> In that way, all daemon logs show up in /var/svc/log with predictable names >> (which is really nice), and also simplifies logadm.conf substantially. > > Is the proposed workaround not sufficient as a fix? That is, couldn't > the smf_logs rule be > > smf_logs -c -C 8 -s 1m /var/svc/log/*.log > > or do we have examples of bizarre program that seek on stdout/stderr? > (Trying it on a machine now...)
Does this mean I can expect this change in Solaris somewhere down the road? If so, that's great! Speaking of logadm, it would be nice if logadm can read configuration from not just one file but from /etc/logadm.d/* When I package my daemon for Solaris via pkg(5), I can't currently auto-configure logadm, because I have to modify logadm.conf. -- Kohsuke Kawaguchi Sun Microsystems http://weblogs.java.net/blog/kohsuke/ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3282 bytes Desc: S/MIME Cryptographic Signature URL: <http://mail.opensolaris.org/pipermail/smf-discuss/attachments/20090120/6c872e41/attachment.bin>