add unknown
This commit is contained in:
parent
14cb6a4607
commit
d81a06e97a
@ -290,6 +290,8 @@ func SysInfoGather() string {
|
||||
sysInfoReturn = redHatSysInfoGather()
|
||||
case "suse":
|
||||
sysInfoReturn = suseSysInfoGather()
|
||||
case "unknown":
|
||||
sysInfoReturn = unknownSysInfoGather()
|
||||
}
|
||||
|
||||
return sysInfoReturn
|
||||
@ -366,3 +368,34 @@ func suseSysInfoGather() string {
|
||||
sysInfoResults := buf.String()
|
||||
return sysInfoResults
|
||||
}
|
||||
|
||||
func unknownSysInfoGather() string {
|
||||
sysInfoData := SystemInfo{
|
||||
OsRelease: osRelease(),
|
||||
DesktopEnvs: desktopEnvs(),
|
||||
DesktopInstalled: desktopInstalled(),
|
||||
CPUInfo: cpuInfo(),
|
||||
Support64bit: support64Bit(),
|
||||
VirtSupport: virtSupport(),
|
||||
LoadAverage: loadAverage(),
|
||||
MemUsage: memUsage(),
|
||||
TopCPUHogs: topCPUHogs(),
|
||||
TopMemHogs: topMemHogs(),
|
||||
DiskUsage: diskUsage(),
|
||||
BlockDevs: blockDevs(),
|
||||
PciDevs: pciDevs(),
|
||||
USBDevs: usbDevs(),
|
||||
DRMInfo: drmInfo(),
|
||||
GLSupport: glSupport(),
|
||||
DmesgTail: dmesgTail(),
|
||||
LastTenReboots: lastTenReboots(),
|
||||
LastTwentyPackages: lastTwentyPkgs(),
|
||||
EFISupport: efiSupport(),
|
||||
}
|
||||
|
||||
t := template.New("sysinfo")
|
||||
t, _ = t.Parse(setting.SuseSysInfoTemplate)
|
||||
t.Execute(&buf, sysInfoData)
|
||||
sysInfoResults := buf.String()
|
||||
return sysInfoResults
|
||||
}
|
||||
|
@ -243,3 +243,99 @@ var SuseSysInfoTemplate = `#####################################################
|
||||
#
|
||||
{{.EFISupport}}
|
||||
`
|
||||
|
||||
var UnknownSysInfoTemplate = `################################################################################
|
||||
# OS Release
|
||||
#
|
||||
{{.OsRelease}}
|
||||
|
||||
################################################################################
|
||||
# Desktop Environments
|
||||
#
|
||||
{{.DesktopEnvs}}
|
||||
|
||||
################################################################################
|
||||
# Desktop Installed
|
||||
#
|
||||
{{.DesktopInstalled}}
|
||||
|
||||
################################################################################
|
||||
# CPU Info
|
||||
#
|
||||
{{.CPUInfo}}
|
||||
|
||||
################################################################################
|
||||
# 64-bit Support
|
||||
#
|
||||
{{.Support64bit}}
|
||||
|
||||
################################################################################
|
||||
# Virtualization Support
|
||||
#
|
||||
{{.VirtSupport}}
|
||||
|
||||
################################################################################
|
||||
# Load Average
|
||||
#
|
||||
{{.LoadAverage}}
|
||||
|
||||
################################################################################
|
||||
# Memory usage
|
||||
#
|
||||
{{.MemUsage}}
|
||||
|
||||
################################################################################
|
||||
# Top 5 CPU hogs
|
||||
#
|
||||
{{.TopCPUHogs}}
|
||||
|
||||
################################################################################
|
||||
# Top 5 memory hogs
|
||||
#
|
||||
{{.TopMemHogs}}
|
||||
|
||||
################################################################################
|
||||
# Disk space usage
|
||||
#
|
||||
{{.DiskUsage}}
|
||||
|
||||
################################################################################
|
||||
# Block Devices
|
||||
#
|
||||
{{.BlockDevs}}
|
||||
|
||||
################################################################################
|
||||
# PCI devices
|
||||
#
|
||||
{{.PciDevs}}
|
||||
|
||||
################################################################################
|
||||
# USB devices
|
||||
#
|
||||
{{.USBDevs}}
|
||||
|
||||
################################################################################
|
||||
# DRM Information
|
||||
#
|
||||
{{.DRMInfo}}
|
||||
|
||||
################################################################################
|
||||
# GL Support
|
||||
#
|
||||
{{.GLSupport}}
|
||||
|
||||
################################################################################
|
||||
# Kernel Buffer Tail
|
||||
#
|
||||
{{.DmesgTail}}
|
||||
|
||||
################################################################################
|
||||
# Last few reboots
|
||||
#
|
||||
{{.LastTenReboots}}
|
||||
|
||||
################################################################################
|
||||
# EFI Support
|
||||
#
|
||||
{{.EFISupport}}
|
||||
`
|
||||
|
Loading…
Reference in New Issue
Block a user