os

package
v0.0.0-...-c7cde22 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGroup

func GetGroup(gid uint32) string

GetGroup 通过 gid 获取组名

func GetUser

func GetUser(uid uint32) string

GetUser 通过 uid 获取用户名

func IsDebian

func IsDebian() bool

IsDebian 判断是否是 Debian 系统

func IsEOL

func IsEOL() bool

IsEOL 判断系统是否已到达生命周期终点

func IsRHEL

func IsRHEL() bool

IsRHEL 判断是否是 RHEL 系统

func IsUbuntu

func IsUbuntu() bool

IsUbuntu 判断是否是 Ubuntu 系统

func TCPPortInUse

func TCPPortInUse(port uint) bool

func UDPPortInUse

func UDPPortInUse(port uint) bool

Types

type PortProcess

type PortProcess struct {
	PID     string `json:"pid"`
	Name    string `json:"name"`
	Command string `json:"command"`
}

PortProcess 端口占用进程信息

func GetPortProcess

func GetPortProcess(port uint, protocol string) []PortProcess

GetPortProcess 获取占用指定端口的进程信息

Jump to

Keyboard shortcuts

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