You are not logged in.
Hi,
Bit of a newbie here.
How do I get System Load Monitor to display with numbers instead of bars?
Last edited by eric1234 (2020-08-03 21:17:49)
Offline
Hello and welcome to the forums.
The System Load Monitor isn't capable of displaying only numbers. You can achieve something like what you are asking for using the xfce4-genmon-plugin using the sysstat script.
Edit: copy and past the script from the link somewhere on your computer and make it executable. Add the genmon plugin to your panel. Right-click>Properties and configure the plugin as follows:
- Command = /filename/with/path/to/script
- Label (unchecked)
- Period = how often you would like it to refresh
- Font = specify another font to use if not default font
Note: You might need to change the partition in the script (/dev/sda1) to match your root partition.
Last edited by ToZ (2020-08-03 11:56:59)
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
That you so much.
I am not much of a programmer, but I have been able to alter the script to get it to display what I want.
(Mostly)
The only thing I would like to modify now, is the color of the text.
It's in grey, and I would like a bright color.
Any suggestions?
Offline
The genmon plugin supports pango markup. If you change the line that reads:
echo "$ICO_STR<txt> $CPU | $MEMUSAGE | $HD </txt><txtclick>xfce4-taskmanager</txtclick>
...to:
echo "$ICO_STR<txt><span foreground='#ff0000'> $CPU | $MEMUSAGE | $HD </span></txt><txtclick>xfce4-taskmanager</txtclick>
...note the open and close <span> </span> marks. Change the "#ff0000" (rgb value for a colour) to suit and it will change the colour of the text.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thank you so much.
I have it working just like I want it now, thanks to you.
I suppose I should learn to code this sort of thing myself.
I am a bit of an oldster, learned to code in the late '70s, but I never learned modern languages.
This is Python, right?
I really should teach myself Python.
Offline
Actually, its just bash - a shell script.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thanks again for all your help.
In case anybody reading this is curious, here is the final scrip I am using.
It just displays memory used in GB, nothing else, and that's what I wanted.
I don't know how to code bash, but I know enough generic coding, to know how to modify existing code.
#!/bin/bash
# for use with Generic Monitor panel widget
# displays current memory used in GB
# get memory info
MEMTOT=$(cat /proc/meminfo | grep MemTotal | awk '{printf ("% 0.1f", $2/1024000)}')
MEMAVA=$(cat /proc/meminfo | grep MemAvailable | awk '{printf ("%0.1f", $2/1024000)}')
MEMUSED=$(echo "scale=2;($MEMTOT - $MEMAVA)" | bc)
#display the memory
echo "<txt><span foreground='#ff1234'> $MEMUSED GB</span></txt><tool>Memory</tool>"
exit 0
Last edited by eric1234 (2020-08-04 00:45:49)
Offline
[ Generated in 0.014 seconds, 8 queries executed - Memory usage: 546.05 KiB (Peak: 546.89 KiB) ]