[SERVER-4615] Add hostInfo command to show host info like distribution/server architecture, memory, etc. Created: 04/Jan/12 Updated: 26/Oct/15 Resolved: 29/Feb/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Admin |
| Affects Version/s: | None |
| Fix Version/s: | 2.1.1 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Michael A. Fiedler | Assignee: | Ben Becker |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Any mongo* instance |
||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
Server should be able to determine what os/distro/platform it is running on. Here's a few methods for collecting relevant information from the linux command line, and you can see there are differences. Possibly have a decision-making process to determine which method should be used to collect the rest?
So it seems like on a *nix system, running a `uname` will provide whether it is Darwin vs Linux, and then other tests could be run to grab relevant information. Things I'd care about knowing: Windows has a different method, using the `systeminfo` command line tool, like so:
This returns too much, including the BIOS, so using a better find like this: `findstr /B /C:"OS Name" /C:"OS Version"` should get the relevant information. |
| Comments |
| Comment by auto [ 03/Mar/12 ] | |||||||||||||||||||||||
|
Author: {u'login': u'tadmarshall', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: Set dwLength to the size of the MEMORYSTATUSEX struct before passing it it | |||||||||||||||||||||||
| Comment by auto [ 29/Feb/12 ] | |||||||||||||||||||||||
|
Author: {u'login': u'vrtx', u'name': u'Ben Becker', u'email': u'benjamin.becker@gmail.com'}Message: | |||||||||||||||||||||||
| Comment by Tad Marshall [ 25/Feb/12 ] | |||||||||||||||||||||||
|
I think that Microsoft Windows Server 2008 R2 is a 64-bit-only OS, so if this is live data (and not a "for instance") then it is not correct. Are you reporting the memBits for the instance of mongod that is running and not the OS's native pointer size? Also, I think that some of the info you report for non-Windows versions would be great to have for Windows as well, such as CPU string, numCores, physicalCores, cpuFrequency and probably more. But this is a great feature and I look forward to it! | |||||||||||||||||||||||
| Comment by Scott Hernandez (Inactive) [ 07/Feb/12 ] | |||||||||||||||||||||||
|
Would be very useful to report back swap/used and mem/free|cache | |||||||||||||||||||||||
| Comment by Ben Becker [ 02/Feb/12 ] | |||||||||||||||||||||||
|
Just an incremental update: MacOS data collection is done (via sysctl). This might be more data than we want; suggestions welcome. Example from my MBA:
(Note: NumCores includes HT and is what is usually reported by the OS. PhysicalCores is the actual number of cores.) Linux is almost done but needs testing across distros. Exploratory work on Win32 platforms has been done; just need to implement and ensure version compatibility. | |||||||||||||||||||||||
| Comment by Eliot Horowitz (Inactive) [ 25/Jan/12 ] | |||||||||||||||||||||||
|
And should be caches so its fast. | |||||||||||||||||||||||
| Comment by Eliot Horowitz (Inactive) [ 25/Jan/12 ] | |||||||||||||||||||||||
|
Should be an API in ProcessInfo | |||||||||||||||||||||||
| Comment by Scott Hernandez (Inactive) [ 04/Jan/12 ] | |||||||||||||||||||||||
|
Change to mms jira project |