Messages in this thread | | | Subject | Re: Scheduler set to 1000Hz | Date | Fri, 22 Jan 1999 15:15:17 +0200 (EET) | From | Matti Aarnio <> |
| |
Quantum Porcupine <joshagam@cs.nmsu.edu> replied thus: > On Fri, 22 Jan 1999, Matti Aarnio wrote: ... > > That is elementary. The running time counts are in JIFFIES, > > which are in the HZ units. The 'ps' has 'HZ' compiled in > > when it was made. In fact the system does not tell the internal > > HZ value out in any easy to use way. So sad. > > Ah, I see... is there any way for the ps/top/etc. utilities to get at the > HZ rate so this behaviour can be fixed?
POSIX way would be to have sysconf() call to extract this information. Linus' earlier comments (mid December?) ignoring, I do think Linux would benefit from the sysconf() / pathconf() / fpathconf() trio. Apparently *only* SPARC systems have it. (For SunOS compability.)
It is somewhat difficult to modifying presentation machinery of some values in e.g. /proc/123/stat "file" to scale them so that they always present their value as if the HZ would be the ``classical constant'' for given platform. For example, where would the ``classical constant'' be taken from, if the only instance of ``HZ'' is modified ?
In this case the deprecated sysconf(_SC_CLK_TCK) would be THE answer to solve the problems that ps/top/et.al. have.
/Matti Aarnio <matti.aarnio@sonera.fi>
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |