Skip to content

About

Logscript for creating Proxmox VE support logs.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

66 Commits

Folders and files

Repository files navigation

Proxmox Support Log Collector

Version: 4.1.0 — 09/2026

Author: Samuel Müller

Contact: smueller@thomas-krenn.com


Purpose

These scripts collect diagnostically relevant system information from Proxmox VE and Proxmox Backup Server hosts to make error situations more reproducible, faster, and easier to analyze for support purposes.

Script Target
getpvelogs.sh Proxmox VE nodes
getpbslogs.sh Proxmox Backup Server

Execution is read-only, except for the optional installation of tools such as nvme-cli, ipmitool, lm-sensors, and sysstat.

getpbslogs.sh never copies backup chunk data (.chunks), private keys, password hashes, or tape encryption secrets.

TUI Version

A version of the tool with TUI (text-based user interface) is available here:
https://github.com/thomas-krenn/PVE-Logscript/tree/tui

The TUI version allows convenient selection of information areas to collect via a menu system and provides status displays for collection progress. You need the additional package dialog (checked automatically during execution). Operation is fully keyboard-based. All options available in the standard script (operating mode, target directory, etc.) are also available there.


What's New in Version 4.1

  • PBS collector: getpbslogs.sh for Proxmox Backup Server (same CLI as the PVE script)
  • Stability: set -e/pipefail abort paths fixed (ps | head, apt-get update, disk-space check)
  • --exclude: network and storage now actually skip the matching sections
  • --anonymize removed: the option caused incomplete/unreliable redaction and was dropped

What's New in Version 4.0

  • Two operating modes: Default (no flag), --full
  • Automatic tool detection: All required tools are checked before collection and installed if needed
  • Extended hardware data: IPMI/BMC sensors, thermal data (in --full mode)
  • Extended Proxmox data: VM/CT configurations, backup jobs, HA, replication, SDN (in --full mode)
  • Firewall configuration: PVE firewall rules and SSL certificates (in --full mode)
  • Performance data: iostat, vmstat, sar snapshots (in --full mode)
  • Checksums: SHA256/MD5 of the archive is created automatically
  • Self-test: With --check, all available tools are displayed (without data collection)

Installation & Usage

1. Clone the repository

git clone https://github.com/thomas-krenn/PVE-Logscript.git

2. Change to the directory

cd PVE-Logscript

3. Make the script executable

chmod +x getpvelogs.sh getpbslogs.sh

4. Run the script (as root)

Proxmox VE:

sudo ./getpvelogs.sh

Proxmox Backup Server:

sudo ./getpbslogs.sh

Alternative: One-liner

If the script is only needed once:

# Proxmox VE
curl -sL https://raw.githubusercontent.com/thomas-krenn/PVE-Logscript/main/getpvelogs.sh | sudo bash

# Proxmox Backup Server
curl -sL https://raw.githubusercontent.com/thomas-krenn/PVE-Logscript/main/getpbslogs.sh | sudo bash

Examples

# Standard execution
sudo ./getpvelogs.sh

# Full data collection incl. hardware and performance
sudo ./getpvelogs.sh --full --install-tools

# Output to specific directory
sudo ./getpvelogs.sh --output-dir /tmp/logs

# Exclude specific sections
sudo ./getpvelogs.sh --exclude ceph,smart

# Self-test - shows available tools without data collection
./getpvelogs.sh --check

# Show version
./getpvelogs.sh --version

# PBS: standard / full / exclude tape
sudo ./getpbslogs.sh
sudo ./getpbslogs.sh --full --install-tools
sudo ./getpbslogs.sh --exclude tape,smart
./getpbslogs.sh --check

Parameters

Operating Modes

Parameter Description
Default (no flag) Standard scope: Journal, dmesg, PVE services, network, storage, SMART, Ceph, cluster, VM/CT lists
--full Full: Default + hardware (IPMI, thermal), VM/CT configs, firewall, performance, backup/HA/replication

Tool Installation

Parameter Description
--install-tools Automatically install missing tools
--no-install Do not install tools; missing sections will be skipped

Output Options

Parameter Description
--output-dir PATH Set output directory
--exclude SECTIONS Exclude sections (comma-separated). PVE: ceph,smart,network,storage,proxmox,proxmox-extended,hardware,firewall,performance,system-extended. PBS: smart,network,storage,pbs,pbs-extended,tape,hardware,firewall,performance,system-extended
--json-meta Export metadata additionally as JSON
--verbose Detailed output during execution

Miscellaneous

Parameter Description
--keep-work Do not delete temporary working directory
--check Self-test: shows available tools without data collection
-v, --version Show version
-h, --help Show help

