Subject: Re: Chris Torek: Re: i386 interrupt counters
To: Jordan K. Hubbard <>
From: Darren Reed <>
List: current-users
Date: 08/21/1996 23:19:24
In some mail from Jordan K. Hubbard, sie said:
> FYI..
> ------- Forwarded Message
> From: Chris Torek <torek@BSDI.COM>
> Message-Id: <199608210823.CAA02423@forge.BSDI.COM>
> To:,
> Subject: Re: i386 interrupt counters
> Cc:, port-i386@NetBSD.ORG, tech-kern@NetBSD.ORG
> Sender: owner-port-i386@NetBSD.ORG
> Precedence: list
> X-Loop: port-i386@NetBSD.ORG
> >> BTW, do you use "struct evcnt" to implement it ? (see sparc port)
> >No, but I suspect I should be, no?  ;)
> I always intended to have `systat -vmstat' display the event
> counters in the `Interrupts' column (probably relabelling the
> column).  There should be a sysctl to retrieve them from the
> kernel, too.
> Chris
> ------- End of Forwarded Message

Checkout pstat(2) under HP-UX 9 and 10 (there is only a man page on 10).

For what its worth, I've written a version of w(1) using pstat(2) that
worked as well as the original except it wasn't setuid-root.  I'm sure
the same could be done for ps(1) on HP-UX and there is a top-style tool
called "yamm" for HP-UX that doesn't need to be setuid root.  I also
believe that some of the vmstat/systat type tools also use this interface.

I think pstat(2) is an excellent idea, so long as you don't believe that
the information needed by ps/w, etc, doesn't need to be private.