Bug 804701 - Native (sigar) Platform plugin states "Win32" even on 64 bit systems
Summary: Native (sigar) Platform plugin states "Win32" even on 64 bit systems
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- Other
Version: JON 3.0.0
Hardware: x86_64
OS: Windows
low
low
Target Milestone: ER01
: JON 3.2.0
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: 804705
TreeView+ depends on / blocked
 
Reported: 2012-03-19 15:52 UTC by Tom Fonteyne
Modified: 2018-11-26 17:05 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
: 804705 (view as bug list)
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tom Fonteyne 2012-03-19 15:52:02 UTC
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 15:57:10 UTC
cloned to RHQ as: https://bugzilla.redhat.com/show_bug.cgi?id=804705

Comment 2 Mike Foley 2012-03-26 15:57:48 UTC
medium, no target release 

per bz triage (crouch, mfoley, asantos, loleary)

Comment 3 Heiko W. Rupp 2013-08-12 12:01:19 UTC
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 12:14:00 UTC
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.