internal

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Format         string
	Stats          bool
	Mounts         bool
	OutputFilePath string
	PID            uint32
	PsTree         bool
	PsTreeCmd      bool
	PsTreeEnv      bool
	Files          bool
	Sockets        bool
	ShowAll        bool
)

Functions

func CleanupTasks

func CleanupTasks(tasks []Task)

cleanupTasks removes all output directories of given tasks

func FormatTime

func FormatTime(microseconds uint32) string

func RenderJSONView

func RenderJSONView(tasks []Task) error

func RenderTreeView

func RenderTreeView(tasks []Task) error

func ShowContainerCheckpoints

func ShowContainerCheckpoints(tasks []Task) error

func UntarFiles

func UntarFiles(src, dest string, files []string) error

UntarFiles unpack only specified files from an archive to the destination directory.

Types

type CheckpointSize

type CheckpointSize struct {
	TotalSize             int64 `json:"total_size,omitempty"`
	MemoryPagesSize       int64 `json:"memory_pages_size,omitempty"`
	AmdGpuMemoryPagesSize int64 `json:"amd_gpu_memory_pages_size,omitempty"`
	RootFsDiffSize        int64 `json:"root_fs_diff_size,omitempty"`
}

type ChkptConfig

type ChkptConfig struct {
	Namespace        string
	Pod              string
	Container        string
	ContainerManager string
	Timestamp        time.Time
}

func ExtractConfigDump

func ExtractConfigDump(checkpointPath string) (*ChkptConfig, error)

type DisplayNode

type DisplayNode struct {
	ContainerName      string         `json:"container_name"`
	Image              string         `json:"image"`
	ID                 string         `json:"id"`
	Runtime            string         `json:"runtime"`
	Created            string         `json:"created"`
	Checkpointed       string         `json:"checkpointed,omitempty"`
	Engine             string         `json:"engine"`
	IP                 string         `json:"ip,omitempty"`
	MAC                string         `json:"mac,omitempty"`
	CheckpointSize     CheckpointSize `json:"checkpoint_size"`
	CriuDumpStatistics *StatsNode     `json:"statistics,omitempty"`
	ProcessTree        *PsNode        `json:"process_tree,omitempty"`
	FileDescriptors    []FdNode       `json:"file_descriptors,omitempty"`
	Sockets            []SkNode       `json:"sockets,omitempty"`
	Mounts             []MountNode    `json:"mounts,omitempty"`
}

type FdNode

type FdNode struct {
	PID       uint32         `json:"pid"`
	OpenFiles []OpenFileNode `json:"open_files,omitempty"`
}

type MountNode

type MountNode struct {
	Destination string `json:"destination"`
	Type        string `json:"type"`
	Source      string `json:"source"`
}

type OpenFileNode

type OpenFileNode struct {
	Type string `json:"type"`
	FD   string `json:"fd"`
	Path string `json:"path"`
}

type PsNode

type PsNode struct {
	PID      uint32            `json:"pid"`
	Comm     string            `json:"command"`
	Cmdline  string            `json:"cmdline,omitempty"`
	EnvVars  map[string]string `json:"environment_variables,omitempty"`
	Children []PsNode          `json:"children,omitempty"`
}

type SkData

type SkData struct {
	Type       string `json:"type,omitempty"`
	Address    string `json:"address,omitempty"`
	State      string `json:"state,omitempty"`
	Source     string `json:"src,omitempty"`
	SourcePort uint32 `json:"src_port,omitempty"`
	Dest       string `json:"dst,omitempty"`
	DestPort   uint32 `json:"dst_port,omitempty"`
	SendBuf    string `json:"send_buf,omitempty"`
	RecvBuf    string `json:"recv_buf,omitempty"`
}

type SkNode

type SkNode struct {
	PID         uint32       `json:"pid"`
	OpenSockets []SocketNode `json:"open_sockets,omitempty"`
}

type SocketNode

type SocketNode struct {
	Protocol string `json:"protocol,omitempty"`
	Data     SkData `json:"data,omitempty"`
}

type StatsNode

type StatsNode struct {
	FreezingTime uint32 `json:"freezing_time,omitempty"`
	FrozenTime   uint32 `json:"frozen_time,omitempty"`
	MemdumpTime  uint32 `json:"memdump_time,omitempty"`
	MemwriteTime uint32 `json:"memwrite_time,omitempty"`
	PagesScanned uint64 `json:"pages_scanned,omitempty"`
	PagesWritten uint64 `json:"pages_written,omitempty"`
}

type Task

type Task struct {
	CheckpointFilePath string
	OutputDir          string
}

func CreateTasks

func CreateTasks(args []string, requiredFiles []string) ([]Task, error)

Jump to

Keyboard shortcuts

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