[SERVER-19158] hostInfo for Windows has incorrect version Created: 26/Jun/15  Updated: 22/Oct/19  Resolved: 21/Oct/19

Status: Closed
Project: Core Server
Component/s: Diagnostics, Shell
Affects Version/s: 3.1.4
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Jonathan Abrahams Assignee: Andrew Morrow (Inactive)
Resolution: Duplicate Votes: 0
Labels: 32qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-31568 Fix Windows version detection Closed
Operating System: Windows
Steps To Reproduce:

db.hostInfo()

Participants:

 Description   

The admin command, hostInfo, returns an incorrect os version for Windows 2012R2:

> db.hostInfo()
{
	"system" : {
		"currentTime" : ISODate("2015-06-26T21:16:11.670Z"),
		"hostname" : "CAPJA-Win2012R2:37017",
		"cpuAddrSize" : 64,
		"memSizeMB" : 4095,
		"numCores" : 4,
		"cpuArch" : "x86_64",
		"numaEnabled" : false
	},
	"os" : {
		"type" : "Windows",
		"name" : "Microsoft Windows Server 2012",
		"version" : "6.2 (build 9200)"
	},
	"extra" : {
		"pageSize" : NumberLong(4096)
	},
	"ok" : 1
}

This is the output from systeminfo for the same host:

Host Name:                 CAPJA-WIN2012R2
OS Name:                   Microsoft Windows Server 2012 R2 Standard
OS Version:                6.3.9600 N/A Build 9600
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Server
OS Build Type:             Multiprocessor Free
..



 Comments   
Comment by Jonathan Abrahams [ 29/Jun/15 ]

Windows 10 is also incorrect:

{
	"system" : {
		"currentTime" : ISODate("2015-06-29T20:43:54.106Z"),
		"hostname" : "Win10-VM",
		"cpuAddrSize" : 64,
		"memSizeMB" : 1023,
		"numCores" : 1,
		"cpuArch" : "x86_64",
		"numaEnabled" : false
	},
	"os" : {
		"type" : "Windows",
		"name" : "Microsoft Windows 8",
		"version" : "6.2 (build 9200)"
	},
	"extra" : {
		"pageSize" : NumberLong(4096)
	},
	"ok" : 1
}

Output from systeminfo:

Host Name:                 WIN10-VM
OS Name:                   Microsoft Windows 10 Pro Insider Preview
OS Version:                10.0.10130 N/A Build 10130
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
...

Comment by Jonathan Abrahams [ 29/Jun/15 ]

Note the information is correct for 2008R2:

{
	"system" : {
		"currentTime" : ISODate("2015-06-29T14:22:59.073Z"),
		"hostname" : "WIN2008R2",
		"cpuAddrSize" : 64,
		"memSizeMB" : 2047,
		"numCores" : 1,
		"cpuArch" : "x86_64",
		"numaEnabled" : false
	},
	"os" : {
		"type" : "Windows",
		"name" : "Microsoft Windows Server 2008 R2",
		"version" : "6.1 SP1 (build 7601)"
	},
	"extra" : {
		"pageSize" : NumberLong(4096)
	},
	"ok" : 1
}

Output from systeminfo:

Host Name:                 WIN2008R2
OS Name:                   Microsoft Windows Server 2008 R2 Enterprise
OS Version:                6.1.7601 Service Pack 1 Build 7601
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Server
OS Build Type:             Multiprocessor Free
...

Generated at Thu Feb 08 03:50:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.