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/