This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Where's the code for the Network Monitor desktop widget?

Tags: None
(comma "," separated)
vishalrao
Registered Member
Posts
157
Karma
0
OS
Specifically the area where the upload/download speed is captured and calculated?

I believe I've noticed the download speed displayed (updated every two seconds apparently) spikes at the end of an actual download, so wanted to browse around the code to see if I might be able to figure out anything that can be fixed there to not do that.


"Thou shalt not follow the null pointer for at its end madness and chaos lie."
User avatar
Rog131
Registered Member
Posts
828
Karma
10
Code: Select all
Where's the code for the Network Monitor desktop widget?


KDE code is available from the https://cgit.kde.org

Network Monitor (System Monitor): http://notmart.org/blog/2015/02/getting ... m-monitor/
is part of the plasma-workspace.

Plasma-Workspace is installing: /usr/share/plasma/plasmoids/org.kde.plasma.systemmonitor.net/

More:

Plasma5/QML2/GettingStarted: https://techbase.kde.org/Development/Tu ... ingStarted

KDE TechBase Plasma2/QML2/API: https://techbase.kde.org/Development/Tu ... 2/QML2/API
--> Data engines: https://techbase.kde.org/Development/Tu ... ta_Engines
------> Plasma Dataengine Api: https://api.kde.org/frameworks/plasma-f ... ngine.html
vishalrao
Registered Member
Posts
157
Karma
0
OS
Thanks, have been able to locate the code mostly, can't figure out if that spike is due to KDE/Plasma code (probably not) or whether the issue is somewhere lower level in the networking stack. Anyways, query resolved.


"Thou shalt not follow the null pointer for at its end madness and chaos lie."
vishalrao
Registered Member
Posts
157
Karma
0
OS
Anyhoo, if anyone cares, made a small change to my local copy of net.qml to show speeds in bits per second (like "Mbps" or "Kbps" depending on actual data value) and copied it to ~/.local/share/plasma/plasmoids/org.kde.plasma.systemmonitor.net/ folder structure copied from /usr/share/plasma location, see change here: https://github.com/vjr/plasma-workspace ... 314e6b7c95

Seems easier to me to follow speeds over bits per second rather than the fixed "KiB/s" unit :-)

Also edited Applet.qml (locally only) to change the interval from 2000 to 1000 for me.


"Thou shalt not follow the null pointer for at its end madness and chaos lie."


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell