정의
호환성
이 명령은 다음 환경에서 호스팅되는 배포에서 사용할 수 있습니다.
- MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud
중요
This command is not supported in M0 and Flex clusters. For more information, see Unsupported Commands.
MongoDB Enterprise: MongoDB의 구독 기반 자체 관리 버전
MongoDB Community: MongoDB의 소스 사용 가능 무료 자체 관리 버전
구문
db.adminCommand( { hostInfo: 1 } )
출력
In mongosh you can use db.hostInfo() as a helper to access hostInfo. The output of hostInfo on a Linux system will resemble the following:
{ "system" : { "currentTime" : ISODate("<timestamp>"), "hostname" : "<hostname>", "cpuAddrSize" : <number>, "memSizeMB" : <number>, "memLimitMB" : <number>, "numCores" : <number>, "numCoresAvailableToProcess" : <number>, "cpuArch" : "<identifier>", "numaEnabled" : <boolean> }, "os" : { "type" : "<string>", "name" : "<string>", "version" : "<string>" }, "extra" : { "versionString" : "<string>", "libcVersion" : "<string>", "kernelVersion" : "<string>", "cpuFrequencyMHz" : "<string>", "cpuFeatures" : "<string>", "pageSize" : <number>, "numPages" : <number>, "maxOpenFiles" : <number> }, "ok" : <return> }
출력 필드
hostInfoThe document returned by the
hostInfo.
hostInfo.system.memLimitMB메가바이트 단위의 메모리 사용량 제한입니다.
예를 들어 컨테이너에서 실행하면 전체 시스템 메모리보다 낮은 메모리 제한이 적용될 수 있습니다. 이 메모리 제한은 전체 시스템 메모리 대신 WiredTiger 내부 캐시를 계산하는 데 사용할 수 있는 최대 RAM으로 사용됩니다.
hostInfo.system.numCoresAvailableToProcess프로세스 에서 사용할 수 있는 CPU 코어 수입니다. 코어 수를 조회 위한 기본 시스템 호출이 실패하면
-1를 반환합니다.
hostInfo.extraAn embedded document with extra information about the operating system and the underlying hardware. The content of the
extraembedded document depends on the operating system.
hostInfo.extra.cpuString사람이 읽을 수 있는 시스템 프로세서 설명이 포함된 문자열입니다.
cpuStringmacOS 시스템에만 표시됩니다.
hostInfo.extra.versionString운영 체제 버전 및 ID의 전체 문자열입니다. Linux 및 macOS 시스템에서는
uname -a와(과) 유사한 출력이 포함됩니다.
hostInfo.extra.libcVersion시스템
libc의 릴리스입니다.libcVersionLinux 시스템에만 표시됩니다.
hostInfo.extra.kernelVersion현재 사용 중인 Linux 커널의 릴리스입니다.
kernelVersionLinux 시스템에만 표시됩니다.
hostInfo.extra.alwaysFullSyncalwaysFullSyncmacOS 시스템에만 표시됩니다.
hostInfo.extra.nfsAsyncnfsAsyncmacOS 시스템에만 표시됩니다.
hostInfo.extra.cpuFeatures프로세서 기능 플래그를 보고합니다. Linux 시스템에서는
/proc/cpuinfo이(가)flags필드에 포함하는 것과 동일한 정보입니다.
hostInfo.extra.physicalCores시스템에서 사용 가능한 물리적(하이퍼스레딩이 아닌) 코어 수를 보고합니다.
physicalCoresmacOS 시스템에만 표시됩니다.
hostInfo.extra.numPagesnumPagesLinux 시스템에만 표시됩니다.
hostInfo.extra.maxOpenFiles열린 파일 핸들에 대한 현재 시스템 제한을 보고합니다. 자세한 내용은 자체 관리형 배포서버를 위한 UNIX ulimit 설정을 참조하세요.
maxOpenFilesLinux 시스템에만 표시됩니다.
hostInfo.extra.schedulerReports the active I/O scheduler.
scheduleronly appears on OS X systems.