Skip to content

Added a new 'memwithbuffersperc' variable - #2314

Open
mfluhr wants to merge 1 commit into
brndnmtthws:mainfrom
mfluhr:memwithbuffersperc
Open

Added a new 'memwithbuffersperc' variable#2314
mfluhr wants to merge 1 commit into
brndnmtthws:mainfrom
mfluhr:memwithbuffersperc

Conversation

@mfluhr

@mfluhr mfluhr commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

Description

Added a new 'memwithbuffersperc' variable to get the percentage of memory in use, including memory used by system buffers and caches.

As an Android OS developer, I am rebuilding the AOSP daily, and the build process is heavily multi-threaded, consuming almost all my RAM. Since I want to avoid the oomd killer kicking in, I am closely monitoring RAM usage, not only using mem and memperc, but also memwithbuffers.

Since there is no memwithbuffersperc variable available, I tought this might be a great addition both for completeness and statistics purposes.

The code should not affect existing conky configurations, since it is a new variable addition.
It has been tested locally using the following configuration

[...]
${font DejaVu Sans:bold:size=14}MEMORY ${hr 2}${font}${voffset 8}
${font DejaVu Sans:bold:size=10}RAM${font}${alignc}$mem / $memmax${alignr}${font DejaVu Sans:bold:size=10}$memperc%${font}${voffset 2}
${membar 16}${voffset 4}
${font DejaVu Sans:bold:size=10}BUFFERED${font}${alignc}$memwithbuffers / $memmax${alignr}${font DejaVu Sans:bold:size=10}$memwithbuffersperc%${font}${voffset 2}
${memwithbuffersbar 16}${voffset 4}
${font DejaVu Sans:bold:size=10}SWAP${font}${alignc}${swap} / ${swapmax}${alignr}${font DejaVu Sans:bold:size=10}${swapperc}%${font}${voffset 2}
${swapbar 16}
[...]

@netlify

netlify Bot commented Jan 22, 2026

Copy link
Copy Markdown

Deploy Preview for conkyweb ready!

Name Link
🔨 Latest commit a6d9ca7
🔍 Latest deploy log https://app.netlify.com/projects/conkyweb/deploys/697263e26156e50008a29e12
😎 Deploy Preview https://deploy-preview-2314--conkyweb.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added documentation suggests documentation changes or improvements sources PR modifies project sources labels Jan 22, 2026
@Caellian

Copy link
Copy Markdown
Collaborator

I think it would be better if this was an optional argument for mem and memperc instead of a new variable. You only need to check "-b" in args, so it should be straightforward, and there are plenty of examples ranging from simple to advanced.

@Caellian Caellian added feature suggest addition of new functionality that isn't currently supported in any way text related to `conky.text` variables, their parsing or implementation labels Feb 14, 2026
@mfluhr

mfluhr commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

Ok, I can of course adjust the code in this direction...
...but the $memwithbuffers is already existing (hence my initial design....)

So, if I introduce now a '-b' argument, I think we should also remove the $memwithbuffers, and this would trigger errors in existing configurations. Are you OK with such change?

@mfluhr
mfluhr force-pushed the memwithbuffersperc branch from a6d9ca7 to 3420837 Compare May 26, 2026 08:40
@netlify

netlify Bot commented May 26, 2026

Copy link
Copy Markdown

Deploy Preview for conkyweb canceled.

Name Link
🔨 Latest commit 3420837
🔍 Latest deploy log https://app.netlify.com/projects/conkyweb/deploys/6a155c94141d4800085e6fcf

@github-actions github-actions Bot removed the text related to `conky.text` variables, their parsing or implementation label May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation suggests documentation changes or improvements feature suggest addition of new functionality that isn't currently supported in any way sources PR modifies project sources

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants