This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 804701 - Native (sigar) Platform plugin states "Win32" even on 64 bit systems
Native (sigar) Platform plugin states "Win32" even on 64 bit systems
Status: CLOSED CURRENTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- Other (Show other bugs)
JON 3.0.0
x86_64 Windows
low Severity low
: ER01
: JON 3.2.0
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks: 804705
  Show dependency treegraph
 
Reported: 2012-03-19 11:52 EDT by Tom Fonteyne
Modified: 2014-01-02 15:40 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 804705 (view as bug list)
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Tom Fonteyne 2012-03-19 11:52:02 EDT
Description of problem:

64 bit Windows systems will be reported as being "Win32"

This is because 
   org/​ rhq/​ core/​ system/​ NativeSystemInfo.java 
report the string "as-is" from the native Sigar library

Version-Release number of selected component (if applicable):


How reproducible: always


Steps to Reproduce:
1. Start an agent in 64 bit JDK on a 64 bit Windows and let it discover the platform.
2. Import it in the JON server, and look at the details of the OS.
3.
  
Actual results:

Win32

Expected results:

Windows Server 2008 R2   (or similar for other Windows versions of course)

Additional info:

This is easy to fix by always reading the OS version from Java and NOT from Sigar.

org/​ rhq/​ core/​ system/​ NativeSystemInfo.java:

106     public String getOperatingSystemName() {
107         return OperatingSystem.getInstance().getName();
108     }

should be changed to (line numbers from JavaSystemInfo.java):

098     public String getOperatingSystemName() {
099         return System.getProperty("os.name");
100     }

It is debatable, but advisable to do the same for other calls in this class where Java is delivering a "good" result. Examples would be:
 getOperatingSystemVersion()
 getNumberOfCpus()

and likely more.
Comment 1 Tom Fonteyne 2012-03-19 11:57:10 EDT
cloned to RHQ as: https://bugzilla.redhat.com/show_bug.cgi?id=804705
Comment 2 Mike Foley 2012-03-26 11:57:48 EDT
medium, no target release 

per bz triage (crouch, mfoley, asantos, loleary)
Comment 3 Heiko W. Rupp 2013-08-12 08:01:19 EDT
According to https://bugzilla.redhat.com/show_bug.cgi?id=804705#c8 this is now in master and will be in er1
Comment 4 Sunil Kondkar 2013-11-19 07:14:00 EST
Verified on version : 3.2.0.ER5 build Number :2cb2bc9:225c796
The OS name now shows "Windows" and Architecture value "x64" in details view and on monitoring->traits tab.

Note You need to log in before you can comment on or make changes to this bug.