Files
2dbf09fa64 [MM-66840] Add CPU cores and total memory to Support Packet (#34658)
* [MM-66840] Add CPU cores and total memory to support packet

Add system resource information to support packet diagnostics to help
with troubleshooting and capacity analysis.

* Clarify that memory is in MB

* Add comment clarifying CPU/memory are host values

Clarifies that the CPU cores and total memory values in the support
packet represent the host machine's resources, not any container limits
that may be configured in Docker or Kubernetes environments.

---------

Co-authored-by: Hanzo Dev <[email protected]>
2026-01-13 16:23:32 +01:00

18 lines
584 B
Go

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
//go:build !linux && !darwin
package platform
import "errors"
// ErrMemoryUnsupportedPlatform is returned when memory detection is not supported on the current platform.
var ErrMemoryUnsupportedPlatform = errors.New("total memory detection not supported on this platform")
// getTotalMemory returns the total system memory in bytes.
// On unsupported platforms, this returns an error.
func getTotalMemory() (uint64, error) {
return 0, ErrMemoryUnsupportedPlatform
}