[SERVER-19160] hostInfo for Mac OS has extra characters Created: 26/Jun/15  Updated: 19/Sep/15  Resolved: 22/Jul/15

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

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

Backwards Compatibility: Fully Compatible
Operating System: OS X
Steps To Reproduce:

db.hostInfo()

Sprint: Platform 6 07/17/15, Platform 7 08/10/15
Participants:

 Description   

The output of hostInfo on Mac OS X has the \u0000 characters on the end of several fields:

db.hostInfo()
{
	"system" : {
		"currentTime" : ISODate("2015-06-26T18:12:50.429Z"),
		"hostname" : "MacBook-Pro.local",
		"cpuAddrSize" : 64,
		"memSizeMB" : 16384,
		"numCores" : 8,
		"cpuArch" : "x86_64\u0000",
		"numaEnabled" : false
	},
	"os" : {
		"type" : "Darwin",
		"name" : "Mac OS X",
		"version" : "14.3.0\u0000"
	},
	"extra" : {
		"versionString" : "Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64\u0000",
		"alwaysFullSync" : 0,
		"nfsAsync" : 0,
		"model" : "MacBookPro10,1\u0000",
		"physicalCores" : 4,
		"cpuFrequencyMHz" : 2300,
		"cpuString" : "Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz\u0000",
		"cpuFeatures" : "FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX EST TM2 SSSE3 CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC POPCNT AES PCID XSAVE OSXSAVE TSCTMR AVX1.0 RDRAND F16C\u0000 SYSCALL XD EM64T LAHF RDTSCP TSCI\u0000",
		"pageSize" : 4096,
		"scheduler" : "multiq\u0000"
	},
	"ok" : 1
}



 Comments   
Comment by Githook User [ 28/Jul/15 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-19160 Drop trailing null bytes from OS X string sysctls
Branch: master
https://github.com/mongodb/mongo/commit/fdf7d0817b5500a6d18a103ff073d104329e7364

Comment by Githook User [ 22/Jul/15 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-19160 Drop trailing null bytes from OS X string sysctls
Branch: master
https://github.com/mongodb/mongo/commit/fdf7d0817b5500a6d18a103ff073d104329e7364

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