MongoDB
 Computer >> コンピューター >  >> プログラミング >> MongoDB

MongoDBの現在の構成を確認するにはどうすればよいですか?


MongoDBの現在の構成を確認するには、getCmdLineOptsを使用できます。クエリは次のとおりです-

> db._adminCommand({getCmdLineOpts:1}); 

以下は出力です-

 {"argv":["mongod"]、 "parsed":{}、 "ok":1} 

ライブ設定を確認するには、以下のクエリを使用できます-

> db._adminCommand({getParameter: "*"}); 

以下は出力&マイナス

です
 {"AsyncRequestsSenderUseBaton":true、 "KeysRotationIntervalSec":7776000、 "ShardingTaskExecutorPoolHostTimeoutMS":300000、 "ShardingTaskExecutorPoolMaxConnecting":2、 "ShardingTaskExecutorPoolMaxSize":-1、 "ShardingTaskExecutorPoolMaxSize":-1、 "ShardingTaskExecutorPool :20000、 "TransactionRecordMinimumLifetimeMinutes":30、 "adaptiveServiceExecutorIdlePctThreshold":60、 "adaptiveServiceExecutorMaxQueueLatencyMicros":500、 "adaptiveServiceExecutorRecursionLimit":8、 "adaptiveServiceExecutorReservedThreads":-1、 "adaptiveServiceExecutorReservedThreads":-1、 "adaptiveServiceExecutorReservedThreads" 250、 "allowSecondaryReadsDuringBatchApplication":true、 "authSchemaVersion":5、 "authenticationMechanisms":["MONGODB-X509"、 "SCRAM-SHA-1"、 "SCRAM-SHA-256"]、 "bgSyncOplogFetcherBatc hSize ":13981010、" clientCursorMonitorFrequencySecs ":4、" cloudFreeMonitoringEndpointURL ":" https://cloud.mongodb.com/freemonitoring/mongo "、" clusterAuthMode ":" undefined "、" collectionClonerBatchSize ":-1、" connPoolMaxConnsPerHost ": 200、 "connPoolMaxInUseConnsPerHost":2147483647、 "connPoolMaxShardedConnsPerHost":200、 "connPoolMaxShardedInUseConnsPerHost":2147483647、 "createRollbackDataFiles":true、 "createTimestampSafeUniqueIndex":false、 "cursorTimeoutMillis":Number :200、 "diagnosticDataCollectionEnabled":true、 "diagnosticDataCollectionFileSizeMB":10、 "diagnosticDataCollectionPeriodMillis":1000、 "diagnosticDataCollectionSamplesPerChunk":300、 "diagnosticDataCollectionSamplesPerInterimUpdate":10、 "disableJavaScriptJIT":true、 "disableLogicalSessionCacheRefresh":false、 "disableNonSSL 、"disabledSecureAllo catorDomains ":[]、" enableElectionHandoff ":true、" enableInMemoryTransactions ":false、" enableLocalhostAuthBypass ":true、" enableTestCommands ":false、" failIndexKeyTooLong ":true、" featureCompatibilityVersion ":{" version ":" 4.0 "}、 "forceRollbackViaRefetch":false、 "globalConnPoolIdleTimeoutMinutes":2147483647、 "initialSyncOplogBu​​ffer": "collection"、 "initialSyncOplogBu​​fferPeekCacheSize":10000、 "initialSyncOplogFetcherBatchSize":MaxNternal:Max "internalGeoPredicateQuery2DMaxCoveringCells":16、 "internalInsertMaxBatchSize":64、 "internalProhibitShardOperationRetry":false、 "internalQueryAlwaysMergeOnPrimaryShard":false、 "internalQueryCacheEvictionRatio":10、 "internalQueryCacheFeedbacksStored":20、 "internalQueryCacheFeedbacksStored" IntersectPerAnd ":3、" internalQueryEnumerationMaxOrSolutions ":10、" internalQueryExecMaxBlockingSortBytes ":33554432、" internalQueryExecYieldIterations ":128、" internalQueryExecYieldPeriodMS ":10、" internalQueryFacetBufferSizeBytes ":104857600、" internalQueryFacetBufferSizeBytes ":104857600、" internalQueryFacetBufferSizeBytes ":104857600 :200、 "internalQueryPlanEvaluationCollFraction":0.3、 "internalQueryPlanEvaluationMaxResults":101、 "internalQueryPlanEvaluationWorks":10000、 "internalQueryPlanOrChildrenIndependently":true、 "internalQueryPlannerEnableHashIntersection":false、 "internalQueryPlannerEnableIndexIntersection":false、 "internalQueryPlannerEnableIndexIntersection":true、 "internalQueryPlannerEnableIndexIntersection":true、 "internalQueryPlannerEnableIndexIntersection":true 、"internalQueryProhibitBlockingMergeOnMongoS":false、 "internalQueryProhibitMergingOnMongoS":false、 "internalQueryS2GeoCoarsestLevel":0、 "internalQueryS2 GeoFinestLevel ":23、" internalQueryS2GeoMaxCells ":20、" internalValidateFeaturesAsMaster ":true、" javascriptProtection ":false、" journalCommitInterval ":0、" jsHeapLimitMB ":1100、" localLogicalSessionTimeoutMinutes ":30、" logComponentVerbosity ":{" verbosity ": 0、 "accessControl":{"verbosity":-1}、 "command":{"verbosity":-1}、 "control":{"verbosity":-1}、 "executor":{"verbosity": -1}、 "geo":{"verbosity":-1}、 "index":{"verbosity":-1}、 "network":{"verbosity":-1、 "asio":{"verbosity" :-1}、 "bridge":{"verbosity":-1}}、 "query":{"verbosity":-1}、 "replication":{"verbosity":-1、 "heartbeats":{" verbosity ":-1}、" rollback ":{" verbosity ":-1}}、" sharding ":{" verbosity ":-1、" shard ingCatalogRefresh ":{" verbosity ":-1}}、" storage ":{" verbosity ":-1、" restorey ":{" verbosity ":-1}、" journal ":{" verbosity ":-1} }、 "write":{"verbosity":-1}、 "ftdc":{"verbosity":-1}、 "tracking":{"verbosity":-1}、 "transaction":{"verbosity": -1}}、 "logLevel":0、 "logicalSessionRefreshMillis":300000、 "maxAcceptableLogicalClockDriftSecs":NumberLong(31536000)、 "maxBSONDepth":200、 "maxIndexBuildMemoryUsageMegabytes":500、 "maxLogSizeKB":10、 "maxNumInitialSyncCollectionClon "maxSessions":1000000、 "maxSyncSourceLagSecs":30、 "maxTransactionLockRequestTimeoutMillis":5、 "migrateCloneInsertionBatchDelayMS":0、 "migrateCloneInsertionBatchSize":0、 "newCollectionsUsePowerOf2Sizes":true、 "notablescan":false、 "numInitialSyncAttempts" ":3、" numIn itialSyncCollectionFindAttempts ":3、" numInitialSyncConnectAttempts ":10、" numInitialSyncListCollectionsAttempts ":3、" numInitialSyncListDatabasesAttempts ":3、" numInitialSyncListIndexesAttempts ":3、" numInitialSyncOplogFindAttempts ":3、" numInitialSyncOplogFindAttempts ":3、" opensslCipherConfig ":" oplogFetcherInitialSyncMaxFetcherRestarts ":10、" oplogFetcherSteadyStateMaxFetcherRestarts ":1、" oplogInitialFindMaxSeconds ":60、" oplogRetriedFindMaxSeconds ":2、" orphanCleanupDelaySecs ":900、" periodicNoopIntervalSecs ":10、" priorityTake :20、 "rangeDeleterBatchSize":0、 "recoverFromOplogAsStandalone":false、 "replBatchLimitOperations":5000、 "replElectionTimeoutOffsetLimitFraction":0.15、 "replIndexPrefetch": "uninitialized"、 "replWriterThreadCount":16、 "reservedServiceExecutorRecursionLimit":8、 "reservedServiceExecutorRecursionLimit" :2000、 "rollbackTimeLimitSecs":86400、 "saslHostName": "DESKTOP-QN2RB3H"、 "saslServiceName": "mongodb"、 "saslauthdPath": ""、 "scramIterationCount":10000、 "scramSHA256IterationCount":15000、 "scriptingEngineInterruptIntervalMS":1000、 " shardedConnPoolIdleTimeoutMinutes ":2147483647、" skipCorruptDocumentsWhenCloning ":false、" skipShardingConfigurationChecks ":false、" sslMode ":" disable "、" sslWithholdClientCertificate ":false、" startupAuthSchemaValidation ":true、" SupplementNoTLSPeer SynchronousServiceExecutorRecursionLimit ":8、" taskExecutorPoolSize ":1、" tcmallocAggressiveMemoryDe​​commit ":0"、 "tcmallocEnableMarkThreadTemporarilyIdle":false、 "tcmallocMaxTotalThreadCacheBytes":NumberLong(1073741824)、 "testingSnapshotBehaviorInIsolation":false "transactionLifetimeLimitSeconds":60、 "ttlMonitorEnabled":true、 "t tlMonitorSleepSecs ":60、" waitForSecondaryBeforeNoopWriteMS ":10、" wiredTigerConcurrentReadTransactions ":128、" wiredTigerConcurrentWriteTransactions ":128、" wiredTigerCursorCacheSize ":-100、" wiredTigerEngineRuntimeConfig ":" "、" writePeriodicNoops ":true、" ok " / pre> 
  1. C#でスレッドの現在の状態を確認するにはどうすればよいですか?

    スレッドの現在の状態を確認するためのコードは、次のとおりです- 例 using System; using System.Threading; public class Demo {    public static void Main(){       Thread thread = new Thread(new ThreadStart(demo1));       ThreadPool.QueueUserWorkItem(new WaitCallback(demo2));      

  2. 文字列に10進文字のみが含まれているかどうかを確認するにはどうすればよいですか?

    Stringクラスにはisdigit()というメソッドがあり、文字列内のすべての文字が数字であり、少なくとも1つの文字がある場合はtrueを返し、それ以外の場合はfalseを返します。次のように呼び出すことができます: >>> "12345".isdigit() True >>> "12345a".isdigit() False しかし、これは浮動小数点数では失敗します。これらの番号には、次の方法を使用できます。 def isfloat(value):   try:     float(