How to see oplog in standalone MongoDB -


i want see oplog have started mongodb suggested in here

mongod --master --port 8888 --dbpath ... 

but when run

>db.oplog.rs.find() 

it returns nothing

when run

>db.oplog.rs.stats() 

returns error

{ "ok" : 0, "errmsg" : "ns not found" } 

i have tried these commands '>use local'. see same results.i planning read using java oplog watcher api. not able it. missing.how see oplog.

ok isn't replica set when use --master deprecated master-slave replication got me thinking maybe different name:

> show collections oplog.$main startup_log > db.oplog.$main.find() { "ts" : timestamp(1394104629, 1), "op" : "n", "ns" : "", "o" : {  } } { "ts" : timestamp(1394104643, 1), "op" : "n", "ns" : "", "o" : {  } } { "ts" : timestamp(1394104653, 1), "op" : "n", "ns" : "", "o" : {  } } { "ts" : timestamp(1394104663, 1), "op" : "n", "ns" : "", "o" : {  } } { "ts" : timestamp(1394104673, 1), "op" : "n", "ns" : "", "o" : {  } } { "ts" : timestamp(1394104683, 1), "op" : "n", "ns" : "", "o" : {  } } { "ts" : timestamp(1394104693, 1), "op" : "n", "ns" : "", "o" : {  } } 

turns out right.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -