Metro Node: 메트로 노드에서 로그를 수집하는 방법
Summary: 이 문서에서는 Metro Node에서 로그를 수집하는 방법에 대한 단계를 간략하게 설명하고 성능 문제에 필요할 수 있는 로그/데이터에 대해서도 설명합니다.
Instructions
다음 작업을 수행하는 방법에 대한 단계:
- Metro Node 문제를 디버깅하는 데 필요한 로그는 무엇입니까?
- Metro Node 클러스터에서 collect-diagnostics를 캡처하려면 어떻게 해야 합니까?
- 관리 서버에서 기존 collect-diagnostics 패키지를 검증하는 방법
- Metro Node에서 진행 중인 수집 진단을 취소하고 정리하는 방법
A. Metro Node 문제를 디버깅하는 데 필요한 로그는 무엇입니까?
-
메트로 노드에서 로그를 취합하는 데 필요한 명령을 "collect-diagnostics"라고 하며 메트로 노드 설정의 모든 노드(*1)에서 실행할 수 있습니다. 메트로 노드 클러스터의 한 디렉터에서 이 명령을 실행하면 클러스터의 모든 노드에 있는 모든 디렉터의 데이터가 모두 있어야 합니다. 한 번에 둘 이상의 노드에서 이 명령을 실행하지 마십시오.
*1 참고: Metro 구성의 경우 하나의 클러스터에서만 하나의 디렉터에서만 'collect-diagnostics' 명령을 실행하고 전체 완료될 때까지 기다린 후 다른 디렉터 또는 피어 클러스터에서 필요한 경우 피어 클러스터에서 CD를 수집합니다. -
'collect-diagnostics' 명령은 구성 및 로그 파일을 포함하는 압축된 tar.gz 로그 파일을 생성합니다. collect-diagnostics 파일은 해당 파일이 실행된 노드의 /diag/collect-diagnostics-out/ 디렉토리에 있습니다. 명령이 완료되면 WINSCP 또는 이와 동등한 SCP 유틸리티를 사용하여 노드에서 파일을 복사한 다음 분석을 지원하기 위해 제공할 수 있습니다. 이 명령의 사용에 대한 자세한 내용은 아래 섹션 B에 나와 있습니다.
참고:- 'collect-diagnostics' 명령을 옵션 없이 실행하면 두 개의 파일, 즉 기본 파일과 확장 파일이 생성됩니다. 확장된 시스템에서는 시간이 오래 걸릴 수 있습니다.
- 메트로 노드 지원에는 일반적으로 기본 파일만 필요하지만, 일부 상황에서는 확장 파일에도 성능 문제가 발생할 수 있습니다.
- collect-diagnostics를 실행할 때 사용하도록 요청될 수 있는 표준 옵션은 다음과 같습니다.
- "
--noextended": 이 옵션은 확장 진단 수집을 생략합니다. - "
--last-logs": 이 옵션은 x시간 또는 일 단위로 로그를 캡처합니다.
- "
- 명령에 대한 자세한 내용을 보려면 "collect-diagnostics -h"를 입력합니다.
다음은 이 두 파일 이름의 샘플입니다. YYYY-MM-DD-HH.MM.SS 으로 표시된 날짜와 시간은 파일 이름이 수집된 날짜와 시간입니다.
- 기본 파일:
<Serial number>-c1-diag-YYYY-MM-DD-HH.MM.SS.tar.gz - 확장 파일:
<Serial number>-c1-diag-ext-YYYY-MM-DD-HH.MM.SS.tar.gz
-
성능 문제는 복잡하며 많은 특정 정보를 수집해야 합니다. 따라서 이 프로세스를 신속하게 진행하기 위해 고객이 작성해야 하는 성능 설문지를 준비했습니다. 설문지는 이 기술 자료 문서 끝부분의 첨부 자료 섹션에 첨부되어 있습니다.
-
일부 유형의 성능 문제에서는 "fe_perf_stats"라는 추가 로그를 캡처하는 것이 유용합니다. 로그는 지속적으로 생성되지만 collect-diagnostics에 의해 캡처되지 않습니다. 이 로그를 캡처하려면 각 클러스터의 노드에서 cd(디렉토리 변경)를 /var/log/VPlex/cli로 이동하고 "tar cvzf fe-perf-stats.tar.gz fe_perf_stats*" 명령을 실행하여 파일 데이터를 tar 파일로 압축합니다. WINSCP 또는 동등한 SCP 유틸리티를 사용하여 노드에 연결하고 /var/log/VPlex/cli로 이동합니다. "fe-perf-stats.tar.gz" 파일을 시스템에 복사합니다. 지원 부서에서 요청한 경우 tar 파일을 하나 이상의 진단 수집 파일과 함께 SR에 업로드하거나 지원 부서에서 SR 및 이메일을 통해 제공하는 ftp 링크로 업로드합니다.
-
진단 정보를 수집하는 것 외에도 다음 정보를 캡처하는 것이 도움이 될 수 있습니다.
- putty 세션에 대한 로깅을 엽니다.
- 그런 다음 아래 명령을 실행합니다.
- 그런 다음 Putty 로그를 수집하여 시스템에 다운로드하십시오.
- 그런 다음 PuTTY 로그, 진단 수집 및 SR에 요청된 기타 데이터를 첨부합니다.
다음 명령은 VPlexcli 프롬프트에서 실행됩니다.
cluster statusll clusters/**/storage-views/* --fullll ~portsshow-use-hierarchy /clusters/**/virtual-volumes/*ll ~system-volumesls -t /clusters/*/directors/*::serial-number(이 명령은 각 노드에 대한 모든 DST를 나열합니다.)ls -t /clusters/**/director-*/::hostname(표시되는 호스트 이름은 IP 주소입니다. 이는 예상된 동작입니다.)
B. Metro Node 클러스터에서 collect-diagnostics를 캡처하려면 어떻게 해야 합니까?
이 데이터를 캡처하려면 "--noextended" 및 "--last-logs 30d" 플래그를 사용하여 collect-diagnostics 명령을 실행합니다.
-
디렉터 노드 Linux 프롬프트(예: service@director-1-1-a)에서 SSH 세션을 설정한 다음 vplexcli에 로그인합니다.
샘플 출력:
login as: service Keyboard-interactive authentication prompts from server: | Password: End of keyboard-interactive prompts from server Last login: <date and timestamp data> from x.x.x.x service@director-1-1-a:~> service@director-1-1-a:~> vplexcli Trying ::1... Connected to localhost. Escape character is '^]'. VPlexcli:/>
-
collect-diagnostics를 시작하려면 vplexcli 프롬프트에서 아래 예와 같이 지시된 옵션을 사용하여 "collect-diagnostics" 명령을 실행합니다.
예제 출력:
VPlexcli:/> collect-diagnostics --noextended --last-logs 30d ('WARNING:The collect-diagnostics command was issued with option --noextended. ',) The following file(s) will NOT be collected: core files fast trace dump files slow trace dump files udcom trace dump files udcom legacy trace files user-defined performance sink files the management console's heap ('WARNING:Only the logs that are generated in the last 30 days are collected.') 2024-02-09 19:55:12 UTC: ****Initializing collect-diagnostics... 2024-02-09 19:55:13 UTC: No cluster-witness server found. 2024-02-09 19:55:13 UTC: Free space = 88G 2024-02-09 19:55:13 UTC: Total space needed = 1907M ================================================================================ Starting collect-diagnostics, this operation might take a while... ================================================================================ Executing cluster collection ..
C. 디렉터/노드에서 기존 collect-diagnostics 패키지를 검증하는 방법
-
collect-diagnostics 명령이 완료되고 vplexcli 프롬프트로 돌아가면 winscp[또는 동등한 SCP 유틸리티]를 사용하여 명령을 실행한 디렉터에 연결하고 /diag/collect-diagnostics-out/ 폴더로 이동합니다.
-
올바른 타임스탬프를 가진 하나 이상의 로그 파일을 식별하고 로컬 워크스테이션에 다운로드합니다.
D. 진행 중인 collect-diagnostics를 취소하는 방법
-
여전히 collect-diagnostics를 시작한 PuTTY 세션에 있다면 collect-diagnostics 출력 스트리밍이 표시되어 여전히 실행 중임을 보여줍니다.
샘플 출력:
VPlexcli:/> collect-diagnostics --noextended --last-logs 30d ('WARNING:The collect-diagnostics command was issued with option --noextended. ',) The following file(s) will NOT be collected: core files fast trace dump files slow trace dump files udcom trace dump files udcom legacy trace files user-defined performance sink files the management console's heap ('WARNING:Only the logs that are generated in the last 30 days are collected.') 2022-02-09 19:55:12 UTC: ****Initializing collect-diagnostics... 2022-02-09 19:55:13 UTC: No cluster-witness server found. 2022-02-09 19:55:13 UTC: Free space = 88G 2022-02-09 19:55:13 UTC: Total space needed = 1907M ================================================================================ Starting collect-diagnostics, this operation might take a while... ================================================================================ Executing cluster collection .. -
중복된 PuTTY 세션을 열고 서비스 계정을 사용하여 collect-diagnostics를 시작한 디렉터에 로그인합니다.
샘플 출력:
login as: service Using keyboard-interactive authentication. Password: Last login: <date and time stamp data> from x.x.x.x service@director-1-1-b:~>
-
디렉터에서 다음 명령을 사용하여 관리 콘솔을 재시작하여 실행 중인 collect-diagnostics를 취소합니다.
샘플 출력:
service@director-1-1-b:~> sudo systemctl restart VPlexManagementConsole.service
-
collect-diagnostics가 실행 중인 첫 번째 PuTTY 세션을 다시 살펴보면 관리 콘솔을 다시 시작하면 collect-diagnostics 보고서가 마지막으로 기록된 출력으로 표시됩니다.
"Connection closed by foreign host."
샘플 출력(출력의 마지막 줄 확인):
VPlexcli:/> collect-diagnostics --noextended --last-logs 30d ('WARNING:The collect-diagnostics command was issued with option --noextended. ',) The following file(s) will NOT be collected: core files fast trace dump files slow trace dump files udcom trace dump files udcom legacy trace files user-defined performance sink files the management console's heap ('WARNING:Only the logs that are generated in the last 30 days are collected.') 2022-02-09 20:02:03 UTC: ****Initializing collect-diagnostics... 2022-02-09 20:02:04 UTC: No cluster-witness server found. 2022-02-09 20:02:04 UTC: Free space = 88G 2022-02-09 20:02:04 UTC: Total space needed = 1907M ================================================================================ Starting collect-diagnostics, this operation might take a while... ================================================================================ Executing cluster collection .. ERROR Executing SMS log collection .. Connection closed by foreign host. <<< -
위의 3단계에서 collect-diagnostics가 중지된 것으로 확인되면 두 번째 PuTTY 세션으로 돌아가서 /diag 디렉토리로 'cd'한 다음 'll'을 실행하면 몇 가지 추가 디렉토리가 표시됩니다.
collect-diagnostics-tmpcollect-diagnostics-jobscollect-diagnostics-tmp-ext*
*확장 파일이 생략되지 않은 경우
샘플 출력:
service@director-1-1-b:/diag> ll total 32 drwxr-xr-x 2 service groupSvc 4096 Feb 9 20:03 collect-diagnostics-tmp-ext drwxr-xr-x 2 service groupSvc 4096 Feb 9 20:03 collect-diagnostics-jobs drwxr-xr-x 2 service groupSvc 4096 Feb 9 20:04 collect-diagnostics-out drwxr-xr-x 3 service groupSvc 4096 Feb 9 20:02 collect-diagnostics-tmp drwx------ 2 root root 16384 Jan 27 16:54 lost+found drwx--x--x 3 service groupSvc 4096 Dec 17 03:08 share service@director-1-1-b:/diag>
-
이러한 각 디렉토리를 살펴보면 현재 취소된 collect-diagnostics를 시작한 날짜와 시간이 포함된 파일을 볼 수 있습니다. 이러한 파일은 /diag 파티션의 공간을 차지하므로 제거해야 합니다.
-
/diag 디렉토리에서 파일을 제거/삭제하려면 "rm -r collect-diagnostics-jobs" 및 "rm -r collect-diagnostics-tmp"를 입력한 다음 'll'을 다시 입력하여 디렉토리가 삭제 또는 제거되었는지 확인합니다.
샘플 출력:
service@director-1-1-b:/diag> rm -r collect-diagnostics-jobs service@director-1-1-b:/diag> rm -r collect-diagnostics-tmp service@director-1-1-b:/diag> ll total 24 drwxr-xr-x 2 service groupSvc 4096 Feb 9 20:04 collect-diagnostics-out drwx------ 2 root root 16384 Jan 27 16:54 lost+found drwx--x--x 3 service groupSvc 4096 Dec 17 03:08 share service@director-1-1-b:/diag>
-
'collect-diagnostics-tmp-ext' 디렉토리가 있으면 "rm -r collect-diagnostics-tmp-ext"를 실행하여 제거합니다.
참고: 확장 파일은 일반적으로 노드 충돌을 조사하는 데 사용됩니다. 노드 충돌에 대한 조사가 진행 중이고 지원 부서에서 필요한 로그를 모두 캡처하지 못한 경우 collect-diagnostics-tmp-ext 디렉토리를 정리하기 전에 지원 부서에 확인하십시오. 정리하면 필요한 코어 파일이 삭제될 수 있습니다.