From 14826fdca5ea15976ed69ba9c86b237b12b608e3 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Fri, 13 May 2005 18:05:00 +0000 Subject: [PATCH] add more from sys props --- .../src/net/hyperic/sigar/OperatingSystem.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/bindings/java/src/net/hyperic/sigar/OperatingSystem.java b/bindings/java/src/net/hyperic/sigar/OperatingSystem.java index fc8a2f4b..3be8699e 100644 --- a/bindings/java/src/net/hyperic/sigar/OperatingSystem.java +++ b/bindings/java/src/net/hyperic/sigar/OperatingSystem.java @@ -20,7 +20,9 @@ public class OperatingSystem { private String patchLevel; private String vendor; private String vendorVersion; - + private String dataModel; + private String cpuEndian; + private OperatingSystem() { } @@ -32,7 +34,9 @@ public class OperatingSystem { os.version = props.getProperty("os.version"); os.arch = props.getProperty("os.arch"); os.patchLevel = props.getProperty("sun.os.patch.level"); - + os.dataModel = props.getProperty("sun.arch.data.model"); + os.cpuEndian = props.getProperty("sun.cpu.endian"); + if (os.name.equals("Linux")) { os.getLinuxInfo(); } @@ -109,6 +113,14 @@ public class OperatingSystem { return this.vendorVersion; } + public String getDataModel() { + return this.dataModel; + } + + public String getCpuEndian() { + return this.cpuEndian; + } + private void getLinuxInfo() { VendorInfo[] info = { new GenericVendor("mandrake-release", "Mandrake"),