MongoDB: db.hostInfo() method
db.hostInfo
The db.hostInfo() method is used to return a document with information about the system MongoDB runs on.
Syntax:
db.hostInfo()
Example: MongoDB: db.hostInfo() method
Output:
> db.hostInfo(); { "system" : { "currentTime" : ISODate("2016-01-11T11:43:17.824Z"), "hostname" : "myownpc-PC", "cpuAddrSize" : 32, "memSizeMB" : 3487, "numCores" : 2, "cpuArch" : "x86", "numaEnabled" : false }, "os" : { "type" : "Windows", "name" : "Microsoft Windows 7", "version" : "6.1 (build 7600)" }, "extra" : { "pageSize" : NumberLong(4096) }, "ok" : 1 }
Retrieve the restaurants data from here
Previous:
db.help() method
Next:
db.isMaster() method
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics