gnome-shell-system-monitor-applet icon indicating copy to clipboard operation
gnome-shell-system-monitor-applet copied to clipboard

Feature request: fixed scale for graphs

Open Alexander-Serov opened this issue 7 years ago • 11 comments

Thanks for the great extension! I think it could make even more useful if one could set a fixed scale for some of the indicators. Otherwise, for instance, by just looking at the network indicator filled up, it is hard to understand, whether my network is very fast or very slow. I just see that something is going on.

I understand, this is not on your priority list, but still...

Alexander-Serov avatar Oct 03 '17 17:10 Alexander-Serov

I don't know that I'll have time for this (perhaps someone else can propose a PR), but at least you can use the tool tip for this. Just hovering the mouse on the graph should give you the speed on a pop-over.

franglais125 avatar Oct 03 '17 17:10 franglais125

You are right, that's what I end up doing. But just something to keep in mind...

Alexander-Serov avatar Oct 03 '17 17:10 Alexander-Serov

I came here to ask for the same thing. A fixed scale (or a fixed maximum) would be very useful to see if your system is maxed out or just running steady at a constant level (network speed, disk I/O,...)

AllesMeins avatar May 01 '18 12:05 AllesMeins

I'd like to see this implemented as well. Net is using/defaulting to a scale that is about 50% higher than the maximum speed of my ADSL. As a result, the graph produced only occupies the bottom two thirds and it's hard (nearly impossible) to notice additional information (e.g. errors).

TimP69 avatar May 07 '18 06:05 TimP69

I also would like to see a fixed scale implemented and came here exactly for this. Thanks for the extension.

rbaig avatar May 17 '18 12:05 rbaig

Yeah, I've increasingly realized that the network graph in particular isn't very useful without a fixed scale. I see something, and I often have no idea if it's a lot of traffic, or nearly zero traffic.

NickSto avatar Nov 16 '18 00:11 NickSto

Hi, I found this issue for a similar reason. with a CPU-graph perspective. The CPU graph would also more helpful with a fixed scale: On my computer, the graph uses only half of the graph height and rescales in idle/heavy use cycles. Therefore, it's difficult to tell whether the CPU has been running at high or low capacity. For the CPU graph, it suffices to have the graph maximum at maximum possible CPU freq. No manual scale fixing would be needed if system monitor determines& sets max cpu speed on its own (maybe a ui flag to choose between autoscale/ CPU max scale would be nice).

hnb1 avatar Oct 25 '19 07:10 hnb1

Since obviously nothing is happening to this feature-request, I dug into the code. Turns out a fixed scale is pretty easy to realize as an "ugly hack". But aware, it works for me but I don't know if it will break anything for you. So make a backup before changing any files!

To get a fixed scale you just need to add one line of code to extension.js (located in /home/<YOUE_USERNAME>/.local/share/gnome-shell/extensions/[email protected]/)

Search for const Disk = class SystemMonitor_Disk extends ElementBase { in the file and add one line at the following place:

const Disk = class SystemMonitor_Disk extends ElementBase {
     constructor() {
       super({
             elt: 'disk',
             item_name: _('Disk'),
             color_name: ['read', 'write']
         });
         
         this.max = 60; // <--- ADD THIS LINE HERE. THIS WILL MAX OUT THE DISK-GRAPH AT 60 MB/s 
         
         this.mounts = MountsMonitor.get_mounts();

Of cause you can change the value as you see fit for your system/needs.

You can do the same for the net-graph. Search for const Net = class SystemMonitor_Net extends ElementBase {

const Net = class SystemMonitor_Net extends ElementBase {
    constructor() {
        super({
            elt: 'net',
            item_name: _('Net'),
            color_name: ['down', 'downerrors', 'up', 'uperrors', 'collisions']
        });
        
        this.max = 3000; // <--- ADD THIS LINE HERE. THIS WILL MAX OUT THE NET-GRAPH AT 3 MB/s 
        
        this.speed_in_bits = false;

Save the file and press ALT+F2 in Gnome. Type "r" and press ENTER to reload the extensions.

AllesMeins avatar May 08 '20 15:05 AllesMeins

@AllesMeins This is incredible! Can't believe it was so easy. Thanks so much!

NickSto avatar May 08 '20 19:05 NickSto

Yes! Right now my swap is at 50% but from the graph it seems it is at 100%!

image

core-genomix avatar Apr 28 '23 12:04 core-genomix

@core-genomix That sounds like a bug, as the swap graph does have a fixed scale of 100%. Do you have multiple swap files/partitions perhaps, and it doesn't show that correctly?

ZimbiX avatar Apr 28 '23 14:04 ZimbiX