Reports available RAM percentage on Linux endpoints for real-time memory utilization tracking
This Automox Worklet™ executes a bash command sequence to collect available RAM data from your Linux endpoints and converts it to a percentage value. The Worklet uses the free command to retrieve memory statistics from the Linux kernel, pipes that output through grep and awk to isolate memory values, and calculates the percentage of free memory relative to total system memory capacity.
The result is a simple numerical percentage that outputs to standard output on the endpoint. This data feeds into Automox reporting systems, allowing you to track memory trends across endpoints and set up alerts based on thresholds.
Memory exhaustion is a common cause of application failures, service degradation, and performance bottlenecks on Linux servers. Without visibility into available memory, you cannot predict when resource constraints will impact workloads or take proactive remediation steps.
By monitoring free memory percentage across your endpoint fleet, you can identify memory-constrained systems before they fail, prioritize capacity planning initiatives, and correlate memory pressure with application issues. This Worklet integrates memory monitoring into your broader IT operations dashboard, eliminating the need to SSH into individual systems or parse kernel logs manually.
Evaluation phase: Always exits with code 1, indicating the Worklet is a reporting mechanism rather than an enforcement tool.
Remediation phase: Executes free | grep Mem | awk '{print $4/$2 * 100.0}' to extract free memory (column 4) and total memory (column 2) from the free output, calculates the percentage, and outputs the result.
Linux endpoint with bash shell available
Standard utilities free, grep, and awk (standard on all Linux distributions)
No elevated privileges required
Any Linux distribution (Red Hat, Debian, Ubuntu, SLES, etc.)
When this Worklet runs, it outputs a single numerical value representing the percentage of free memory. For example, if a system has 8 GB total memory and 2 GB free, the output will be 25.0. Automox captures this value and stores it in your compliance and reporting dashboard.
You can create custom dashboards and alerts based on this metric. For instance, you might trigger an alert if free memory drops below 10%, or schedule a report showing the bottom 10 endpoints by available memory. Since this Worklet is marked FixNow compatible, you can also schedule it to run on-demand when investigating performance issues on specific endpoints.
Run this Worklet on a pilot Linux endpoint and review evaluation output for get free memory as percentage.
Confirm Automox activity logs show successful completion and exit code 0.
Verify endpoint state using checks aligned to evaluation script logic, such as exit.
Validate remediation effects from script operations such as free, then rerun evaluation for compliance.
For technical validation, compare endpoint state to the Worklet evaluation logic and remediation flow for get free memory as percentage. This supports repeatable maintenance tasks workflows, faster change control review, and auditable compliance evidence.
Useful script references for this Worklet include evaluation operations such as exit and remediation operations such as free. Use these indicators to verify that endpoint changes match intended policy outcomes.


By submitting this form you agree to our Master Services Agreement and Privacy Policy.
Already have an account? Log in
Consider Worklets your easy button
A Worklet is an automation script, written in Bash or PowerShell, designed for seamless execution on endpoints – at scale – within the Automox platform. Worklet automation scripts perform configuration, remediation, and the installation or removal of applications and settings across Windows, macOS, and Linux.

AUTOMOX + WORKLETS™
Uncover new possibilities with simple, powerful automation.
By submitting this form you agree to our Master Services Agreement and Privacy Policy