> version() 2.6.7 dev-be-mongo-01(mongod-2.4.12)[PRIMARY] admin: > db.listCommands function (){ var x = this.runCommand( "listCommands" ); for ( var name in x.commands ){ var c = x.commands[name]; var s = name + ": "; if (c.adminOnly) s += " adminOnly "; if (c.adminOnly) s += " slaveOk "; // BUG here: should be checking c.slaveOk instead! s += "\n "; s += c.help.replace(/\n/g, '\n '); s += "\n"; print( s ); } }