如何在MonogoDB中檢視配置的引數值
怎樣在MongoDB實現mysql show variables like 'xx';
例如:
1.檢視所有引數值:
C:\Users\duansf>mongo
MongoDB shell version: 2.6.6
connecting to: test
> use admin
switched to db admin
> db.adminCommand({getParameter:"*"})
{
"journalCommitInterval" : 0,
"traceExceptions" : false,
"replMonitorMaxFailedChecks" : 30,
"_forceLegacyShardWriteMode" : false,
"authSchemaVersion" : 3,
"clusterAuthMode" : "undefined",
"connPoolMaxConnsPerHost" : 200,
"connPoolMaxShardedConnsPerHost" : 200,
"enableLocalhostAuthBypass" : true,
"enableTestCommands" : 0,
"failIndexKeyTooLong" : true,
"internalQueryCacheFeedbacksStored" : 20,
"internalQueryCacheSize" : 5000,
"internalQueryCacheStdDeviations" : 2,
"internalQueryCacheWriteOpsBetweenFlush" : 1000,
"internalQueryEnumerationMaxIntersectPerAnd" : 3,
"internalQueryEnumerationMaxOrSolutions" : 10,
"internalQueryForceIntersectionPlans" : false,
"internalQueryMaxScansToExplode" : 200,
"internalQueryPlanEvaluationCollFraction" : 0.3,
"internalQueryPlanEvaluationMaxResults" : 101,
"internalQueryPlanEvaluationWorks" : 10000,
"internalQueryPlanOrChildrenIndependently" : true,
"internalQueryPlannerEnableHashIntersection" : false,
"internalQueryPlannerEnableIndexIntersection" : true,
"internalQueryPlannerMaxIndexedSolutions" : 64,
"internalSCCAllowFastestAuthConfigReads" : false,
"internalSCCAllowFastestMetadataConfigReads" : false,
"logLevel" : 0,
"logUserIds" : false,
"maxSyncSourceLagSecs" : 30,
"newCollectionsUsePowerOf2Sizes" : true,
"notablescan" : false,
"queueForMigrationCommit" : true,
"quiet" : false,
"releaseConnectionsAfterResponse" : true,
"replApplyBatchSize" : 1,
"replIndexPrefetch" : "uninitialized",
"skipCorruptDocumentsWhenCloning" : false,
"sslMode" : "disabled",
"supportCompatibilityFormPrivilegeDocuments" : true,
"syncdelay" : 60,
"textSearchEnabled" : true,
"ttlMonitorEnabled" : true,
"verboseQueryLogging" : false,
"ok" : 1
}
>
2.檢視資料檔案和日誌檔案路徑:
> db.runCommand("getCmdLineOpts")
{
"argv" : [
"C:\\Users\\duansf\\Desktop\\mongodb\\mongodb-2.6.6\\bin\\mongod.exe",
"-journal",
"--dbpath",
"d:\\db\\data\\db",
"--logpath",
"d:\\db\\data\\log\\MongoDB.log",
"--logappend",
"--service"
],
"parsed" : {
"service" : true,
"storage" : {
"dbPath" : "d:\\db\\data\\db",
"journal" : {
"enabled" : true
}
},
"systemLog" : {
"destination" : "file",
"logAppend" : true,
"path" : "d:\\db\\data\\log\\MongoDB.log"
}
},
"ok" : 1
}
>
例如:
1.檢視所有引數值:
C:\Users\duansf>mongo
MongoDB shell version: 2.6.6
connecting to: test
> use admin
switched to db admin
> db.adminCommand({getParameter:"*"})
{
"journalCommitInterval" : 0,
"traceExceptions" : false,
"replMonitorMaxFailedChecks" : 30,
"_forceLegacyShardWriteMode" : false,
"authSchemaVersion" : 3,
"clusterAuthMode" : "undefined",
"connPoolMaxConnsPerHost" : 200,
"connPoolMaxShardedConnsPerHost" : 200,
"enableLocalhostAuthBypass" : true,
"enableTestCommands" : 0,
"failIndexKeyTooLong" : true,
"internalQueryCacheFeedbacksStored" : 20,
"internalQueryCacheSize" : 5000,
"internalQueryCacheStdDeviations" : 2,
"internalQueryCacheWriteOpsBetweenFlush" : 1000,
"internalQueryEnumerationMaxIntersectPerAnd" : 3,
"internalQueryEnumerationMaxOrSolutions" : 10,
"internalQueryForceIntersectionPlans" : false,
"internalQueryMaxScansToExplode" : 200,
"internalQueryPlanEvaluationCollFraction" : 0.3,
"internalQueryPlanEvaluationMaxResults" : 101,
"internalQueryPlanEvaluationWorks" : 10000,
"internalQueryPlanOrChildrenIndependently" : true,
"internalQueryPlannerEnableHashIntersection" : false,
"internalQueryPlannerEnableIndexIntersection" : true,
"internalQueryPlannerMaxIndexedSolutions" : 64,
"internalSCCAllowFastestAuthConfigReads" : false,
"internalSCCAllowFastestMetadataConfigReads" : false,
"logLevel" : 0,
"logUserIds" : false,
"maxSyncSourceLagSecs" : 30,
"newCollectionsUsePowerOf2Sizes" : true,
"notablescan" : false,
"queueForMigrationCommit" : true,
"quiet" : false,
"releaseConnectionsAfterResponse" : true,
"replApplyBatchSize" : 1,
"replIndexPrefetch" : "uninitialized",
"skipCorruptDocumentsWhenCloning" : false,
"sslMode" : "disabled",
"supportCompatibilityFormPrivilegeDocuments" : true,
"syncdelay" : 60,
"textSearchEnabled" : true,
"ttlMonitorEnabled" : true,
"verboseQueryLogging" : false,
"ok" : 1
}
>
2.檢視資料檔案和日誌檔案路徑:
> db.runCommand("getCmdLineOpts")
{
"argv" : [
"C:\\Users\\duansf\\Desktop\\mongodb\\mongodb-2.6.6\\bin\\mongod.exe",
"-journal",
"--dbpath",
"d:\\db\\data\\db",
"--logpath",
"d:\\db\\data\\log\\MongoDB.log",
"--logappend",
"--service"
],
"parsed" : {
"service" : true,
"storage" : {
"dbPath" : "d:\\db\\data\\db",
"journal" : {
"enabled" : true
}
},
"systemLog" : {
"destination" : "file",
"logAppend" : true,
"path" : "d:\\db\\data\\log\\MongoDB.log"
}
},
"ok" : 1
}
>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29096438/viewspace-2155756/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 檢視JVM預設配置引數JVM
- win10怎樣檢視電腦配置引數_win10電腦配置引數檢視教程Win10
- 帶引數的檢視
- 2.7.11 檢視引數設定的方法
- 如何在檢視中共享變數變數
- 如何在vsCode中檢視git historyVSCodeGit
- 檢視JVM執行時引數JVM
- 函式中引數傳值函式
- 如何在 Linux 中檢視可用的網路介面Linux
- linux 檢視日誌的命令引數有哪些?Linux
- Spingboot 讀取 yml 配置檔案裡的引數值boot
- 常用的jvm配置引數 :永久區引數配置JVM
- 如何在Linux上檢視和配置密碼時效Linux密碼
- Linux 中檢視 DNS 與 配置LinuxDNS
- jmeter 如何在請求之前修改 post body 裡面的引數的值JMeter
- 檢視JVM預設引數及微調JVM啟動引數JVM
- win10如何檢視電腦配置引數 win10系統配置怎麼看Win10
- es6中的引數預設值
- 用javascript替換URL中的引數值JavaScript
- 如何在Linux中檢視所有正在執行的程式Linux
- CentOS下檢視nginx和php的編譯引數CentOSNginxPHP編譯
- 如何檢視docker run啟動引數命令Docker
- 如何在專案中優雅的校驗引數
- 引數如何在python中明確型別?Python型別
- Django裡URL配置中name引數的作用Django
- DG配置過程中的引數解釋
- 輕鬆整合系列三:如何在 KubeBlocks 中配置引數模板|以 Oracle MySQL 為例BloCOracleMySql
- 引數配置
- sql 儲存過程proc中的引數 是 @details 表值 引數型別的時候,如何如何檢視 自定義表的 表結構和欄位資訊SQL儲存過程AI型別
- note1 : ubuntn 系統引數檢視命令
- 如何檢視Vue CLI中webpack的預設配置VueWeb
- 數值型模板引數的應用
- Kubernetes 中的應用引數配置案例詳析
- v$parameter gv$parameter 檢視 DDL 與隱含引數
- JavaWeb引數配置JavaWeb
- js中 函式引數的 傳值/傳引用 問題JS函式
- [譯] Python 中的鍵值(具名)引數:如何使用它們Python
- 如何在 Fedora 30 中設定核心命令列引數命令列