[root@localhost bin]# ./mongo --port 28011 MongoDB shell version: 1.8.1 connecting to: 127.0.0.1:28011/test rs1:SECONDARY> rs.status() { "set" : "rs1", "date" : ISODate("2012-05-31T14:17:03Z"), "myState" : 2, "members" : [ { "_id" : 0, "name" : "localhost:28010", "health" : 0, "state" : 1, "stateStr" : "(not reachable/healthy)", "uptime" : 0, "optime" : { "t" : 1338472279000, "i" : 1 }, "optimeDate" : ISODate("2012-05-31T13:51:19Z"), "lastHeartbeat" : ISODate("2012-05-31T14:16:42Z"), "errmsg" : "socket exception" }, { "_id" : 1, "name" : "localhost:28011", "health" : 1, "state" : 2, "stateStr" : "SECONDARY", "optime" : { "t" : 1338472279000, "i" : 1 }, "optimeDate" : ISODate("2012-05-31T13:51:19Z"), "self" : true }, { "_id" : 2, "name" : "localhost:28012", "health" : 1, "state" : 1, "stateStr" : "PRIMARY", "uptime" : 1528, "optime" : { "t" : 1338472279000, "i" : 1 }, "optimeDate" : ISODate("2012-05-31T13:51:19Z"), "lastHeartbeat" : ISODate("2012-05-31T14:17:02Z") } ], "ok" : 1 } rs1:SECONDARY> |