Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Kevin Barrett <kbarrett@rt66.com>
Cc: kbarrett@rt66.com
Subject: How to determine CPU utilization
Date: 1996/06/20	[thread overview]
Message-ID: <31CA1F20.4D58B9C7@rt66.com> (raw)


I am working on a real-time executive on the DEC Alpha.  A requirement is
to provide 50% spare CPU capacity, and I would like to have my console
display the current CPU idle time.

  One implementation we have considered is to have a task run at the lowest
priority, that just counts in a while loop.  That task would be interrupted
at a set rate, say 2 Hz, at which time it would report the count value and
reset.  This is an acceptable solution, but I was wondering if OSF/1 (or
any POSIX.4 Unix, for that matter) provides a service for determining the
percentage of time the CPU is idle (or in use).

  Oh, we have thought about using the proc filesystem, but I don't think
all that system call activity would be such a good idea in hard real-time.

  Does anyone know of a service we can use?  Thanks!

-- 
+----------------------------------------------------------------------------+
|          Kevin Barrett           |      Albuquerque, New Mexico, USA       |
|        kbarrett@rt66.com         |     http://www.rt66.com/~kbarrett       |
+----------------------------------------------------------------------------+
 "What about the Rimmer Directive, which states:  'Never tangle with anything 
    that's got more teeth than the entire Osmond family'?" - Arnold Rimmer



                 reply	other threads:[~1996-06-20  4:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox