"total" : NumberLong(1)
}
},
"document" : {
"deleted" : NumberLong(0),
"inserted" : NumberLong(1),
"returned" : NumberLong(48),
"updated" : NumberLong(0)
},
"getLastError" : {
"wtime" : {
"num" : 0,
"totalMillis" : 0
},
"wtimeouts" : NumberLong(0)
},
"operation" : {
"fastmod" : NumberLong(0),
"idhack" : NumberLong(0),
"scanAndOrder" : NumberLong(0),
"writeConflicts" : NumberLong(0)
},
"queryExecutor" : {
"scanned" : NumberLong(3),
"scannedObjects" : NumberLong(48)
},
"record" : {
"moves" : NumberLong(0)
},
"repl" : {
"apply" : {
"batches" : {
"num" : 7,
"totalMillis" : 309
},
"ops" : NumberLong(5)
},
"buffer" : {
"count" : NumberLong(0),
"maxSizeBytes" : 268435456,
"sizeBytes" : NumberLong(0)
},
"network" : {
"bytes" : NumberLong(7799),
"getmores" : {
"num" : 201,
"totalMillis" : 1021022
},
"ops" : NumberLong(7),
"readersCreated" : NumberLong(1)
},
"preload" : {
"docs" : {
"num" : 0,
"totalMillis" : 0
},
"indexes" : {
"num" : 3,
"totalMillis" : 0
}
}
},
"storage" : {
"freelist" : {
"search" : {
"bucketExhausted" : NumberLong(0),
"requests" : NumberLong(48),
"scanned" : NumberLong(0)
}
}
},
"ttl" : {
"deletedDocuments" : NumberLong(0),
"passes" : NumberLong(2817)
}
},
"ok" : 1
}
wind:PRIMARY>
-------9.查看复制状态
wind:PRIMARY> rs.status();
{
"set" : "wind",
"date" : ISODate("2015-08-06T06:16:30.954Z"),
"myState" : 1,
"members" : [
{
"_id" : 1,
"name" : "192.168.50.120:27017",
"health" : 1, #1表示正常,0表示异常
"state" : 1, #1表示primary ;2表明是secondary
"stateStr" : "PRIMARY", #角色是主库
"uptime" : 169800, #启动时间
"optime" : Timestamp(1438835748, 1),
"optimeDate" : ISODate("2015-08-06T04:35:48Z"),
"electionTime" : Timestamp(1438674821, 1),
"electionDate" : ISODate("2015-08-04T07:53:41Z"),
"configVersion" : 3,
"self" : true
},
{
"_id" : 2,
"name" : "192.168.50.130:27017",
"health" : 1, #1表示正常,0表示异常
"state" : 2, #1表示primary ;2表明是secondary
"stateStr" : "SECONDARY",
"uptime" : 164401,
"optime" : Timestamp(1438835748, 1),
"optimeDate" : ISODate("2015-08-06T04:35:48Z"),
"lastHeartbeat" : ISODate("2015-08-06T06:16:30.604Z"),
"lastHeartbeatRecv" : ISODate("2015-08-06T06:16:30.604Z"),
"pingMs" : 1,
"syncingTo" : "192.168.50.110:27017",
"configVersion" : 3
},
{
"_id" : 3,
"name" : "192.168.50.110:27017",
"health" : 1, #1表示正常,0表示异常
"state" : 2, #1表示primary ;2表明是secondary
"stateStr" : "SECONDARY",
"uptime" : 168113,
"optime" : Timestamp(1438835748, 1),
"optimeDate" : ISODate("2015-08-06T04:35:48Z"),
"lastHeartbeat" : ISODate("2015-08-06T06:16:30.581Z"),
"lastHeartbeatRecv" : ISODate("2015-08-06T06:16:30.581Z"),
"pingMs" : 1,
"syncingTo" : "192.168.50.120:27017",
"configVersion" : 3
}
],
"ok" : 1
}
wind:PRIMARY>
|