Re: Is there printk() in FreeBSD?

From: Eygene Ryabinkin <rea-fbsd_at_codelabs.ru>
Date: Tue, 12 May 2009 15:48:38 +0400
Tue, May 12, 2009 at 06:29:35PM +0800, ????ccuiyyan_at_sina.com wrote:

> A simple question: sometimes i need to print out some kernel
> address in FreeBSD kernel. And i know printk() can be used in
> Linux to print the message to dmesg, Is there some similar in
> FreeBSD?
> 
> It seems that printk() cannot work in the FreeBSD kernel.

Use plain printf().

> And where can we find the output? in dmesg or somewhere else?

In the dmesg and in all (syslogged) destinations you had configured.
-- 
Eygene
 _                ___       _.--.   #
 \`.|\..----...-'`   `-._.-'_.-'`   #  Remember that it is hard
 /  ' `         ,       __.--'      #  to read the on-line manual
 )/' _/     \   `-_,   /            #  while single-stepping the kernel.
 `-'" `"\_  ,_.-;_.-\_ ',  fsc/as   #
     _.-'_./   {_.'   ; /           #    -- FreeBSD Developers handbook
    {_.-``-'         {_/            #
Received on Tue May 12 2009 - 09:48:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:47 UTC