[PR #1837] [MERGED] feat: add server diagnostics script #2560

Closed
opened 2026-10-14 21:03:05 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amnezia-client/pull/1837
Author: @amnezia-ii
Created: 9/4/2025
Status: ✅ Merged
Merged: 9/9/2025
Merged by: @vkamn

Base: dev ← Head: feature/add-check-server-script


📝 Commits (1)

  • 2c969af feat: add server diagnostics script

📊 Changes

1 file changed (+519 additions, -0 deletions)

View changed files

➕ client/server_scripts/check_server.sh (+519 -0)

📄 Description

VPN Server Diagnostics Script

A comprehensive diagnostic script for VPN servers that checks system configuration, Docker setup, and network components.

1. System Information

  • System uptime (formatted as H:MM:SS)
  • Current date/time (UTC)
  • Init system (PID 1)
  • System locale

2. Package Manager Detection

  • APT (Debian, Ubuntu)
  • DNF (Fedora, RHEL 8+)
  • YUM (RHEL 7, CentOS 7)
  • ZYPPER (openSUSE, SLES)
  • PACMAN (Arch Linux)
  • OPKG (OpenWrt) - with unsupported warning

3. Package Versions

  • sudo package version
  • Docker package version
  • lsof package version

4. OS & Kernel Information

  • Operating system details
  • Kernel version and architecture
  • CPU thread count
  • Virtualization status

5. Memory & Storage

  • RAM usage with percentages
  • Swap usage
  • Disk space usage
  • Detailed memory statistics

6. User & Permissions

  • Current user and groups
  • Sudo privileges (with password requirement check)
  • Home directory accessibility
  • Default shell

7. System Components

  • sudo - privilege escalation tool
  • lsof - list open files utility
  • fuser - file user utility
  • AppArmor - security framework

8. Security

  • SELinux status (Enforcing/Permissive/Disabled)
  • AppArmor status and configuration

9. Docker/Podman

  • Docker installation and version
  • Podman detection (with unsupported warning)
  • Service status (active/inactive)
  • Auto-start configuration
  • Docker Hub connectivity test
  • Container listing (total/active/Amnezia)
  • WireGuard peers count (beta feature)

10. System Resources

  • Load average (1, 5, 15 minutes)
  • Top 5 CPU-consuming processes
  • Top 5 memory-consuming processes

11. System Logs

  • Last 10 critical/error messages from journalctl
  • System log accessibility

12. Network

  • Listening ports (netstat/ss)
  • SSH service status
  • Time synchronization status

13. Kernel

  • Kernel version and architecture
  • Kernel command line parameters

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amnezia-vpn/amnezia-client/pull/1837 **Author:** [@amnezia-ii](https://github.com/amnezia-ii) **Created:** 9/4/2025 **Status:** ✅ Merged **Merged:** 9/9/2025 **Merged by:** [@vkamn](https://github.com/vkamn) **Base:** `dev` ← **Head:** `feature/add-check-server-script` --- ### 📝 Commits (1) - [`2c969af`](https://github.com/amnezia-vpn/amnezia-client/commit/2c969af7c5dd0e3fe497491a3afd1fb0fb276e96) feat: add server diagnostics script ### 📊 Changes **1 file changed** (+519 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `client/server_scripts/check_server.sh` (+519 -0) </details> ### 📄 Description # VPN Server Diagnostics Script A comprehensive diagnostic script for VPN servers that checks system configuration, Docker setup, and network components. ### 1. System Information - System uptime (formatted as H:MM:SS) - Current date/time (UTC) - Init system (PID 1) - System locale ### 2. Package Manager Detection - **APT** (Debian, Ubuntu) - **DNF** (Fedora, RHEL 8+) - **YUM** (RHEL 7, CentOS 7) - **ZYPPER** (openSUSE, SLES) - **PACMAN** (Arch Linux) - **OPKG** (OpenWrt) - with unsupported warning ### 3. Package Versions - `sudo` package version - Docker package version - `lsof` package version ### 4. OS & Kernel Information - Operating system details - Kernel version and architecture - CPU thread count - Virtualization status ### 5. Memory & Storage - RAM usage with percentages - Swap usage - Disk space usage - Detailed memory statistics ### 6. User & Permissions - Current user and groups - Sudo privileges (with password requirement check) - Home directory accessibility - Default shell ### 7. System Components - **sudo** - privilege escalation tool - **lsof** - list open files utility - **fuser** - file user utility - **AppArmor** - security framework ### 8. Security - **SELinux** status (Enforcing/Permissive/Disabled) - **AppArmor** status and configuration ### 9. Docker/Podman - Docker installation and version - Podman detection (with unsupported warning) - Service status (active/inactive) - Auto-start configuration - Docker Hub connectivity test - Container listing (total/active/Amnezia) - WireGuard peers count (beta feature) ### 10. System Resources - Load average (1, 5, 15 minutes) - Top 5 CPU-consuming processes - Top 5 memory-consuming processes ### 11. System Logs - Last 10 critical/error messages from journalctl - System log accessibility ### 12. Network - Listening ports (netstat/ss) - SSH service status - Time synchronization status ### 13. Kernel - Kernel version and architecture - Kernel command line parameters --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-14 21:03:05 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#2560
No description provided.