debug

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package debug provides structured debug dump collection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiskSnapshot

type DiskSnapshot struct {
	Lsblk  string `json:"lsblk"`
	Mounts string `json:"mounts"`
	Fdisk  string `json:"fdisk"`
	Df     string `json:"df"`
}

DiskSnapshot captures disk layout and state.

type Dump

type Dump struct {
	System  SystemSnapshot  `json:"system"`
	Disk    DiskSnapshot    `json:"disk"`
	Network NetworkSnapshot `json:"network"`
	Kernel  KernelSnapshot  `json:"kernel"`
}

Dump holds a structured debug snapshot collected on failure.

func Collect

func Collect(ctx context.Context) *Dump

Collect gathers a debug dump from the running system.

func (*Dump) Marshal

func (d *Dump) Marshal() ([]byte, error)

Marshal returns the dump as JSON.

type KernelSnapshot

type KernelSnapshot struct {
	Dmesg      string `json:"dmesg"`
	Lsmod      string `json:"lsmod"`
	Cmdline    string `json:"cmdline"`
	EFIBootmgr string `json:"efibootmgr"`
}

KernelSnapshot captures kernel and boot state.

type NetworkSnapshot

type NetworkSnapshot struct {
	IPAddr     string `json:"ipAddr"`
	IPRoute    string `json:"ipRoute"`
	IPNeigh    string `json:"ipNeigh"`
	ResolvConf string `json:"resolvConf"`
}

NetworkSnapshot captures network configuration.

type SystemSnapshot

type SystemSnapshot struct {
	Hostname string `json:"hostname"`
	Uptime   string `json:"uptime"`
	MemInfo  string `json:"meminfo"`
	LoadAvg  string `json:"loadavg"`
	Vendor   string `json:"vendor"`
	Product  string `json:"product"`
}

SystemSnapshot captures basic system information.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL