Posted over 5 years ago. Visible to the public.

Simple memory information widget for the Xfce panel (or anywhere else where you can run a shell command)

I was unsatisfied with the existing memory status applets for the Xfce panel, so I wrote a little shell script that shows me just the information I need. Now I use it via a "Generic Monitor" panel applet.

Put this at some place like ~/bin/memory-info and chmod +x it:

#!/bin/sh meminfo=`free -m | grep 'Mem:'` used=`echo $meminfo | cut -d" " -f3` total=`echo $meminfo | cut -d" " -f2` cached=`echo $meminfo | cut -d" " -f7` really_used=`expr $used - $cached` echo "Memory usage: $really_used / $total (Cached: $cached)"

Next, add a "Generic Monitor" applet to your Xfce panel, fill in the name of the file you just created and set a refresh time that suits you (like 3 seconds). Done.

Once an application no longer requires constant development, it needs periodic maintenance for stable and secure operation. makandra offers monthly maintenance contracts that let you focus on your business while we make sure the lights stay on.

Author of this card:

Arne Hartherz
Last edit:
about 5 years ago
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Arne Hartherz to makandra dev