Documentation ¶
Index ¶
- Constants
- func DetectStorageType() (string, error)
- func DumpMapToObject(data map[string]string, obj interface{}) error
- func GetKVMModuleSupport() string
- func GetKernelModuleParameter(name, moduel string) string
- func GetNestSupport() string
- func GetSecureTTYs(lines []string) []string
- func GetSerialPorts(lines []string) []string
- func GetSysConfig(pa string) string
- func IsHypervisor() bool
- func IsKernelModuleLoaded(name string) bool
- func IsKvmSupport() bool
- func IsNestEnabled() bool
- func IsProcessorAmd() bool
- func IsProcessorIntel() bool
- func IsRootPermission() bool
- func ModprobeKvmModule(name string, remove, nest bool) bool
- func Nics() ([]*types.SNicDevInfo, error)
- func NormalizeUuid(uuid string) string
- func ParseCPUInfo(lines []string) (*types.SCPUInfo, error)
- func ParseDMICPUInfo(lines []string) *types.SDMICPUInfo
- func ParseDMIIPMIInfo(lines []string) bool
- func ParseDMIMemInfo(lines []string) *types.SDMIMemInfo
- func ParseDMISysinfo(lines []string) (*types.SSystemInfo, error)
- func ParseDiskInfo(lines []string, driver string) []*types.SDiskInfo
- func ParseIPMIUser(lines []string) []compute.IPMIUser
- func ParseNicInfo(lines []string) []*types.SNicDevInfo
- func ParsePCIEDiskInfo(lines []string) []*types.SDiskInfo
- func ParseSCSIDiskInfo(lines []string) []*types.SDiskInfo
- func ParseSGMap(lines []string) []compute.SGMapItem
- func SetHostname(name string) error
- func SetSysConfig(cpath, val string) bool
- func Start(closeFd bool, args ...string) (p *os.Process, err error)
- type SHugepageInfo
- type SStorage
- type THugepages
Constants ¶
View Source
const ( KVM_MODULE_INTEL = "kvm-intel" KVM_MODULE_AMD = "kvm-amd" KVM_MODULE = "kvm" KVM_MODULE_UNSUPPORT = "unsupport" KVM_MODULE_BUILDIN = "buildin" HOST_NEST_UNSUPPORT = "0" HOST_NEST_SUPPORT = "1" HOST_NEST_ENABLE = "3" )
View Source
const (
UUID_EMPTY = "00000000-0000-0000-0000-000000000000"
)
Variables ¶
This section is empty.
Functions ¶
func DetectStorageType ¶
func DumpMapToObject ¶
func GetKVMModuleSupport ¶
func GetKVMModuleSupport() string
func GetNestSupport ¶
func GetNestSupport() string
func GetSecureTTYs ¶
func GetSerialPorts ¶
func GetSysConfig ¶
func IsHypervisor ¶
func IsHypervisor() bool
func IsKernelModuleLoaded ¶
func IsKvmSupport ¶
func IsKvmSupport() bool
func IsNestEnabled ¶
func IsNestEnabled() bool
func IsProcessorAmd ¶
func IsProcessorAmd() bool
func IsProcessorIntel ¶
func IsProcessorIntel() bool
func IsRootPermission ¶
func IsRootPermission() bool
func ModprobeKvmModule ¶
func Nics ¶
func Nics() ([]*types.SNicDevInfo, error)
func NormalizeUuid ¶
func ParseDMICPUInfo ¶
func ParseDMICPUInfo(lines []string) *types.SDMICPUInfo
func ParseDMIIPMIInfo ¶
func ParseDMIMemInfo ¶
func ParseDMIMemInfo(lines []string) *types.SDMIMemInfo
func ParseDMISysinfo ¶
func ParseDMISysinfo(lines []string) (*types.SSystemInfo, error)
func ParseIPMIUser ¶
func ParseNicInfo ¶
func ParseNicInfo(lines []string) []*types.SNicDevInfo
func ParsePCIEDiskInfo ¶
func ParseSCSIDiskInfo ¶
func ParseSGMap ¶
ParseSGMap parse command 'sg_map -x' outputs:
/dev/sg1 0 2 0 0 0 /dev/sda /dev/sg2 0 2 1 0 0 /dev/sdb /dev/sg3 0 2 2 0 0 /dev/sdc
func SetHostname ¶
func SetSysConfig ¶
Types ¶
type SHugepageInfo ¶
func (SHugepageInfo) BytesMb ¶
func (h SHugepageInfo) BytesMb() int64
type SStorage ¶
type SStorage struct { Device string Rotational bool Size int64 ReadOnly bool Removable bool Partition bool Scheduler string }
func DetectStorages ¶
type THugepages ¶
type THugepages []SHugepageInfo
func GetHugepages ¶
func GetHugepages() (THugepages, error)
func (THugepages) BytesMb ¶
func (a THugepages) BytesMb() int64
func (THugepages) Len ¶
func (a THugepages) Len() int
func (THugepages) Less ¶
func (a THugepages) Less(i, j int) bool
func (THugepages) PageSizes ¶
func (a THugepages) PageSizes() []int
func (THugepages) Swap ¶
func (a THugepages) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.