Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parsing of free -m for motd generation #228

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

edgar-bonet
Copy link

When logging into a Debian 10 instance, one is greeted with some system information including:

Memory usage:  0.0%
Swap usage:    0.0%

The meters always display 0.0%, irrespective of the actual usage. These numbers are generated in /etc/update-motd.d/50-scw by awk scripts that incorrectly parse parse the output of free -m.

This pull request fixes those scripts. It has been tested on a Debian 10 Scaleway instance and on an Ubuntu 18.04 desktop (tested the parsing of free -m).

Fix the awk scripts used in /etc/update-motd.d/50-scw for parsing
the output of `free -m`. They used to always report "0.0%" memory
and swap usage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant