If this whole OpenSolaris birthday celebration has anyone interested
in a fun DTrace project, here''s one that''s both relatively
straightforward
and tremendously valuable: add a stable "log" provider that adds an
SDT
probe to log_makemsg() in the kernel. Why is this useful? So when you
see messages like "foodaemon[1234]: strdup: out of memory" and
you''re
wondering "now where the hell is _that_ happening?" you can do
something
like this:
# dtrace -n log''/strstr(args[0], "strdup") !=
NULL/{ustack()}''
In this particular case, you can discover -- as I did using FBT -- that
get_pam_conf_entry() has really, really crappy error messages.
Anyway, this project wouldn''t be too much work -- it would be a matter
of figuring out what of the available information at the entry to
log_makemsg() is valuable in a stable way (and potentially adding a
translator) -- and you would be a hero to sysadmins and daemon developers
everywhere...
Anyway, just a thought. Let us on Team DTrace know if you''re
interested
in this...
- Bryan
--------------------------------------------------------------------------
Bryan Cantrill, Solaris Kernel Development. http://blogs.sun.com/bmc