Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-08-03 04:21:08

eric1234
Member
Registered: 2020-08-03
Posts: 4

How do I get System Load Monitor to show numbers? <Solved>

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

#2 2020-08-03 11:53:43

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: How do I get System Load Monitor to show numbers? <Solved>

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

#3 2020-08-03 20:17:12

eric1234
Member
Registered: 2020-08-03
Posts: 4

Re: How do I get System Load Monitor to show numbers? <Solved>

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

#4 2020-08-03 20:52:18

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: How do I get System Load Monitor to show numbers? <Solved>

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

#5 2020-08-03 21:16:37

eric1234
Member
Registered: 2020-08-03
Posts: 4

Re: How do I get System Load Monitor to show numbers? <Solved>

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

#6 2020-08-03 22:07:03

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: How do I get System Load Monitor to show numbers? <Solved>

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

#7 2020-08-04 00:38:19

eric1234
Member
Registered: 2020-08-03
Posts: 4

Re: How do I get System Load Monitor to show numbers? <Solved>

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

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.014 seconds, 8 queries executed - Memory usage: 546.05 KiB (Peak: 546.89 KiB) ]