Options:General options: -h [ --help ] show this usage information//显示使用信息
Options:General options: -h [ --help ] show this usage information//显示使用信息 --version show version information//显示版本信息 -f [ --config ] arg configuration file specifying //包含额外选项的配置文件 additional options -v [ --verbose ] [=arg(=v)] be more verbose (include multiple times for more verbosity e.g. -vvvvv)//显示更详细的输出 --quiet quieter output//静默输出模式 --port arg specify port number - 27017 by default//指定端口--默认27017 --bind_ip arg comma separated list of ip addresses to listen on - all local ips by default//监听IP地址,使用都好分开 --ipv6 enable IPv6 support (disabled by default)启用IPv6 --maxConns arg max number of simultaneous connections - 1000000 by default同时最大连接数,默认百万 --logpath arg log file to send write to instead of stdout - has to be a file, not directory//输出文件位置,必须为文件 --syslog log to system's syslog facility instead of file or stdout//输出倒syslog --syslogFacility arg syslog facility used for mongodb syslog message//syslog的Facility级别 --logappend append to logpath instead of over-writing//追加模式,而不是覆盖模式 --logRotate arg set the log rotation behavior (rename|reopen)//日志循环模式,重命名重新打开 --timeStampFormat arg Desired format for timestamps in log messages. One of ctime, iso8601-utc or iso8601-local//时间戳格式 --pidfilepath arg full path to pidfile (if not set, no pidfile is created)//pid文件,不指定不创建。 --keyFile arg private key for cluster authentication//集群认证的key文件 --noauth run without security//无认证模式运行 --setParameter arg Set a configurable parameter//设定可配置的参数 --httpinterface enable http interface//启用http接口 --clusterAuthMode arg Authentication mode used for cluster authentication. Alternatives are (keyFile|sendKeyFile|sendX509|x509)//集群认证模式,可选有(keyfile,sendKeyFile,sendX509,x509) --nounixsocket disable listening on unix sockets禁止unixsockets监听 --unixSocketPrefix arg alternative directory for UNIX domain unixdomainsockets路径 sockets (defaults to /tmp) --filePermissions arg permissions to set on UNIX domain socket file - 0700 by default//文件权限 --fork fork server process//fork后台运行 --auth run with security//使用认证模式 --jsonp allow JSONP access via http (has security implications)//允许通过http使用JSONP访问 --rest turn on simple rest api启用rest api --slowms arg (=100) value of slow for profile and console log慢日志 --profile arg 0=off 1=slow, 2=all --cpu periodically show cpu and iowait utilization//周期性现实cpu和iowait使用情况 --sysinfo print some diagnostic system information --noIndexBuildRetry don't retry any index builds that were interrupted by shutdown --noscripting disable scripting engine//禁用脚本引擎 --notablescan do not allow table scans//不允许表扫描Replication options: --oplogSize arg size to use (in MB) for replication op log. default is 5% of disk space (i.e. large is good)Master/slave options (old; use replica sets instead): --master master mode --slave slave mode --source arg when slave: specify master as <server:port> --only arg when slave: specify a single database to replicate --slavedelay arg specify delay (in seconds) to be used when applying master ops to slave --autoresync automatically resync if slave data is staleReplica set options: --replSet arg arg is <setname>[/<optionalseedhostlist >] --replIndexPrefetch arg specify index prefetching behavior (if secondary) [none|_id_only|all] --enableMajorityReadConcern enables majority readConcernSharding options: --configsvr declare this is a config db of a cluster; default port 27019; default dir /data/configdb --configsvrMode arg Controls what config server protocol is in use. When set to "sccc" keeps server in legacy SyncClusterConnection mode even when the service is running as a replSet --shardsvr declare this is a shard db of a cluster; default port 27018Storage options://存储选项 --storageEngine arg what storage engine to use - defaults to wiredTiger if no data files present//使用的存储运行,默认为wiredTiger --dbpath arg directory for datafiles - defaults to /data/db//数据文件路径,默认/data/db --directoryperdb each database will be stored in a separate directory//每个数据库一个文件夹 --noprealloc disable data file preallocation - will often hurt performance//禁止数据文件预分配--总会降低性能 --nssize arg (=16) .ns file size (in MB) for new databases//新数据库的ns文件大小MB --quota limits each database to a certain number of files (8 default)//每个数据库特定文件数量,默认为8 --quotaFiles arg number of files allowed per db, implies --quota//每个db允许的文件数/ --smallfiles use a smaller default file size//使用更小的默认文件数量 --syncdelay arg (=60) seconds between disk syncs (0=never, but not recommended)//磁盘同步时间间隔 --upgrade upgrade db if needed//必要时升级db --repair run repair on all dbs//所有db上进行修复 --repairpath arg root directory for repair files - defaults to dbpath//修复文件的根目录 --journal enable journaling//启用journaling --nojournal disable journaling (journaling is on by default for 64 bit)//禁用 --journalOptions arg journal diagnostic options//日志诊断选项 --journalCommitInterval arg how often to group/batch commit (ms)WiredTiger options://存储引擎WiredTiger选项 --wiredTigerCacheSizeGB arg maximum amount of memory to allocate for cache; defaults to 1/2 of physical RAM//内存分配cache的最大数量,默认为无力内存一半。 --wiredTigerStatisticsLogDelaySecs arg (=0) seconds to wait between each write to a statistics file in the dbpath; 0 means do not log statistics// --wiredTigerJournalCompressor arg (=snappy) use a compressor for log records [none|snappy|zlib]//日志记录压缩 --wiredTigerDirectoryForIndexes Put indexes and data in different directories//将索引和数据放在不同的目录 --wiredTigerCollectionBlockCompressor arg (=snappy)//块压缩算法 block compression algorithm for collection data [none|snappy|zlib] --wiredTigerIndexPrefixCompression arg (=1)// use prefix compression on row-store leaf pages