Conky mem to legacymem

Been testing conky memory Variable with free , htop etc. I find that mem is not very accurate 100 mb or three over the actual memory used.

After changing to legacymem the memory used is way more accurate.
mem 900mb or more
legacymem 560 mb same as free & htop.

conky 1.12.2 all versions before have been the same.

From this
${mem} / ${memmax} ${memperc}% | \
To this
${legacymem} / ${memmax} ${memperc}% | \

Happy Days

6 Likes

No one will tell you - can this be fixed in polybar ?

This might answer your question.

https://github.com/polybar/polybar/issues/1137

1 Like

free (used) is accurate. conky/poly/… interpretes it depending on the author’s understanding of “used” in the system.

Yes free -h is the most accurate as it give you the total amount of memory used, not just what the open programs are using like htop.

I like the htop way.

free -h

     total        used        free      shared  buff/cache   available
Mem:  31Gi       865Mi        30Gi        21Mi       411Mi        30Gi     Total = 1.288gb
Swap:  16Gi          0B        16Gi

Or be a man and walk the /proc to calculate the usages yourself XD. Mostly jokes but it’s what they all do and it’s fun to learn.

3 Likes

Thanks for the share.

Thanks, but I already read it. They are still deciding how to do it.

Thanks for the idea!
I did just that, I created a small script, for Polybar, using the free command.

1 Like

Recently on Reddit’s Linux sub, there was a cat who said AntiX was the only disro that worked on his computer, and had issues even still. Never mind that it was an ancient Dell laptop that could barely instruct the resources to render pages in a browser. He had to make shit work with less than 256 mbs of RAM.

It’s like “how can I make Linux work with my cart and horse?”. The only reason to measure where RAM is being tasked in an application, I use a Conky just because the desktop seems empty without it. Why should I switch to another desktop just to see it while in an application? It’s superfluous window dressing. I just like they way it looks, I never depend upon it’s function, because it’s really not about function, but all about design.

My conky serves no purpose beyond looking good (well I think it does anyway). It is a waste of time but I enjoy writing them and tweaking them.

3 Likes

I can’t recall anyone who doesn’t know what a conky is ask me about it when they see one on my desktop. Seriously, like no one. Same goes for even “I use FreeBSD now guy”. Only because he didn’t know what it was lulz.

I like Conky, but what’s funny about it is that like say in MX where it’s readily available without having to build one yourself, what is available is like examples out of an ancient Android or ASUS ROG theme. Like “glazz” theme ancient, and not even in a cool, retro way. There are a few that I like (from people here who have built them and are in the MX/AntiX collection), and the only one that I use is the AntiX default one. Of course this is coming from someone who finds wallpaper unnecessary, only something to distinct from the windows, and even then it’s superfluous.

1 Like

The only time I have ever been asked what my conky was is when they see my Now Playing one with the cover art. Generally people don’t give a hoot. Especially when they are basic like mine, well basic compared to some of those LUA ones over at the BL forum.

1 Like

Care to share it? Should be able to call in conky as well.

1 Like

That’s why I (typically) only use one-line conkyrc with own_window as panel or dock. Put in some color changes so it gets your attention when something happens.

have pretty much abandoned conky for polybar these days.

Back on topic - legacymem looks interesting; may edit some conkyrc files.

5 Likes

everything is simple:

~/.config/polybar/config.ini

[module/mem]
type = custom/script
exec = ~/.config/polybar/scripts/mem
interval = 1

~/.config/polybar/scripts/mem

#!/usr/bin/env bash

memUsed_m=`free -m | grep Mem | awk '{print $3}'`
echo "$memUsed_m""M"

P.S. Actually, as it turned out, the script is not needed. ))

~/.config/polybar/config.ini

[module/mem]
type = custom/script
exec = free -m | grep Mem | awk '{print $3"M"}'
interval = 1
1 Like