logging to dmesg from userland

Jason Helfman jhelfman at e-e.com
Mon Mar 14 06:38:58 UTC 2011


On Sun, Mar 13, 2011 at 07:08:20PM -0700, perryh at pluto.rain.com thus spake:
>I am looking for a way to write into the kernel message buffer --
>the one that dmesg prints out -- from a userland program, to help
>in relating kernel printf messages to the userland operations which
>provoked them.  (Yes, I am aware of the potential DoS implications:
>the capability should be restricted to root, or at least to the
>"operator" group.  I expect to use it only in single-user mode.)
>
>Is there a program, or a system call, which can do this?  logger(1)
>seemed a likely prospect, but either it doesn't have this capability
>or I haven't found the formula.

man syslog should have all of the info you need.

-jgh


More information about the freebsd-questions mailing list