本文整理匯總了Java中org.hyperic.sigar.Sigar.NATIVE_SCM_REVISION屬性的典型用法代碼示例。如果您正苦於以下問題:Java Sigar.NATIVE_SCM_REVISION屬性的具體用法?Java Sigar.NATIVE_SCM_REVISION怎麽用?Java Sigar.NATIVE_SCM_REVISION使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.hyperic.sigar.Sigar
的用法示例。
在下文中一共展示了Sigar.NATIVE_SCM_REVISION屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: printNativeInfo
private static void printNativeInfo(PrintStream os) {
String version =
"java=" + Sigar.VERSION_STRING +
", native=" + Sigar.NATIVE_VERSION_STRING;
String build =
"java=" + Sigar.BUILD_DATE +
", native=" + Sigar.NATIVE_BUILD_DATE;
String scm =
"java=" + Sigar.SCM_REVISION +
", native=" + Sigar.NATIVE_SCM_REVISION;
String archlib =
SigarLoader.getNativeLibraryName();
os.println("Sigar version......." + version);
os.println("Build date.........." + build);
os.println("SCM rev............." + scm);
String host = getHostName();
String fqdn;
Sigar sigar = new Sigar();
try {
File lib = sigar.getNativeLibrary();
if (lib != null) {
archlib = lib.getName();
}
fqdn = sigar.getFQDN();
} catch (SigarException e) {
fqdn = "unknown";
} finally {
sigar.close();
}
os.println("Archlib............." + archlib);
os.println("Current fqdn........" + fqdn);
if (!fqdn.equals(host)) {
os.println("Hostname............" + host);
}
if (SigarLoader.IS_WIN32) {
LocaleInfo info = new LocaleInfo();
os.println("Language............" + info);
os.println("Perflib lang id....." +
info.getPerflibLangId());
}
}