sysinfo

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2025 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(logger zerolog.Logger) tools.Tool

Types

type CPUInfo

type CPUInfo struct {
	Model     string `json:"model"`
	Cores     int    `json:"cores"`
	Threads   int    `json:"threads"`
	LoadAvg1  string `json:"load_avg_1min"`
	LoadAvg5  string `json:"load_avg_5min"`
	LoadAvg15 string `json:"load_avg_15min"`
	Usage     string `json:"usage_percent"`
}

type Input

type Input struct {
	SSHHost  string `json:"ssh_host,omitempty"`  // SSH host for remote execution
	SSHPort  int    `json:"ssh_port,omitempty"`  // SSH port for remote execution (default: 22)
	SSHUser  string `json:"ssh_user,omitempty"`  // SSH user for remote execution
	MaxLines int    `json:"max_lines,omitempty"` // Maximum lines to return (default: 1000)
	Offset   int    `json:"offset,omitempty"`    // Line offset for pagination
}

type MemoryInfo

type MemoryInfo struct {
	TotalMB      int    `json:"total_mb"`
	UsedMB       int    `json:"used_mb"`
	FreeMB       int    `json:"free_mb"`
	AvailableMB  int    `json:"available_mb"`
	CachedMB     int    `json:"cached_mb"`
	SwapTotalMB  int    `json:"swap_total_mb"`
	SwapUsedMB   int    `json:"swap_used_mb"`
	SwapFreeMB   int    `json:"swap_free_mb"`
	UsagePercent string `json:"usage_percent"`
}

type SystemInfo

type SystemInfo struct {
	CPUInfo    CPUInfo    `json:"cpu_info"`
	MemoryInfo MemoryInfo `json:"memory_info"`
	Hostname   string     `json:"hostname"`
	Kernel     string     `json:"kernel"`
	OS         string     `json:"os"`
	Uptime     string     `json:"uptime"`
}

type Tool

type Tool struct {
	// contains filtered or unexported fields
}

func (*Tool) Register

func (s *Tool) Register(server *mcp.Server)

func (*Tool) SysInfoHandler

Jump to

Keyboard shortcuts

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