db.serverBuildInfo() in mongoDB

serverBuildInfo()

This method provides a wrapper around the buildInfo database command. buildInfo returns a document that contains an overview of parameters used to compile this mongod instance.


Syntax:

db.serverBuildInfo()


Example

MongoDB

 db.serverBuildInfo()

Output:

{
        "version" : "5.0.6",
        "gitVersion" : "212a8dbb47f07427dae194a9c75baec1d81d9259",
        "targetMinOS" : "Windows 7/Windows Server 2008 R2",
        "modules" : [ ],
        "allocator" : "tcmalloc",
        "javascriptEngine" : "mozjs",
        "sysInfo" : "deprecated",
        "versionArray" : [
                5,
                0,
                6,
                0
        ],
        "openssl" : {
                "running" : "Windows SChannel"
        },
        "buildEnvironment" : {
                "distmod" : "windows",
                "distarch" : "x86_64",
                "cc" : "cl: Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30139 for x64",
                "ccflags" : "/nologo /WX /FImongo/platform/basic.h /EHsc /W3 /wd4068 /wd4244 /wd4267 /wd4290 /wd4351 /wd4355 /wd4373 /wd4800 /wd4251 /wd4291 /we4013 /we4099 /we4930 /errorReport:none /MD /O2 /Oy- /bigobj /utf-8 /permissive- /Zc:__cplusplus /Zc:sizedDealloc /volatile:iso /diagnostics:caret /std:c++17 /Gw /Gy /Zc:inline",
                "cxx" : "cl: Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30139 for x64",
                "cxxflags" : "/TP",
                "linkflags" : "/nologo /DEBUG /INCREMENTAL:NO /LARGEADDRESSAWARE /OPT:REF",
                "target_arch" : "x86_64",
                "target_os" : "windows",
                "cppdefines" : "SAFEINT_USE_INTRINSICS 0 PCRE_STATIC NDEBUG BOOST_ALL_NO_LIB _UNICODE UNICODE _SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING _SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING _CONSOLE _CRT_SECURE_NO_WARNINGS _SCL_SECURE_NO_WARNINGS _WIN32_WINNT 0x0A00 BOOST_USE_WINAPI_VERSION 0x0A00 NTDDI_VERSION 0x0A000000 BOOST_THREAD_VERSION 5 BOOST_THREAD_USES_DATETIME BOOST_SYSTEM_NO_DEPRECATED BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS BOOST_ENABLE_ASSERT_DEBUG_HANDLER BOOST_LOG_NO_SHORTHAND_NAMES BOOST_LOG_USE_NATIVE_SYSLOG BOOST_LOG_WITHOUT_THREAD_ATTR ABSL_FORCE_ALIGNED_ACCESS"
        },
        "bits" : 64,
        "debug" : false,
        "maxBsonObjectSize" : 16777216,
        "storageEngines" : [
                "devnull",
                "ephemeralForTest",
                "wiredTiger"
        ],
        "ok" : 1
}


No comments:

Post a Comment