Feature Scope (Proxmox VE)

Default Mode

  • Progress output to STDOUT
  • Kernel dmesg and journal logs
  • Network configuration and interface details
  • PVE service status
  • Storage: LVM, ZFS, MDADM
  • SMART data (SATA/SAS and NVMe)
  • Ceph information (if present)
  • Cluster status (Corosync, quorum)
  • VM/CT lists

Full Mode (in addition to default)

  • Hardware: IPMI/BMC sensors, thermal data (lm-sensors)
  • VM/CT configuration files
  • Backup configuration (vzdump, jobs)
  • HA manager status and configuration
  • Replication status
  • SDN configuration
  • Subscription status (license key is always redacted)
  • Firewall rules (cluster, host, VM)
  • SSL certificate information
  • SSH configuration
  • Performance snapshots: iostat, vmstat, sar
  • Boot configuration (GRUB, kernel cmdline)
  • Systemd timers

Output Structure

<hostname>_<serial>_<timestamp>.logs-XXXX/
│
├── _meta.txt                 Metadata and system overview
├── _meta.json                JSON metadata (with --json-meta)
├── _tools_used.txt           List of used tools
├── _errors.txt               Warnings and errors
│
├── kernel_dmesg.txt          Kernel messages
├── journal_*.txt             Journald logs
├── smart.txt                 SMART data
├── nvme_list.txt             NVMe device list
├── zfs.txt                   ZFS status
├── storage.txt               Storage overview
│
├── system/                   System information
│   ├── hw.txt                Hardware details
│   ├── apt_history.txt       Package history
│   ├── lvm.txt               LVM configuration
│   ├── mdadm.txt             RAID status
│   ├── syslog.txt            Syslog (if no journald)
│   ├── boot_config.txt       Boot/GRUB configuration (--full)
│   └── systemd_timers.txt    Systemd timers (--full)
│
├── network/                  Network
│   ├── network.txt           Network status
│   ├── network_config.txt    Network configuration
│   └── net-if/               Interface statistics
│
├── proxmox/                  Proxmox VE
│   ├── pveversion.txt        PVE version
│   ├── pve_services.txt      PVE services
│   ├── pve_vms.txt           VM/CT list
│   ├── pvereport.txt         PVE report
│   ├── cluster.txt           Cluster status
│   ├── subscription.txt      Subscription status (--full)
│   ├── backup_config.txt     Backup configuration (--full)
│   ├── ha_status.txt         HA manager status (--full)
│   ├── replication_status.txt Replication status (--full)
│   ├── pbs_status.txt        PBS client status (--full)
│   ├── vm-configs/           VM configurations (--full)
│   ├── ct-configs/           CT configurations (--full)
│   ├── ha-config/            HA configuration (--full)
│   └── sdn-config/           SDN configuration (--full)
│
├── security/                 Security (--full)
│   ├── firewall_status.txt   Firewall status
│   ├── firewall/             Firewall rules
│   ├── ssl_info.txt          SSL certificate info
│   └── sshd_config.txt       SSH configuration
│
├── hardware/                 Hardware details (--full)
│   ├── ipmi_sensors.txt      IPMI sensor values
│   ├── ipmi_sel.txt          IPMI System Event Log
│   ├── ipmi_fru.txt          IPMI FRU data
│   └── sensors.txt           Thermal data (lm-sensors)
│
├── performance/              Performance data (--full)
│   ├── top_processes.txt     Top processes (CPU/Memory)
│   ├── iostat.txt            I/O statistics
│   ├── vmstat.txt            VM statistics
│   ├── sar_cpu.txt           SAR CPU data
│   └── sar_disk.txt          SAR disk data
│
├── ceph/                     Ceph data (if present)
│   ├── ceph_status.txt       Ceph cluster status
│   ├── ceph_health.txt       Ceph health details
│   ├── ceph_osd.txt          OSD tree
│   ├── ceph_mons.txt         Monitor dump
│   ├── ceph_pg.json          Placement group data (JSON)
│   ├── ceph_osd_df.txt       OSD utilization
│   ├── ceph_volume_lvm_list.txt Raw ceph-volume output
│   └── osd_device_mapping.txt OSD -> device -> serial mapping
│
└── logs/                     System and PVE logs

Feature Scope (Proxmox Backup Server)

Both scripts share the same CLI flags (--full, --install-tools, --output-dir, --exclude, --json-meta, --verbose, --keep-work, --check).

