/

Memory

Collect and analyze information about the total amount of memory on the machine.


Memory Collector

To collect information about the total amount of memory on the machine in bytes, you can use the memory collector.

Parameters

None.

Example Collector Definition

apiVersion: troubleshoot.sh/v1beta2
kind: SupportBundle
metadata:
  name: memory
spec:
  hostCollectors:
    - memory: {}

Included Resources

The results of the memory collector are stored in the host-collectors/system directory of the support bundle.

memory.json

Example of the resulting JSON file:

{"total":16777601024}

Memory Analyzer

The memory analyzer supports multiple outcomes by validating the total amount of memory. For example:

  • < 32G: Less than 32G of memory was detected.
  • > 4G: More than 4G of memory was detected.

Example Analyzer Definition

apiVersion: troubleshoot.sh/v1beta2
kind: SupportBundle
metadata:
  name: memory
spec:
  hostCollectors:
    - memory: {}
  hostAnalyzers:
    - memory:
        checkName: "Amount of Memory"
        outcomes:
          - fail:
              when: "< 4G"
              message: At least 4G of memory is required, and 8G of memory is recommended
          - warn:
              when: "< 8G"
              message: At least 8G of memory is recommended
          - pass:
              message: The system has at least 8G of memory
Edit on GitHub