Database Reference
In-Depth Information
> db.isMaster()
{
"setName" : "myapp",
"ismaster" : false,
"secondary" : true,
"hosts" : [
"arete:40001",
"arete:40000"
],
"arbiters" : [
"arete:40002"
],
"primary" : "arete:40000",
"maxBsonObjectSize" : 16777216,
"ok" : 1
}
A more detailed view of the system is provided by the rs.status() method. You'll see
state information for each node. Here's the complete status listing:
> rs.status()
{
"set" : "myall",
"date" : ISODate("2011-09-27T22:09:04Z"),
"myState" : 1,
"members" : [
{
"_id" : 0,
"name" : "arete:40000",
"health" : 1,
"state" : 1,
"stateStr" : "PRIMARY",
"optime" : {
"t" : 1317161329000,
"i" : 1
},
"optimeDate" : ISODate("2011-09-27T22:08:49Z"),
"self" : true
},
{
"_id" : 1,
"name" : "arete:40001",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 59,
"optime" : {
"t" : 1317161329000,
"i" : 1
},
"optimeDate" : ISODate("2011-09-27T22:08:49Z"),
"lastHeartbeat" : ISODate("2011-09-27T22:09:03Z"),
"pingMs" : 0
},
{
"_id" : 2,
Search WWH ::




Custom Search