如何在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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 如何在vsCode中檢視git historyVSCodeGit
- 如何在 Linux 中檢視可用的網路介面Linux
- Linux 中檢視 DNS 與 配置LinuxDNS
- 如何在Linux中檢視所有正在執行的程式Linux
- 如何在cmd命令列中檢視、修改、刪除與新增環境變數命令列變數
- 檢視JVM預設配置引數JVM
- 常用的jvm配置引數 :永久區引數配置JVM
- jmeter 如何在請求之前修改 post body 裡面的引數的值JMeter
- 如何在Macbook中檢視並刪除最近下載的檔案?Mac
- c# 方法引數_值引數C#
- Linux核心引數(如kernel.shmmax)及Oracle相關引數調整(如SGA_MAX_SIZE)LinuxHMMOracle
- win10怎樣檢視電腦配置引數_win10電腦配置引數檢視教程Win10
- 如何在 Mac 上的排程中心中檢視開啟的視窗和空間?Mac
- 在linux中檢視cpu個數方法Linux
- Windows如何在cmd命令列中檢視、修改、刪除與新增、設定環境變數Windows命令列變數
- C#中的值引數,引用引數及輸出引數C#
- 如何在MySQL中檢視binlog二進位制日誌?MySql
- Java基礎:如何在IDEA中檢視依賴關係JavaIdea
- Spingboot 讀取 yml 配置檔案裡的引數值boot
- 如何在 Linux 中檢視已掛載的檔案系統型別Linux型別
- 華納雲:如何在CentOS中檢視當前系統的負載情況CentOS負載
- 如何在 Ubuntu 中檢查你的 IP 地址Ubuntu
- 如何在 Antergos 與 Arch Linux 中檢視印度語和梵文?GoLinux
- matlab之在workspace中檢視子程式變數Matlab變數
- 數值型模板引數的應用
- C#引數傳遞之值引數C#
- Linux核心引數(如kernel.shmmax)及Oracle相關引數調整LinuxHMMOracle
- 如何在Pi-Hole Query Log中檢視全部的url,答案是不可能的。
- Centos中檢視nginx、apache、php、mysql配置檔案路徑CentOSNginxApachePHPMySql
- ajax傳遞的引數值包含單引號
- jvm引數配置JVM
- oracle引數配置Oracle
- JavaWeb引數配置JavaWeb
- 【C++】引數的預設值C++
- 形似賦值語句的引數賦值
- js根據引數名獲取url上的引數值JS
- 將所配置的初始化引數重置為系統預設值
- 引數傳值機制