*BSD News Article 86198


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!spool.mu.edu!howland.erols.net!blackbush.xlink.net!news-kar1.dfn.de!news-fra1.dfn.de!news-koe1.dfn.de!main.Germany.EU.net!Dortmund.Germany.EU.net!interface-business.de!usenet
From: j@ida.interface-business.de (J Wunsch)
Newsgroups: comp.unix.bsd.misc
Subject: Re: How to output kernel generated data?
Date: 6 Jan 1997 11:20:12 GMT
Organization: interface business GmbH, Dresden
Lines: 20
Message-ID: <5aqn5c$m5k@innocence.interface-business.de>
References: <5ajbbc$brm@yangtze.cs.umd.edu>
Reply-To: joerg_wunsch@interface-business.de (Joerg Wunsch)
NNTP-Posting-Host: ida.interface-business.de
X-Newsreader: knews 0.9.6
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.misc:1876

fwmiller@cs.umd.edu (Frank W. Miller) wrote:

> Currently, I'm using uprintf() in the sections of the kernel I have
> instrumented to send the data to the controlling terminal.
> The trouble is, I'd like to be able to redirect this to a file so I
> can reduce the data later.  uprintf() doesnt seem to work for this and
> printf() sends stuff only to the console.  This seems like it should
> be simple.

Use log().  It's supposed to send something to the logging facility
only, so you can decide in /etc/syslog.conf where it should go to.  I
think it's always logging with the KERNEL facility, so use a
sufficiently low priority (e.g. LOG_DEBUG) in order to be able
distinguishing it from the ``My CPU is on fire!'' messages that should
also go to the console.

-- 
J"org Wunsch					       Unix support engineer
joerg_wunsch@interface-business.de       http://www.interface-business.de/~j