[mem][solaris] improve prtconf memory size scraping

Accept uppercase Memory, that's how it appears to be at least in Solaris
11.3 and OpenIndiana oi_151a7.
This commit is contained in:
Ville Skyttä 2021-10-22 18:27:43 +03:00
parent 768c3b1888
commit 093e68cb91
2 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ func zoneName() (string, error) {
return strings.TrimSpace(string(out)), nil
}
var globalZoneMemoryCapacityMatch = regexp.MustCompile(`memory size: ([\d]+) Megabytes`)
var globalZoneMemoryCapacityMatch = regexp.MustCompile(`[Mm]emory size: ([\d]+) Megabytes`)
func globalZoneMemoryCapacity() (uint64, error) {
prtconf, err := exec.LookPath("prtconf")

View File

@ -67,7 +67,7 @@ func zoneName() (string, error) {
return strings.TrimSpace(string(out)), nil
}
var globalZoneMemoryCapacityMatch = regexp.MustCompile(`memory size: ([\d]+) Megabytes`)
var globalZoneMemoryCapacityMatch = regexp.MustCompile(`[Mm]emory size: ([\d]+) Megabytes`)
func globalZoneMemoryCapacity() (uint64, error) {
prtconf, err := exec.LookPath("prtconf")