Пример #1
0
 void printMongoStatHelp(const moe::OptionSection options, std::ostream* out) {
     *out << "View live MongoDB performance statistics.\n" << std::endl;
     *out << "usage: mongostat [options] [sleep time]" << std::endl;
     *out << "sleep time: time to wait (in seconds) between calls" << std::endl;
     *out << options.helpString();
     *out << "\n";
     *out << " Fields\n";
     *out << "   inserts  \t- # of inserts per second (* means replicated op)\n";
     *out << "   query    \t- # of queries per second\n";
     *out << "   update   \t- # of updates per second\n";
     *out << "   delete   \t- # of deletes per second\n";
     *out << "   getmore  \t- # of get mores (cursor batch) per second\n";
     *out << "   command  \t- # of commands per second, on a slave its local|replicated\n";
     *out << "   flushes  \t- # of fsync flushes per second\n";
     *out << "   mapped   \t- amount of data mmaped (total data size) megabytes\n";
     *out << "   vsize    \t- virtual size of process in megabytes\n";
     *out << "   res      \t- resident size of process in megabytes\n";
     *out << "   faults   \t- # of pages faults per sec\n";
     *out << "   locked   \t- name of and percent time for most locked database\n";
     *out << "   idx miss \t- percent of btree page misses (sampled)\n";
     *out << "   qr|qw    \t- queue lengths for clients waiting (read|write)\n";
     *out << "   ar|aw    \t- active clients (read|write)\n";
     *out << "   netIn    \t- network traffic in - bytes\n";
     *out << "   netOut   \t- network traffic out - bytes\n";
     *out << "   conn     \t- number of open connections\n";
     *out << "   set      \t- replica set name\n";
     *out << "   repl     \t- replication type \n";
     *out << "            \t    PRI - primary (master)\n";
     *out << "            \t    SEC - secondary\n";
     *out << "            \t    REC - recovering\n";
     *out << "            \t    UNK - unknown\n";
     *out << "            \t    SLV - slave\n";
     *out << "            \t    RTR - mongos process (\"router\")\n";
     *out << std::flush;
 }
Пример #2
0
 void printMongoRestoreHelp(const moe::OptionSection options, std::ostream* out) {
     *out << "Import BSON files into MongoDB.\n" << std::endl;
     *out << "usage: mongorestore [options] [directory or filename to restore from]"
          << std::endl;
     *out << options.helpString();
     *out << std::flush;
 }
Пример #3
0
 void printMongoImportHelp(const moe::OptionSection options, std::ostream* out) {
     *out << "Import CSV, TSV or JSON data into MongoDB.\n" << std::endl;
     *out << "When importing JSON documents, each document must be a separate line of the input file.\n";
     *out << "\nExample:\n";
     *out << "  mongoimport --host myhost --db my_cms --collection docs < mydocfile.json\n" << std::endl;
     *out << options.helpString();
     *out << std::flush;
 }
Пример #4
0
std::string getMongoShellHelp(StringData name, const moe::OptionSection& options) {
    StringBuilder sb;
    sb << "usage: " << name << " [options] [db address] [file names (ending in .js)]\n"
       << "db address can be:\n"
       << "  foo                   foo database on local machine\n"
       << "  192.168.0.5/foo       foo database on 192.168.0.5 machine\n"
       << "  192.168.0.5:9999/foo  foo database on 192.168.0.5 machine on port 9999\n"
       << options.helpString() << "\n"
       << "file names: a list of files to run. files have to end in .js and will exit after "
       << "unless --shell is specified";
    return sb.str();
}
Пример #5
0
 void printMongoFilesHelp(const moe::OptionSection options, std::ostream* out) {
     *out << "Browse and modify a GridFS filesystem.\n" << std::endl;
     *out << "usage: mongofiles [options] command [gridfs filename]" << std::endl;
     *out << "command:" << std::endl;
     *out << "  one of (list|search|put|get)" << std::endl;
     *out << "  list - list all files.  'gridfs filename' is an optional prefix " << std::endl;
     *out << "         which listed filenames must begin with." << std::endl;
     *out << "  search - search all files. 'gridfs filename' is a substring " << std::endl;
     *out << "           which listed filenames must contain." << std::endl;
     *out << "  put - add a file with filename 'gridfs filename'" << std::endl;
     *out << "  get - get a file with filename 'gridfs filename'" << std::endl;
     *out << "  delete - delete all files with filename 'gridfs filename'" << std::endl;
     *out << options.helpString();
     *out << std::flush;
 }
Пример #6
0
void printMongodHelp(const moe::OptionSection& options) {
    std::cout << options.helpString() << std::endl;
};
Пример #7
0
 void printMongoExportHelp(const moe::OptionSection options, std::ostream* out) {
     *out << "Export MongoDB data to CSV, TSV or JSON files.\n" << std::endl;
     *out << options.helpString();
     *out << std::flush;
 }
Пример #8
0
 std::string getTestFrameworkHelp(const StringData& name, const moe::OptionSection& options) {
     StringBuilder sb;
     sb << "usage: " << name << " [options] [suite]...\n"
         << options.helpString() << "suite: run the specified test suite(s) only\n";
     return sb.str();
 }
Пример #9
0
 void printMongoOplogHelp(const moe::OptionSection options, std::ostream* out) {
     *out << "Pull and replay a remote MongoDB oplog.\n" << std::endl;
     *out << options.helpString();
     *out << std::flush;
 }
Пример #10
0
 void printBSONDumpHelp(const moe::OptionSection options, std::ostream* out) {
     *out << "Display BSON objects in a data file.\n" << std::endl;
     *out << "usage: bsondump [options] <bson filename>" << std::endl;
     *out << options.helpString();
     *out << std::flush;
 }