clientstats — 연결된 클라이언트 정보 출력

clientstats — 연결된 클라이언트 정보 출력

nodetool clientstats 명령은 현재 노드에 연결된 클라이언트들에 대한 정보를 출력하는 명령이에요. 모든 연결을 보거나, 프로토콜 버전별·클라이언트 옵션별로 나눠 볼 수 있어요.

출처: nodetool clientstats

본문

clientstats는 누가 노드에 붙어 있는지 점검할 때 유용해요. 기본 출력 외에 --all(모든 연결), --by-protocol(프로토콜 버전별 최근 연결), --client-options(연결과 클라이언트 옵션), --clear-history(연결 이력 초기화) 옵션을 지원해요. 아래는 완전한 사용법이에요.

NAME
        nodetool clientstats - Print information about connected clients

SYNOPSIS
        nodetool [(-h <host> | --host <host>)] [(-p <port> | --port <port>)]
                [(-pp | --print-port)] [(-pw <password> | --password <password>)]
                [(-pwf <passwordFilePath> | --password-file <passwordFilePath>)]
                [(-u <username> | --username <username>)] clientstats [--all]
                [--by-protocol] [--clear-history] [--client-options]

OPTIONS
        --all
            Lists all connections

        --by-protocol
            Lists most recent client connections by protocol version

        --clear-history
            Clear the history of connected clients

        --client-options
            Lists all connections and the client options

        -h <host>, --host <host>
            Node hostname or ip address

        -p <port>, --port <port>
            Remote jmx agent port number

        -pp, --print-port
            Operate in 4.0 mode with hosts disambiguated by port number

        -pw <password>, --password <password>
            Remote jmx agent password

        -pwf <passwordFilePath>, --password-file <passwordFilePath>
            Path to the JMX password file

        -u <username>, --username <username>
            Remote jmx agent username

연결된 클라이언트의 수가 많아지는 환경에서는 어느 클라이언트가 어떤 프로토콜 버전으로 접속 중인지 파악하는 게 중요해요. --by-protocol로 구버전 드라이버가 아직 붙어 있는지 확인하는 식으로 이전 버전 지원이 필요한지 판단할 수 있어요.

더 알아보기 (Learn more)