显示技术:Apstra ZTP (CLI)
为了帮助 Apstra ZTP 的支持流程,我们要求您向瞻博网络支持提供来自 Apstra ZTP 环境的诊断信息。您可以从 Apstra ZTP CLI 获取显示技术文件,如下所述。
- 通过 SSH 连接到 Apstra ZTP 服务器。
ssh admin@<apstra-ztp-server-ip>
(其中<apstra-ztp-server-ip>
是 Apstra ZTP 服务器的 IP 地址。 - 运行命令,
sudo ztp_show_tech
生成 show tech 文件并将其复制到 Apstra ZTP 服务器的当前工作目录下。例如:admin@apstra-ztp:~$ sudo ztp_show_tech 2023-09-05_20:14:23 Generating technical support data under directory /tmp/tmp.0CymRu9K2f 2023-09-05_20:14:23 --- collecting ztp_config/dhcpd.conf from /containers_data/dhcp/dhcpd.conf --- 2023-09-05_20:14:23 --- collecting system_info/vmstat from /proc/vmstat --- 2023-09-05_20:14:23 --- collecting ztp_config/ztp_version from /etc/apstra_ztp/version --- 2023-09-05_20:14:23 --- collecting system_info/meminfo from /proc/meminfo --- 2023-09-05_20:14:23 --- collecting system_info/syslog from /var/log/syslog --- 2023-09-05_20:14:23 --- collecting system_info/cpuinfo from /proc/cpuinfo --- 2023-09-05_20:14:23 --- collecting ztp_config/docker-compose.yml from /etc/apstra_ztp/docker-compose.yml --- 2023-09-05_20:14:23 --- collecting logs/ztp from /containers_data/logs/ --- 2023-09-05_20:14:25 --- collecting files from tftp directory --- '/containers_data/tftp/ztp.py' -> 'ztp_config/tftp/ztp.py' '/containers_data/tftp/eos_custom.sh' -> 'ztp_config/tftp/eos_custom.sh' '/containers_data/tftp/sonic_custom.sh' -> 'ztp_config/tftp/sonic_custom.sh' '/containers_data/tftp/junos_custom.sh' -> 'ztp_config/tftp/junos_custom.sh' '/containers_data/tftp/junos_apstra_ztp_bootstrap.sh' -> 'ztp_config/tftp/junos_apstra_ztp_bootstrap.sh' '/containers_data/tftp/ztp.py.md5' -> 'ztp_config/tftp/ztp.py.md5' '/containers_data/tftp/nxos_custom.sh' -> 'ztp_config/tftp/nxos_custom.sh' '/containers_data/tftp/config_verifier.py' -> 'ztp_config/tftp/config_verifier.py' '/containers_data/tftp/Dockerfile' -> 'ztp_config/tftp/Dockerfile' '/containers_data/tftp/container_init.sh' -> 'ztp_config/tftp/container_init.sh' '/containers_data/tftp/rsyslog.conf' -> 'ztp_config/tftp/rsyslog.conf' '/containers_data/tftp/ztp.json' -> 'ztp_config/tftp/ztp.json' '/containers_data/tftp/poap-md5sum' -> 'ztp_config/tftp/poap-md5sum' 2023-09-05_20:14:25 --- collecting docker/docker_version with command: docker --version --- 2023-09-05_20:14:25 --- collecting ztp_config/mysql_dump.sql with command: timeout -k 5 30 docker exec db /usr/bin/mysqldump -uadmin -padmin ui; case $? in 124) echo Timeout exception: command was CANCELED;; 137) echo Timeout exception: command was KILLED;; esac --- 2023-09-05_20:14:27 --- collecting docker/networks with command: timeout -k 5 30 docker network ls; case $? in 124) echo Timeout exception: command was CANCELED;; 137) echo Timeout exception: command was KILLED;; esac --- 2023-09-05_20:14:28 --- collecting docker/containers with command: timeout -k 5 30 docker ps -a; case $? in 124) echo Timeout exception: command was CANCELED;; 137) echo Timeout exception: command was KILLED;; esac --- 2023-09-05_20:14:28 --- collecting system_info/disk_free with command: df -h --- 2023-09-05_20:14:28 --- collecting system_info/ubuntu_version with command: lsb_release -a --- 2023-09-05_20:14:28 --- collecting docker/docker_compose_version with command: docker-compose --version --- 2023-09-05_20:14:30 --- collecting docker/daemon.log with command: journalctl -u docker.service --- 2023-09-05_20:14:30 --- collecting docker/logs/tftp with command: timeout -k 5 30 docker logs -t tftp; case $? in 124) echo Timeout exception: command was CANCELED;; 137) echo Timeout exception: command was KILLED;; esac --- 2023-09-05_20:14:46 --- collecting docker/logs/db with command: timeout -k 5 30 docker logs db; case $? in 124) echo Timeout exception: command was CANCELED;; 137) echo Timeout exception: command was KILLED;; esac --- 2023-09-05_20:14:46 --- collecting docker/logs/nginx with command: timeout -k 5 30 docker logs -t nginx; case $? in 124) echo Timeout exception: command was CANCELED;; 137) echo Timeout exception: command was KILLED;; esac --- 2023-09-05_20:14:46 --- collecting logs/nginx/error.log with command: docker cp nginx:/var/log/nginx/error.log logs/nginx/error.log --- 2023-09-05_20:14:48 --- collecting docker/logs/status with command: timeout -k 5 30 docker logs -t status; case $? in 124) echo Timeout exception: command was CANCELED;; 137) echo Timeout exception: command was KILLED;; esac --- 2023-09-05_20:14:48 --- collecting logs/nginx/access.log with command: docker cp nginx:/var/log/nginx/access.log logs/nginx/access.log --- 2023-09-05_20:14:49 --- collecting system_info/memory with command: free -m --- 2023-09-05_20:14:49 --- collecting system_info/containers_data_disk_usage with command: du /containers_data --- 2023-09-05_20:14:49 --- collecting docker/logs/dhcpd with command: timeout -k 5 30 docker logs -t dhcpd; case $? in 124) echo Timeout exception: command was CANCELED;; 137) echo Timeout exception: command was KILLED;; esac --- 2023-09-05_20:15:02 Archiving show tech data into ztp_show_tech_20230905_201423.tar.gz 2023-09-05_20:15:05 Removing working directory /tmp/tmp.0CymRu9K2f 2023-09-05_20:15:05 All done. admin@apstra-ztp:~$
- 在当前目录中找到文件存档(例如,
ztp_show_tech_20230905_201423.tar.gz
),然后通过 SCP 将文件复制到具有上传功能的本地计算机。 - 将显示技术文件上传到您的客户案例。