
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
Manometer screenlet, is a CPU-meter, memory-meter, network-meter and system temperature control with the look and feel of an old manometer (and now modern one too).
The screenlet display CPU, memory, network usage or temperature, depending of the configuration you set. If you want to display CPU, memory, network and temperature, just launch several sessions of the screenlet, and configure each one.
Since temperature timer is set to 10 seconds, when you switch from a temperature sensor to another system information, it may takes a few seconds to update the screenlet.
When selecting what information you want to display, you can choose between all your available temperature sensors, CPU or network cards.
None of the screenlets I tested with temperature support worked for my system (Ubuntu 7.10). I hope this version will work with most of the systems. Please, keep me in touch both if it works or doesn't work.
13 years ago
v0.13:
- fixed a bug with temperature report on some systems
v0.12:
- Bug with display of °C and label, when custom label was set, fixed
V0.11:
- problem with label display fixed
- problem with "%" and "°C" display fixed
V0.10:
- Support for network speed
V0.9:
- Now it's possible to select the font and color for the label, and set the vertical position.
V0.8:
- Support for temperature sensors improved to work with more systems
- Themes Speedometer Green and Speedometer Red improved.
V0.7:
- new monochrome transparent themes in black and white
- support for multi-CPU systems (I hope it works, since I've no multi CPU system to test)
- support for swap usage report
V0.6:
- new speedometer themes
- Temperature system improved to work on more systems
V0.5:
-"°C" is displayed again for temperatures
- New themes
V0.4:
- Background now fits with the size of the screenlet
- It's possible to set your own label. The font is really not nice, but it can be useful
V0.3:
- CPU refresh system improved
- Support for system temperatures for computers with sensors command line program (need lm_sensors)
V0.2:
- Modified the design of manometer
- cpumeter has smoother movements
V0.1: first release
13 years ago
v0.13:
- fixed a bug with temperature report on some systems
v0.12:
- Bug with display of °C and label, when custom label was set, fixed
V0.11:
- problem with label display fixed
- problem with "%" and "°C" display fixed
V0.10:
- Support for network speed
V0.9:
- Now it's possible to select the font and color for the label, and set the vertical position.
V0.8:
- Support for temperature sensors improved to work with more systems
- Themes Speedometer Green and Speedometer Red improved.
V0.7:
- new monochrome transparent themes in black and white
- support for multi-CPU systems (I hope it works, since I've no multi CPU system to test)
- support for swap usage report
V0.6:
- new speedometer themes
- Temperature system improved to work on more systems
V0.5:
-"°C" is displayed again for temperatures
- New themes
V0.4:
- Background now fits with the size of the screenlet
- It's possible to set your own label. The font is really not nice, but it can be useful
V0.3:
- CPU refresh system improved
- Support for system temperatures for computers with sensors command line program (need lm_sensors)
V0.2:
- Modified the design of manometer
- cpumeter has smoother movements
V0.1: first release
Amethyst
10 years ago
The skins are beautiful and varied
Report
Tardigrade31
10 years ago
The sensors are coming as "Core 0" and "Core 1" with a space between the Core and its number.
As a result, the Manometers reports Temperature to be 0 and 1.
I modified the line 414 in the 0.13 version.
Quote:sensor = sensorName[13:].lstrip().split(':')[0]
instead of
Quote:sensor = sensorName[13:].lstrip().split(' ')[0]
If that can help.
Report
dspencer82
11 years ago
Report
mpiermar
11 years ago
maybe because some rows in /proc/meminfo only have 2 values (see below).
ValueError: need more than 2 values to unpack
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/screenlets/__init__.py", line 1825, in expose
self.on_draw(ctx)
File "/home/matt/.screenlets/Manometer/ManometerScreenlet.py", line 152, in on_draw
load = self.get_usedmem()
File "/home/matt/.screenlets/Manometer/ManometerScreenlet.py", line 380, in get_usedmem
(key,value,junk) = x.split(None, 2)
-----
/proc/meminfo:
MemTotal: 3348764 kB
MemFree: 2301912 kB
Buffers: 26120 kB
Cached: 329208 kB
SwapCached: 0 kB
Active: 633892 kB
Inactive: 236532 kB
Active(anon): 523888 kB
Inactive(anon): 4 kB
Active(file): 110004 kB
Inactive(file): 236528 kB
Unevictable: 12 kB
Mlocked: 12 kB
HighTotal: 2489928 kB
HighFree: 1627152 kB
LowTotal: 858836 kB
LowFree: 674760 kB
SwapTotal: 4996132 kB
SwapFree: 4996132 kB
Dirty: 132 kB
Writeback: 0 kB
AnonPages: 515104 kB
Mapped: 88588 kB
Slab: 24168 kB
SReclaimable: 13788 kB
SUnreclaim: 10380 kB
PageTables: 10428 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 6670512 kB
Committed_AS: 1209448 kB
VmallocTotal: 122880 kB
VmallocUsed: 17864 kB
VmallocChunk: 102388 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 135160 kB
DirectMap2M: 774144 kB
Report
avonidas
10 years ago
I managed to fix the Memory/swap meter by patching the python script. (I just copy/pasted from another screenlet, I don't know the first thing about python programming ;-) )
So:
1) Open ManometerScreenlet.py - e.g. with gedit.
2) Search for "def get_usedmem(self):" and replace the function with the following code:
Quote:
def get_usedmem(self):
"""Get used memory"""
meminfo = commands.getoutput('cat /proc/meminfo').splitlines()
mem = {}
for line in meminfo:
if line.startswith('MemTotal'):
mem['total'] = line.split()[1]
elif line.startswith('Cached'):
mem['cached'] = line.split()[1]
elif line.startswith('Buffers'):
mem['buffers'] = line.split()[1]
elif line.startswith('MemFree'):
mem['free'] = line.split()[1]
return int((100*(int(mem['total'])-int(mem['cached']) - int(mem['buffers']) - int(mem['free'])))/int(mem['total']))
3) Search for "def get_usedswap(self):" and replace the function with the following code:
Quote:
def get_usedswap(self):
"""Get used swap memory"""
meminfo = commands.getoutput('cat /proc/meminfo').splitlines()
mem = {}
for line in meminfo:
if line.startswith('SwapTotal'):
mem['SwapTotal'] = line.split()[1]
elif line.startswith('SwapCached'):
mem['SwapCached'] = line.split()[1]
elif line.startswith('SwapFree'):
mem['SwapFree'] = line.split()[1]
return int((100*(int(mem['SwapTotal'])-int(mem['SwapCached']) - int(mem['SwapFree'])))/int(mem['SwapTotal']))
4)Restart manometer screenlet.
Hopefully, the mem & swap meters will display properly this time.
Report
tzizimine
10 years ago
Thank you
-Tziz
Report
Renesis-3
11 years ago
Somebody have the solution ? Because it's really boring to have at configure this at each reboot.
Report
romerotek
12 years ago
when i selects the Ram from the menu the screenlet just vanishes...
Report
tmafcerqueira2
12 years ago
Report
walloo13
12 years ago
Report
igofovi
12 years ago
Report
thecheatah
12 years ago
Fixes:
- Reduced cpu usage by drawing updates only if needle moves more then a noticeable distance.
- Disabled all rendering/computation when Manometer is not mapped (visible)
To the Author: Can you check my work and merge it with yours? Thanks.
Link to the updated code:
http://singhsurma.com/Manometer.tar.gz
Report
youngbu75
12 years ago
But it have big problem.
That is memory leakage.
If you launch this screenlet to monitor memory usage, then you can see that.
Report
thecheatah
12 years ago
You can download the updated code here:
http://singhsurma.com/Manometer.tar.gz
The author can feel free to use the code.
Report
thecheatah
12 years ago
- Smooth Needle movements
- Better CPU usage estimation
- fixed memory leak when using custom text for the gauges.
http://singhsurma.com/Manometer.tar.gz
Report
youngbu75
12 years ago
I don't know how delete my comment.
Report
Whise
13 years ago
Report
walloo13
13 years ago
Report
jeanbapt
13 years ago
Report
walloo13
13 years ago
It should work
Report
plun
13 years ago
Followed this for temperatures
http://www.quietearth.us/articles/2006/09/30/Ubuntu-Sensor-temperature-monitoring-with-lmsensors
Report
zniavre
13 years ago
new themes are nice
still big bravo
and thank you
Report
zniavre
13 years ago
first it's really beautiful and second it works perfectly even temperatures who never worked on my system .
may be few theme to make it diferent could be nice
thank you for your screenlets
Report
davisouzarj
13 years ago
Report
walloo13
13 years ago
Report