Date: Thu, 3 Dec 1998 12:59:00 -0600 From: "Brian C. Grayson" <bgrayson@marvin.ece.utexas.edu> To: gkshenaut@ucdavis.edu, questions@FreeBSD.ORG Subject: Re: entry on "calcru: negative time" Message-ID: <19981203125900.A27570@marvin.ece.utexas.edu> In-Reply-To: <199812030031.QAA18415@deal1.bogs.org>; from Greg Shenaut on Wed, Dec 02, 1998 at 04:31:13PM -0800 References: <4.1.19981202153837.021c67b0@mail.plstn1.sfba.home.com> <199812030031.QAA18415@deal1.bogs.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 02, 1998 at 04:31:13PM -0800, Greg Shenaut wrote: > > I have done two different hacks for this: one is to increment a counter > and print the message, along with the count, every 100-1000-whatever > times. The other hack I did was to use a flag and print the message > the first time only. In a NetBSD forum, I suggested using an exponential scheme for printing the message: print it for the first, second, 4th, 8th, 16th, ... 1048576th, ... occurrence. This is pretty much bound to waste no more than 32 lines in the log file, but also gives one an idea of how often it is occurring (compared to simply printing once). I've been using such a scheme for a few years in some of my own code, and find it invaluable! It's easy to write a macro like EXPONENTIAL_KPRINTF(("format", ...)) that will provide such backoff on a case-by-case basis -- E-mail me if you want the proper incantation. It takes an extra set of parentheses, to deal with the varargs. BTW, on our system (built from 3.0-19981103-SNAP), we see calcru problems, but sysctl -w kern.timecounter.method=1 prints: sysctl: unknown oid 'kern.timecounter.method'. Do I just need to upgrade to a newer kernel? The problem started when I tried to run XF86_3DLabs, for a Fire GL Pro 1000 card, from XFree86-3.3.3. Brian -- "And with a few algebraic manipulations, we arrive at what is dear to our hearts, the classical equations of motion." - Dr. Dunning, PHYS 202 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981203125900.A27570>