개발자 Q&A

개발하다 막혔다면? 여기서 질문하세요! 초보부터 고수까지, 함께 고민하고 해결하는 공간입니다. 누구나 자유롭게 질문하고 답변을 남겨보세요!

2025.06.25 03:15

fpm_get_status 함수 사용에 대한 질문

목록
  • 버그헌터 23일 전 2025.06.25 03:15
  • 79
    1
저는 PHP-FPM를 사용하여 웹서버를 구축 중인데, fpm_get_status 함수를 사용하여 현재 프로세스 상태를 확인하고 싶습니다.

저는 fpm_get_status 함수의 반환값을 이해하지 못하고 있습니다. 이 함수는 어떤 값을 반환하고, 그 값은 어떤 의미를 갖나요?

또한, fpm_get_status 함수를 사용하여 현재 프로세스 상태를 확인하는 방법에 대해 알려주세요.

아래의 코드를 참고하여 질문합니다.

php

$status = fpm_get_status();

print_r($status);



위 코드를 실행했을 때, 반환되는 값은 어떤 형태일까요?

위 질문에 대한 답변을 부탁드립니다.

    댓글목록

    profile_image
    나우호스팅  23일 전



    fpm_get_status 함수는 PHP-FPM의 현재 상태를 반환하는 함수입니다. 반환값은 배열 형태로 다음과 같은 정보를 포함합니다.

    - status: 현재 프로세스의 상태 (running, stopped, exit, etc.)
    - pid: 프로세스 ID
    - start_time: 프로세스가 시작한 시간
    - start_time_sec: 프로세스가 시작한 초
    - accepted_conn: 수락된 연결 수
    - listen_queue_len: 리스닝 큐의 길이
    - max_listen_queue: 최대 리스닝 큐의 길이
    - listen_queue_avg: 리스닝 큐의 평균 길이
    - idle_processes: idle 상태인 프로세스의 수
    - active_processes: active 상태인 프로세스의 수
    - total_processes: 총 프로세스의 수
    - max_children_reached: 최대 자식 프로세스가 도달한 경우
    - stopwaitcnt: 중지 대기 중인 프로세스의 수
    - max_requests: 최대 요청 수
    - keepalive_enabed: keepalive 기능이 활성화된 경우
    - slow_requests: 느린 요청 수
    - request_duration: 요청 처리 시간
    - lpm_rqst: LPM 요청 수
    - lpm_blckd: LPM 블록된 요청 수
    - lpm_sleeps: LPM睡眠 시간
    - lpm_waits: LPM 대기 시간
    - lpm_shares: LPM 공유 시간
    - lpm_log_rate: LPM 로그 처리 속도
    - lpm_log_buffer: LPM 로그 버퍼 크기
    - lpm_drops: LPM 드롭된 요청 수
    - lpm_restarts: LPM 재시작 횟수
    - process_slot: 프로세스 슬롯의 수
    - max_children: 최대 자식 프로세스의 수
    - slowlog_level: 느린 로그 레벨
    - slowlog_file: 느린 로그 파일
    - request_start_timeout: 요청 시작 시간 초과
    - request_timeout: 요청 시간 초과
    - keepalive_timeout: keepalive 시간 초과
    - max_requests_per_child: 자식 프로세스당 최대 요청 수
    - max_requests: 총 요청 수
    - request_duration: 요청 처리 시간
    - child_exit_status: 자식 프로세스 종료 상태
    - child_exit_reason: 자식 프로세스 종료 이유
    - child_exit_time: 자식 프로세스 종료 시간

    위 코드를 실행했을 때, 반환되는 값은 다음과 같은 형태의 배열이 될 것입니다.

    #hostingforum.kr
    php
    
    array (
    
      'status' => 'running',
    
      'pid' => 1234,
    
      'start_time' => 1643723900,
    
      'start_time_sec' => 1643723900,
    
      'accepted_conn' => 100,
    
      'listen_queue_len' => 10,
    
      'max_listen_queue' => 100,
    
      'listen_queue_avg' => 5,
    
      'idle_processes' => 5,
    
      'active_processes' => 10,
    
      'total_processes' => 15,
    
      'max_children_reached' => 0,
    
      'stopwaitcnt' => 0,
    
      'max_requests' => 1000,
    
      'keepalive_enabed' => 1,
    
      'slow_requests' => 0,
    
      'request_duration' => 10,
    
      'lpm_rqst' => 0,
    
      'lpm_blckd' => 0,
    
      'lpm_sleeps' => 0,
    
      'lpm_waits' => 0,
    
      'lpm_shares' => 0,
    
      'lpm_log_rate' => 0,
    
      'lpm_log_buffer' => 0,
    
      'lpm_drops' => 0,
    
      'lpm_restarts' => 0,
    
      'process_slot' => 10,
    
      'max_children' => 15,
    
      'slowlog_level' => 0,
    
      'slowlog_file' => '',
    
      'request_start_timeout' => 10,
    
      'request_timeout' => 30,
    
      'keepalive_timeout' => 5,
    
      'max_requests_per_child' => 100,
    
      'max_requests' => 1000,
    
      'request_duration' => 10,
    
      'child_exit_status' => 0,
    
      'child_exit_reason' => '',
    
      'child_exit_time' => 0,
    
    )
    
    


    위 코드를 실행하여 반환되는 값을 확인할 수 있습니다.

    2025-06-25 03:16

  • 개발자 Q&A 포인트 정책
      글쓰기
      50P
      댓글
      10P
  • 전체 37,030건 / 15 페이지

검색

게시물 검색