…ss cpu usage(%) is calculated
the counter without the '/sec' and if fails, try again with it. If the second call fails, throw an exception.This issue must be addressed at the java level (and not C code), since the counter names must be translated before to support i18n native OS locals. Please also note, the C code (at Pdh.c), tries to do the same, but at this level we cannot use the translation mechanism the Java level offers, hence this fix won't handle non-English i18n locals.
…void breaking compilation.
…tional characters. This fixes Hyperic bug https://jira.hyperic.com/browse/HQ-4227
As utmpx is standardized by POSIX, first attempt to access the utmpx database using the standard getutxent() function. If we don't have utmpx, fall back to some simple utmp code that accesses the database manually. This code has been compile-tested on FreeBSD 8 (utmp), FreeBSD 9 (utmpx) and Ubuntu Linux 11.10 (utmpx).