Default Mode

  • Kernel dmesg and journal logs (including PBS service journals)
  • Network configuration and PBS network/DNS view
  • Storage: LVM, ZFS, MDADM, PBS disk/filesystem/zpool list
  • SMART data (SATA/SAS and NVMe)
  • PBS version, proxmox-backup-manager report, node info
  • Datastore list and recent tasks
  • PBS service status (proxmox-backup, proxmox-backup-proxy)
  • Recent PBS task logs (last 7 days, size-limited; not the full task archive)

Full Mode (in addition to default)

  • Hardware: IPMI/BMC sensors, thermal data (lm-sensors)
  • Safe PBS config copies from /etc/proxmox-backup/*.cfg (no user.cfg, tfa.cfg, remote.cfg, domains.cfg, no *.key)
  • Users/ACL via CLI (no password hashes)
  • Remotes, sync/prune/verify jobs, garbage collection status
  • Traffic control, notifications, LDAP/AD/OpenID lists
  • ACME/certificate info, S3 endpoint list (no secrets)
  • Subscription status (license key is always redacted)
  • Tape: drives, changers, inventory, media, pools, backup jobs, key IDs only
  • Firewall (nft/iptables), SSL certificate metadata, SSH configuration
  • Performance snapshots: iostat, vmstat, sar
  • Boot configuration (GRUB, kernel cmdline) and systemd timers

Never collected

  • Datastore chunk data (.chunks)
  • Private TLS keys
  • User password hashes and TFA secrets
  • Remote/LDAP bind credentials
  • Tape encryption key material (proxmox-tape key show is not run)

Output Structure (PBS)

<hostname>_<serial>_<timestamp>.pbslogs-XXXX/
│
├── _meta.txt                 Metadata and system overview
├── _meta.json                JSON metadata (with --json-meta)
├── _tools_used.txt           List of used tools
├── _errors.txt               Warnings and errors
│
├── kernel_dmesg.txt          Kernel messages
├── journal_*.txt             Journald logs (incl. journal_pbs.txt)
├── smart.txt                 SMART data
├── nvme_list.txt             NVMe device list
├── zfs.txt                   ZFS status
├── storage.txt               PBS disk / filesystem / zpool overview
│
├── system/                   System information
├── network/                  Network (incl. PBS network/DNS)
│
├── pbs/                      Proxmox Backup Server
│   ├── versions.txt          PBS versions
│   ├── report.txt            proxmox-backup-manager report
│   ├── node.txt              Node configuration
│   ├── datastores.txt        Datastore list
│   ├── tasks.txt             Task list
│   ├── services.txt          PBS service status
│   ├── config/               Safe *.cfg copies (--full)
│   ├── datastore_details.txt Per-datastore show + GC (--full)
│   ├── subscription.txt      Subscription status (--full)
│   └── ...                   jobs, remotes, ACME, S3 (--full)
│
├── tape/                     Tape subsystem (--full)
├── security/                 Firewall, SSL, SSH (--full)
├── hardware/                 IPMI / sensors (--full)
├── performance/              Performance snapshots (--full)
│
└── logs/
    ├── syslog / kern / daemon
    └── proxmox-backup/       PBS logs and recent task files

Privacy / GDPR Notice

This script may collect the following information among others:

  • Hostnames
  • Usernames
  • VM and CT names (PVE)
  • Datastore, remote, and job names (PBS)
  • IP addresses
  • MAC addresses

Before sharing with third parties, it is recommended to review the archive contents.


Disclaimer

These scripts serve as a technical aid. Thomas-Krenn.AG assumes no liability for:

  • Data loss
  • Unexpected system behavior
  • Misinterpretation of collected data

Execution should only be performed by qualified personnel.


Technical Details

  • Minimum disk space: 600 MB (checked before execution; busy hosts with large journals may need more)
  • Timeout: 60 seconds for slow commands (e.g. Ceph queries, proxmox-backup-manager report)
  • Cleanup: On abort (Ctrl+C), the temporary directory is automatically cleaned up
  • Drive detection: sda-sdz, sdaa-sdzz, virtio (vd*), Xen (xvd*), NVMe namespaces, MD arrays (/dev/md0 and /dev/md/*)
  • Compression: zstd (preferred) or gzip as fallback
  • Checksums: SHA256 (preferred) or MD5 as fallback

Recommendations

  • Before execution: The script automatically checks available disk space. With less than 600 MB, execution is aborted. Hosts with very large journals or many ZFS datasets may need additional free space.

  • Self-test: Use ./getpvelogs.sh --check or ./getpbslogs.sh --check to verify which tools are available beforehand.

  • After execution: The generated archive and checksum file are located in the working directory (or the directory specified with --output-dir) and can be shared directly for support purposes. PBS archives are named *.pbs-supportlogs.tar.zst (or .tar.gz).

About

Logscript for creating Proxmox VE support logs.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages