Main index > About existing desklets > SystemMonitor

By Jedidiah (Desklet Author), on Mon Mar 28 17:06:05 2005: SystemMonitor.

Post your complaints, questions, and comments about SystemMonitor here...

By falcon_za (User), on Tue Mar 29 03:13:22 2005.

Nice job! looks good on the desktop, shows what's needed, and works out of the box, without any headache. That's why i switched from gdesklets to adesklets, and this desklets confirms it.

Thanks

By jamesdick628 (User), on Tue Mar 29 11:45:47 2005.

I don't understand the idea behind using the logarithmic function for the krell for disk io and network monitoring. From what I see on my computer, this causes the krell to give a very inaccurate representation of the data. For instance, My school's network gives us 11 Mb down and 11 Mb up. So when I am downloading at 150 KBps I am downloading at around 10-15% of my total bandwidth, yet the bar is at about 75%. Why not just use the percentage of current_download_speed/max_down_speed?

By Jedidiah (Desklet Author), on Tue Mar 29 17:10:20 2005.

jamesdick628 wrote:

I don't understand the idea behind using the logarithmic function for the krell for disk io and network monitoring. From what I see on my computer, this causes the krell to give a very inaccurate representation of the data.


It gives a logarithmic representation of the data which is entirely accurate. As long as you think of it as being on a log scale, there aren't any issues. Why use a log scale at all?... see below

jamesdick628 wrote:

For instance, My school's network gives us 11 Mb down and 11 Mb up. So when I am downloading at 150 KBps I am downloading at around 10-15% of my total bandwidth, yet the bar is at about 75%. Why not just use the percentage of current_download_speed/max_down_speed?


If it used just a raw percentage of max up/down speed then if you were downloading at, say 10 k/s (which is a signficant amount of network traffic), then you would have about 1 pixel of krell: it would be completely unnoticeable.

The reason for the logarithmic scale is to ensure that even small amounts of traffic, or low rate disk access show up on the krell letting you see if anything is happening, while still allowing you to track up to the full range available. If you're not happy with it, by all means just edit the code to remove it. I believe it is a good default however.

Jedidiah.

By jamesdick628 (User), on Tue Mar 29 20:06:03 2005.

I actually did edit it and you're right, it's terrible when you don't see any of the traffic. I changed it back. I also realized that the old krell I was using (gkrellm) does that same exact thing. I never thought about it until you mentioned that it was a logarithmic scale.

By mariusm79 (User), on Wed Apr 27 10:22:57 2005: history?.

hi,
I see you are developing nice gadgets and I am looking for replacement for
icewm toolbar. To be precise, your cpu meter is missing the history feature,
i.e. so that I could see what was the cpu load/consumption a few seconds ago.
I also find it very usefull when the cpu consumption is separated into user, system,
nice, I/O wait (like the cpu consumption in top) and is colored differently in history.
If you have not seen the icewm-way of doing it, I strongly suggest to look at it.
I saw similar features in xosview which I use to check memory consumption.

The current cpu consumption bar does not make much sense when the load
is jumping (e.g. OOo is started) and the user has little clue about the processing
and potential bottle-necks: whether its kernel, user process, many I/O operations
or it's simply SETI working nice'ly in the background -- all this information can be
encoded in single colored cpu consumption history bar!

The same could be applied for in/out network traffic,
used/bufferred/cache/free memory allocation.

thanks!

By Ibex (User), on Wed May 25 13:41:18 2005.

I think I've found a bug in SystemMonitor.

When I unmount (and remove) a harddisk, SystemMonitor hides - and I suppose it crashes - after a few seconds. I think that it's because SM can't find the free-space-info anymore about the station.

Next, I can only agree with mariusm79. Historygraphs like in Gkrellm would be (very) nice.

And the last one: I would like to update more than once a second. I'd prefer 1/4 of a second. Is there any way to do this?

By Ibex (User), on Thu May 26 07:39:12 2005.

Hm, I've been working around this morning, and I'm proud to present you my modification to the SystemMonitor.py desklet. My way to thank the whole adesklets-project.

It simply adds a batterymonitor and a temperaturemonitor, based on ACPI. It's tested on a DELL D600 laptop, so maybe it don't work for other systems. But it's the beginning anyway.

Note also that I was too lazy to search for 2 good and smooth icons, so, maybe the writer of SystemMonitor or someone else wants to search for them?

Anyway, here is a screenshot, and below it the modified SystemMonitor.py.

http://users.pandora.be/ibex/SysMon_mod.png
SystemMonitor.py

Feel free to give me your opinion in this thread.
I'd like to ask the programmer of SystemMonitor if it's possible to impelent a second line of text below every graph. It would be nice if it's possible to place the temperature of the CPU directly under "CPU Load xx%", in a smaller lettertype. Or place the remaining load-time under "Battery 50%, charging". You know what I mean :).

---- edit #1

Two bugs found :oops: .
- Cannot display battery when battery is full (crash)
- Cannot display temperature when battery is full due of hiding acpi entry (crash)
But, no worry, the are already fixed 8). The code in the link above is up to date now.

By Ibex (User), on Thu May 26 16:49:23 2005.

And another update of my modification.

Some graphical improvement for the battery indication. Now you can also see the remaining time you can work on you pc, or, if charging, the remaining chargetime. With a nice bar (with a logaritmic schale) ofcourse.
And still no beautifull battery icon :(. Everaldo, would you please make a batteryicon too? :oops:

Next, the code (as in: my own part of it) is mostly rewritten so a minor bug (too intensive command execution -> crash) it past time, and the whole thing runs a bit faster.

The new screenshot:
http://users.pandora.be/ibex/SysMon_mod2.png

And the currect sourcecode:
SystemMonitor.py

Feel free to give your opinion :).

By Ibex (User), on Fri May 27 03:39:54 2005.

And again, another update.

Some code (again as in: my part of it) improvements. The code is more robust and will not cause a crash anymore (I hope so).

But, the downside of the story; I've found a bug, and it's quite hard to fix it. It's cause by incomplete information from the ACPI-daemon. When plugging the laptop on AC, there is no battery-information for about 5 seconds. If SystemMonitor checks the battery-state in that 5 seconds, it will suppose the battery is full, and the laptop is running from AC. That because when the battery is actually full, the ACPI-daemon don't give battery information anymore.
So, I have to "remember" the previous batterystate in every check and look if it's possible to have a full charged battery. In case the AC-adapter is just plugged in.

Anyway, I continue programming. Maybe I'll find a solution.

---- edit;

Oh, and a message to the author of SystemMonitor.
It would be likely to have a second textline per krell. And one with a separate configurable fontsize. It would be nice if I could put the CPU temperature right below the CPU Load in a smaller fontsize. The same for the remaining (un)loadtime for a battery, so I can pul all batterys in the monitor wihout an overload of 2 krells per battery.

By Jedidiah (Desklet Author), on Sun May 29 12:08:47 2005: Further SystemMonitor developments.

Sorry for the slow reply, but I've mostly been busy with other things. I've seen a few requests for CPU history - while that's a nice idea, it's not something I am personally interested in. There are other desklets in development doing CPU hisyory, so perhaps you could try those? Updates are every second because that's what adesklets does - I know of no way to make more frequent updates. Much more frequent and you'll have some CPU load issues anyway - it was hard enough to get a low enough CPU use from the desklet as it is.

With regard to the mount/unmount bug - yes, sorry about that - it wasn't designed to handle dynamic systems like that, but I should have added some defensive code to handle that...

Which brings me to my main point - I see someone has been doing some good and interesting work on SystemMonitor adding some new panels (which I always expected to happen, the code was designed to make such things easy). Unfortunately I, personally, have other things taking up my time now, and can't really maintain new additions to SystemMonitor - particularly things like the request for multiple lines of text (not hard to do I shouldn't think). The code is there though, and I strongly suggest that anyone interested in working with it feel free to take over the project.

Jedidiah.

By jaspal kallar (User), on Thu Jun 2 13:20:59 2005: SystemMonitor, ZeroDivisionError using udev.

Hi,
I have been using with success SystemMonitor-0.1.2 with adesklets-0.4.8 on Gentoo. However, I went over to udev instead devfd and now when I do

Code:

./SystemMonitor.py
I get a crash, the trace as follows:

Code:

jas@linux:~/downloads/adesklets/SystemMonitor-0.1.2> ./SystemMonitor.py
Traceback (most recent call last):
  File "./SystemMonitor.py", line 986, in ?
    EventHandler(dirname(__file__)).pause()
  File "./SystemMonitor.py", line 853, in __init__
    adesklets.Events_handler.__init__(self)
  File "/usr/lib/python2.3/site-packages/adesklets/events_handler.py", line 157, in __init__
    self.ready()
  File "./SystemMonitor.py", line 898, in ready
    self.run_display()
  File "./SystemMonitor.py", line 962, in run_display
    meter.display()
  File "./SystemMonitor.py", line 521, in display
    self.update()
  File "./SystemMonitor.py", line 547, in update
    __krell_value, __text_value = self.getMeterValues()
  File "./SystemMonitor.py", line 826, in getMeterValues
    krell_value.append(float(partition_stats["used"])/partition_stats["size"])
ZeroDivisionError: float division



I wonder if this could be related to something missing after upgrade to udev i.e something is missing from /dev ?

Just to mention that the actual SystemMonitor does appear but then it crashes with the above.

Other adesklets such aanetmon and acpumon work.

the config file I use, which worked before is

Code:


id1 = {'background colour': (210, 210, 210, 130),
 'background images': ['images/shared/bg_top.png',
                       'images/shared/bg_middle.png',
                       'images/shared/bg_bottom.png'],
 'meters': [('CPUMeter',
             {'horizontal padding': 8,
              'icon': 'images/icons/cpu.png',
              'krell': 'images/shared/krell.png',
              'meter font name': 'VeraBd',
              'meter font size': 8,
              'trough': 'images/shared/trough.png',
              'vertical padding': 8}),
            ('MemoryMeter',
             {'horizontal padding': 8,
              'icon': 'images/icons/memory.png',
              'krell': 'images/shared/krell.png',
              'meter font name': 'VeraBd',
              'meter font size': 8,
              'trough': 'images/shared/trough.png',
              'update speed': 10,
              'vertical padding': 8}),
            ('SwapMeter',
             {'horizontal padding': 8,
              'icon': 'images/icons/swap.png',
              'krell': 'images/shared/krell_blue.png',
              'meter font name': 'VeraBd',
              'meter font size': 8,
              'trough': 'images/shared/trough.png',
              'update speed': 30,
              'vertical padding': 8}),
            ('NetworkMeter',
             {'horizontal padding': 8,
              'icon': 'images/icons/network.png',
              'interface name': 'eth0',
              'krell': ['images/shared/krell_green_small.png',
                        'images/shared/krell_red_small.png'],
              'max down speed': 400,
              'max up speed': 80,
              'meter font name': 'Vera',
              'meter font size': 7,
              'trough': 'images/shared/trough_small.png',
              'update speed': 2,
              'vertical padding': 4}),
('DiskIOMeter',
             {'disk name': 'hda',
              'horizontal padding': 8,
              'icon': 'images/icons/disk.png',
              'krell': ['images/shared/krell_green_small.png',
                        'images/shared/krell_red_small.png'],
              'max read speed': 10240,
              'max write speed': 10240,
              'meter font name': 'Vera',
              'meter font size': 7,
              'trough': 'images/shared/trough_small.png',
              'update speed': 2,
              'vertical padding': 4}),
            ('DiskSpaceMeter',
             {'horizontal padding': 8,
              'icon': 'images/icons/diskfree.png',
              'krell': 'images/shared/krell_blue_small.png',
              'meter font name': 'Vera',
              'meter font size': 6,
              'trough': 'images/shared/trough_small.png',
              'update speed': 60,
              'vertical padding': 2})],
 'text colour': (0, 0, 0, 200),
 'update speed': 1}




If you require more info let please let me know

Jaspal.

By syfou (Core Developer & Desklet Author), on Thu Jun 2 14:16:18 2005.

jaspal kallar wrote:


I get a crash, the trace as follows: [...]

Code:


 File "./SystemMonitor.py", line 826, in getMeterValues
    krell_value.append(float(partition_stats["used"])/partition_stats["size"])
ZeroDivisionError: float division 



I saw something similar in another forum a while ago, along with a "temporary" fix; I hope this helps a bit.

By jaspal kallar (User), on Thu Jun 2 17:58:38 2005.

Great syfou!! It works and it was in the Gentoo forums (I'm use Gentoo) which I never thought about looking at.

/Jaspal.

By Noobuntu (User), on Mon Jun 27 13:18:18 2005: Systemmonitor does not start.

Hi!
Cool desklet! Looks better than any of the Gdesklets available for system monitoring.
Pity that it does not work for me. Here is what I obtain when i run it for the first time:

Code:

Traceback (most recent call last):
  File "./SystemMonitor.py", line 986, in ?
    EventHandler(dirname(__file__)).pause()
  File "./SystemMonitor.py", line 853, in __init__
    adesklets.Events_handler.__init__(self)
  File "localstore/theorie/arrizaba/lib/python2.3/site-packages/adesklets/events_handler.py", line 157, in __init__  File "./SystemMonitor.py", line 883, in ready
    self.meters[-1].create((8,tmp_height), self.basedir, meter[1])
  File "./SystemMonitor.py", line 585, in create
    AbstractMeter.create(self, location, basedir, config_dictionary)
  File "./SystemMonitor.py", line 439, in create
    self._create_fonts(config_dictionary)
  File "./SystemMonitor.py", line 288, in _create_fonts
    self._meter_font = adesklets.load_font(self._meter_font_name + "/" + \
  File "/localstore/theorie/arrizaba/lib/python2.3/commands.py", line 706, in load_font
     
  File "localstore/theorie/arrizaba/lib/python2.3/site-packages/adesklets/commands_handler.py", line 103, in out
adesklets.error_handler.ADESKLETSError: adesklets command error - font 'VeraBd/8' could not be loaded



Any help? I tried changing the font just to Vera and did not help... :cry:

By J?d (User), on Mon Jul 4 08:06:10 2005.

Have got the font installed...? On debian use:

apt-get install ttf-bitstream-vera

By Jedidiah (Desklet Author), on Fri Jul 15 20:09:38 2005: New SystemMonitor.

I finally got some spare time again, so I've managed a small update. SystemMonitor now includes meters for CPU temperature and battery status via ACPI. The ACPI meters are suitably subclassed so it should be easy to make more meters to read anything else out of the /proc/acpi filesystem that people might be interested in.

Also included are some minor bug fixes and robustness - SystemMonitor should now give "read failure" instead of crashign when it hits a problem reading/calcuating data.

Thanks.

Jedidiah.

By andrewski (User), on Wed Jul 20 20:54:03 2005.

I've commented out all temp/battery meters, but I'm getting this error:

Code:

Traceback (most recent call last):
  File "SystemMonitor.py", line 1107, in ?
    EventHandler(dirname(__file__)).pause()
  File "SystemMonitor.py", line 974, in __init__
    adesklets.Events_handler.__init__(self)
  File "/usr/lib/python2.4/site-packages/adesklets/events_handler.py", line 157, in __init__
    self.ready()
  File "SystemMonitor.py", line 1004, in ready
    self.meters[-1].create((8,tmp_height), self.basedir, meter[1])
  File "SystemMonitor.py", line 918, in create
    info = self.parseFile(self.info_file)
  File "SystemMonitor.py", line 899, in parseFile
    acpi_file = open(file, "r")
IOError: [Errno 2] No such file or directory: '/proc/acpi/battery/BAT0/info'

Here's my config.txt, FWIW:

Code:

id0 = {
        'background colour': (210, 210, 210, 130),
        'background images': [
                                                'images/shared/bg_top.png',
                                                'images/shared/bg_middle.png',
                                                'images/shared/bg_bottom.png'
                                                ],
        'meters': [
                        ('CPUMeter', {
                                'horizontal padding': 8,
                                'icon': 'images/icons/cpu.png',
                                'krell': 'images/shared/krell.png',
                                'meter font name': 'VeraBd',
                                'meter font size': 8,
                                'trough': 'images/shared/trough.png',
                                'vertical padding': 8
                        }),
                        ('MemoryMeter', {
                                'horizontal padding': 8,
                                'icon': 'images/icons/memory.png',
                                'krell': 'images/shared/krell.png',
                                'meter font name': 'VeraBd',
                                'meter font size': 8,
                                'trough': 'images/shared/trough.png',
                                'update speed': 10,
                                'vertical padding': 8
                        }),
                        ('SwapMeter', {
                                'horizontal padding': 8,
                                'icon': 'images/icons/swap.png',
                                'krell': 'images/shared/krell_blue.png',
                                'meter font name': 'VeraBd',
                                'meter font size': 8,
                                'trough': 'images/shared/trough.png',
                                'update speed': 30,
                                'vertical padding': 8
                        }),
                        ('NetworkMeter', {
                                'horizontal padding': 8,
                                'icon': 'images/icons/network.png',
                                'interface name': 'eth0',
                                'krell': ['images/shared/krell_green_small.png',
                                                  'images/shared/krell_red_small.png'],
                                'max down speed': 400,
                                'max up speed': 80,
                                'meter font name': 'Vera',
                                'meter font size': 7,
                                'trough': 'images/shared/trough_small.png',
                                'update speed': 2,
                                'vertical padding': 4
                        }),
                        ('DiskIOMeter', {
                                'disk name': 'hda',
                                'horizontal padding': 8,
                                'icon': 'images/icons/disk.png',
                                'krell': ['images/shared/krell_green_small.png',
                                                  'images/shared/krell_red_small.png'],
                                'max read speed': 10240,
                                'max write speed': 10240,
                                'meter font name': 'Vera',
                                'meter font size': 7,
                                'trough': 'images/shared/trough_small.png',
                                'update speed': 2,
                                'vertical padding': 4
                        }),
                        ('DiskSpaceMeter', {
                                'horizontal padding': 8,
                                'icon': 'images/icons/diskfree.png',
                                'krell': 'images/shared/krell_blue_small.png',
                                'meter font name': 'Vera',
                                'meter font size': 6,
                                'trough': 'images/shared/trough_small.png',
                                'update speed': 60,
                                'vertical padding': 2
                        })]}
                        

id1 = {'background colour': (210, 210, 210, 130),
 'background images': ['images/shared/bg_top.png',
                                           'images/shared/bg_middle.png',
                                           'images/shared/bg_bottom.png'],
 'meters': [('CPUMeter',
                         {'horizontal padding': 8,
                          'icon': 'images/icons/cpu.png',
                          'krell': 'images/shared/krell.png',
                          'meter font name': 'VeraBd',
                          'meter font size': 8,
                          'trough': 'images/shared/trough.png',
                          'vertical padding': 8}),
                        ('MemoryMeter',
                         {'horizontal padding': 8,
                          'icon': 'images/icons/memory.png',
                          'krell': 'images/shared/krell.png',
                          'meter font name': 'VeraBd',
                          'meter font size': 8,
                          'trough': 'images/shared/trough.png',
                          'update speed': 10,
                          'vertical padding': 8}),
                        ('SwapMeter',
                         {'horizontal padding': 8,
                          'icon': 'images/icons/swap.png',
                          'krell': 'images/shared/krell_blue.png',
                          'meter font name': 'VeraBd',
                          'meter font size': 8,
                          'trough': 'images/shared/trough.png',
                          'update speed': 30,
                          'vertical padding': 8}),
                        ('NetworkMeter',
                         {'horizontal padding': 8,
                          'icon': 'images/icons/network.png',
                          'interface name': 'eth0',
                          'krell': ['images/shared/krell_green_small.png',
                                                'images/shared/krell_red_small.png'],
                          'max down speed': 400,
                          'max up speed': 80,
                          'meter font name': 'Vera',
                          'meter font size': 7,
                          'trough': 'images/shared/trough_small.png',
                          'update speed': 2,
                          'vertical padding': 4}),
                        ('DiskIOMeter',
                         {'disk name': 'hda',
                          'horizontal padding': 8,
                          'icon': 'images/icons/disk.png',
                          'krell': ['images/shared/krell_green_small.png',
                                                'images/shared/krell_red_small.png'],
                          'max read speed': 10240,
                          'max write speed': 10240,
                          'meter font name': 'Vera',
                          'meter font size': 7,
                          'trough': 'images/shared/trough_small.png',
                          'update speed': 2,
                          'vertical padding': 4}),
                        ('DiskSpaceMeter',
                         {'horizontal padding': 8,
                          'icon': 'images/icons/diskfree.png',
                          'krell': 'images/shared/krell_blue_small.png',
                          'meter font name': 'Vera',
                          'meter font size': 6,
                          'trough': 'images/shared/trough_small.png',
                          'update speed': 60,
                          'vertical padding': 2}),
],
 'text colour': (0, 0, 0, 200),
 'update speed': 1}
id20 = {'background colour': (210, 210, 210, 130),
 'background images': ['images/shared/bg_top.png',
                                           'images/shared/bg_middle.png',
                                           'images/shared/bg_bottom.png'],
 'meters': [('CPUMeter',
                         {'horizontal padding': 8,
                          'icon': 'images/icons/cpu.png',
                          'krell': 'images/shared/krell.png',
                          'meter font name': 'VeraBd',
                          'meter font size': 8,
                          'trough': 'images/shared/trough.png',
                          'vertical padding': 8}),
                        ('MemoryMeter',
                         {'horizontal padding': 8,
                          'icon': 'images/icons/memory.png',
                          'krell': 'images/shared/krell.png',
                          'meter font name': 'VeraBd',
                          'meter font size': 8,
                          'trough': 'images/shared/trough.png',
                          'update speed': 10,
                          'vertical padding': 8}),
                        ('SwapMeter',
                         {'horizontal padding': 8,
                          'icon': 'images/icons/swap.png',
                          'krell': 'images/shared/krell_blue.png',
                          'meter font name': 'VeraBd',
                          'meter font size': 8,
                          'trough': 'images/shared/trough.png',
                          'update speed': 30,
                          'vertical padding': 8}),
                        ('NetworkMeter',
                         {'horizontal padding': 8,
                          'icon': 'images/icons/network.png',
                          'interface name': 'eth0',
                          'krell': ['images/shared/krell_green_small.png',
                                                'images/shared/krell_red_small.png'],
                          'max down speed': 400,
                          'max up speed': 80,
                          'meter font name': 'Vera',
                          'meter font size': 7,
                          'trough': 'images/shared/trough_small.png',
                          'update speed': 2,
                          'vertical padding': 4}),
                        ('DiskIOMeter',
                         {'disk name': 'hda',
                          'horizontal padding': 8,
                          'icon': 'images/icons/disk.png',
                          'krell': ['images/shared/krell_green_small.png',
                                                'images/shared/krell_red_small.png'],
                          'max read speed': 10240,
                          'max write speed': 10240,
                          'meter font name': 'Vera',
                          'meter font size': 7,
                          'trough': 'images/shared/trough_small.png',
                          'update speed': 2,
                          'vertical padding': 4})],
 'text colour': (0, 0, 0, 200),
 'update speed': 1}
id21 = {'background colour': (210, 210, 210, 130),
 'background images': ['images/shared/bg_top.png',
                                           'images/shared/bg_middle.png',
                                           'images/shared/bg_bottom.png'],
 'meters': [('DiskSpaceMeter',
                         {'horizontal padding': 8,
                          'icon': 'images/icons/diskfree.png',
                          'krell': 'images/shared/krell_blue_small.png',
                          'meter font name': 'Vera',
                          'meter font size': 6,
                          'trough': 'images/shared/trough_small.png',
                          'update speed': 60,
                          'vertical padding': 2}),
],
 'text colour': (0, 0, 0, 200),
 'update speed': 1}

By Jedidiah (Desklet Author), on Thu Jul 21 19:25:02 2005.

This would seem to be a problem with adesklets not picking up the configuration in the file and instead generating a new configuration - this could be due to id issues (I notice you have an id21 in there) which I'm not so knowledgeable about - perhaps someone else could make some suggestions as to what's going on there.

As a brutal but effective solution to your problem: you can edit the configuration in the python script itself, and force it to not use the battery or temperature meters - simply open up SystemMonitor.py in your favourite editor, and go to the section starting with

Code:


    cfg_default = {



And edit the configuration that follows, removing the temperature and bettery meters.

Hopefully someone with more knowledge on the goings on of how adeskelts decides which id# to use can suggest a more elegant fix.

Jedidiah.

By syfou (Core Developer & Desklet Author), on Thu Jul 21 21:06:03 2005.

Jedidiah wrote:


This would seem to be a problem with adesklets not picking up the configuration in the file and instead generating a new configuration - this could be due to id issues (I notice you have an id21 in there) which I'm not so knowledgeable about - perhaps someone else could make some suggestions as to what's going on there.

About everytime I saw this, it is due to people failing to call the desklet appropriately at some point in time, ending up with duplicates or unused configuration. As always, the solution to this is to follow the indication given in adesklets' documentation (chapter 4, or see the FAQ).

Jedidiah wrote:


As a brutal but effective solution to your problem: you can edit the configuration in the python script itself, and force it to not use the battery or temperature meters - simply open up SystemMonitor.py in your favourite editor, and go to the section starting with

What a bad idea. :-) Just call the desklet appropriately so that the proper configuration is used, and this will not ever be needed.

By andrewski (User), on Thu Jul 21 21:55:18 2005.

Actually, the problem was that, though the desklet failed to load (ACPI problems), it was still added to my ~/.adesklets. This doesn't seem intuitive.

Anyway, I was able to figure out the problem a little while ago. Turns out editing was the way to go: I deleted the config.txt and modified the .adesklets file just to load one. That's it. I hadn't realized that all of that was happening behind the scenes despite the apparent lack of loading.

By syfou (Core Developer & Desklet Author), on Fri Jul 22 15:34:48 2005.

andrewski wrote:


Actually, the problem was that, though the desklet failed to load (ACPI problems), it was still added to my ~/.adesklets. This doesn't seem intuitive.

I aggree... Not registering (or unregistering) a failing desklet would be better in this case. The problem is it cannot be implemented reliably since transcient errors would also cause desklets to get unregistered. This is why I choose never to unregister any desklet without the explicit action of the user.

By jon86 (User), on Sat Aug 6 14:40:10 2005.

Is it possible to get the temperature monitor to work using I2C in /sys ? I can't get ACPI temperature working on my Gentoo AMD64 install but I2C works fine. I can readout my CPU temperature using "cat /sys/devices/platform/i2c-0/0-0290/temp3_input", granted it's multiplied by 1000, it's still the correct CPU temperature, according to

Code:

jon@jon_gentoo ~ $ sensors


I am afraid to say I am not familiar with python or api's for adesklets.

By syfou (Core Developer & Desklet Author), on Sat Aug 6 16:32:00 2005.

It should be pretty straightforward. Basically, what you need to do is to alter the getMeterValues from the TemperatureMeter class. It is not more than two to five lines to rewrite for a quick yet functionnal hack.

I am myself not sure of the exact format of your /sys/devices/platform/i2c-0/0-0290/temp3_input file; assuming it contains a single textual representation of an integer or floating point value that has to be multiplied by 1000, I guess the method should look something like:

Code:


def getMeterValues(self):
        text_value = '%.1f' % float(file(self.file).read().strip())*1000
        krell_value = float(text_value)/self.max_temp
        
        return [krell_value,], [text_value,]



Of course, you also need to set up a configuration file matching your system (correct file and max_temp parameters). Yours,

By jon86 (User), on Sat Aug 6 19:18:32 2005.

Thank you for your swift response. I really wish I had experience with Python... my experience lies in Java. :(

I get the following error...

Quote:


unsupported operand type(s) for /: 'str' and 'int'


From guessing (and Googling), I think it's something about maybe trying to parse a String as an integer or vise-versa but I really don't know.

The value I get from

Code:


jon@jon_gentoo ~ $ cat /sys/devices/platform/i2c-0/0-0290/temp3_input


is the temperature multiplied by 1000 (I changed this in the method you gave).


EDIT: I have made one or two alterations and can get the desklet to output what it gets given (i.e. the temperature multiplied by 1000 but can't seem to divide by 1000 without getting the aforementioned error... :/)

Code:


    def getMeterValues(self):
        read_value = file(self.file).read().strip()      
        text_value = '%.1f' % float(read_value)
        krell_value = float(text_value)/self.max_temp

        return [krell_value,], [text_value,]



EDIT2: I fixed it! :)
I realised that it was trying to divide the number read by a string containing 1000, as opposed to the number 1000. I created a variable containing 1000 as a float and divided the read value by the float. :D - Sorry... I am quite glad I figured out some simple Python and fixed it. I have never really written any Python before. :)

Code:


def getMeterValues(self):
        read_value = float(file(self.file).read().strip())     
        divide_no = float(1000)
        text_value = '%.1f' % (read_value/divide_no)
        krell_value = float(text_value)/self.max_temp

        return [krell_value,], [text_value,]



Thanks to the developer of this desklet. It's great! :)

By syfou (Core Developer & Desklet Author), on Sat Aug 6 19:56:02 2005.

jon86, if you already know a language like java, you could be programming fluently in Python in only a few hours of self-teaching (and this is not even an overstatement ;-)).

Anyway, I made a operator priority error in my previous expression. Hopefully, this should work better (this time, I tested the code successfully on a simulated entry):

Code:


def getMeterValues(self):
        text_value = '%.1f' % \
                     (float(file(self.file).read().strip()) / 1000)
        krell_value = float(text_value)/self.max_temp
        
        return [krell_value,], [text_value,] 


Yours,

[EDIT]
Your rectified code is fine, but you could have written as well:

Code:


def getMeterValues(self):
        read_value = float(file(self.file).read().strip())
        text_value = '%.1f' % (read_value/1000)
        krell_value = float(text_value)/self.max_temp

        return [krell_value,], [text_value,] 


Python is a dynamic language -- all objects can be created on the fly. In fact, you could have gone a step further and just write:

Code:


def getMeterValues(self):
        read_value = float(file(self.file).read().strip())
        return ['%.1f' % (read_value/1000)], [read_value/self.max_temp]


But it is less readable this way. Anyway, I am glad your problem is now fixed.

By jon86 (User), on Tue Aug 9 14:27:19 2005.

Hi again.

I've trying to add '?C' to the temperature sensor output and am not having much success. I have found that

Code:


suffix = chr(176) + "C"
print (suffix)


results in '?C' being printed to the terminal but it does not display on the desklet when I try something like the following,

Code:


...
krell_value = krell_value_before_divide/self.max_temp
suffix = chr(176) + "C"
text_value = str(text_value_number) + suffix

return [krell_value,], [text_value,]


and I don't get any errors when I just try the desklet by calling the python script directly.

Is there any possible way to fix that?

Many thanks,
Jon

By syfou (Core Developer & Desklet Author), on Tue Aug 9 20:20:47 2005.

jon86,

look for the explanations on internationalization support in the official documentation. The degree sign is not part of 7-bit ASCII (176 > 2^7): It is not enough having Python decoding your input right, you also need to notify the adesklets interpreter you wish to use some extended charset (latin1 or a super-set like Unicode in this case). If you don't, the graphic text outputs will most likely be truncated at the first occurrence of such an extended character, like the degree sign.

If everything is rightly configured in your system (again: see the documentation in case of problems), making this work is as simple as specifying something like:

Code:


# -*- coding: ISO-8859-1 -*-


at the very top of the desklet's configuration file. Alternatively, you could call the adeslets.set_charset() command from the code. Yours,

By frary (User), on Wed Aug 10 05:31:37 2005.

Hi Guys,

very nice work, the monitor itself and the i2c hack....thanx for that.
As I want the whole thing transparent, I edited the icons and background to be completely transparent --> invisible. Is it possible to use something like background = False and icon = False in the config instead?

Yours

T

By Jedidiah (Desklet Author), on Thu Aug 11 12:04:36 2005.

It isn't possible to use

icon=False

or similar currently - I would expect that to cause the desklet to crash. You can create a simple 1x1 transparent png and set all the backgrounds and icons to be that in a theme (see the example theme packaged up to see how such things work). That would probably be the easiest and cleanest way, and would make your chnge most easily shareable.

Jedidiah

By Jedidiah (Desklet Author), on Thu Aug 11 12:13:41 2005.

It isn't possible to use

icon=False

or similar currently - I would expect that to cause the desklet to crash. You can create a simple 1x1 transparent png and set all the backgrounds and icons to be that in a theme (see the example theme packaged up to see how such things work). That would probably be the easiest and cleanest way, and would make your change most easily shareable.

Jedidiah

By frary (User), on Thu Aug 11 20:03:29 2005.

That is, what I did yesterday. The 1x1 icon thing.
Nice Idea making transparent theme, maybe I`ll do one.

Now the monitor looks like I wanted it. Maybe I will play around with gimp and try some background with a glass effekt....

Thanx for spending your time on brightening my desktop and for replying...

T

By dyeu (User), on Sun Sep 18 13:10:06 2005.

Hello,

When I use the battery monitor, I get the following error:

Code:

...
  File "./SystemMonitor.py", line 945, in create
    info = self.parseFile(self.info_file)
  File "./SystemMonitor.py", line 905, in parseFile
    [key, value] = split(":\s+", line)
ValueError: unpack list of wrong size


This is because my info_file (/proc/acpi/battery/BAT0/info) contains a null value:

Code:

...
battery type:            LION
OEM info:                



The split call in line 905 (version 0.1.3) should be embedded in a try statement.

Since I don't know python, I'm not sure what the "clean" way to do this is. The interpreter keeps complaining I do ugly things.

By sponge (User), on Sun Oct 2 23:30:21 2005.

I was having trouble with the memory display (it would be way off... I don't know which numbers libstatgrab uses, but applications would terminate and release their memory but the meter would stay up), so I went ahead and patched it to my liking. I don't know if this will work on anything but GNU/Linux as it relys directly on /proc/meminfo, but hey, it works for me. :)

Anyways, I created a module called 'memstat' and messed around with the SystemMonitor.py file. If you're interested in using this patch, you'll need to create a file memstat.py in the same directory as the desklet with the following contents:

Code:

#memstat
#return dictionary containing:
#Total, Free, (in) Cache, Buffered

def get():
        stats = parse()
        stats = int_conv(stats)
        stats = mb_conv(stats)
        return stats

def int_conv(stats):
        for x, y in stats.iteritems():
                stats[x] = int(y)
        return stats

def mb_conv(stats):
        for x, y in stats.iteritems():
                stats[x] = y / 1024
        return stats

def parse():
        raw_stats, stats = dict(), dict()
        for x in open('/proc/meminfo').readlines():
                if 'MemTotal:' in x:
                        raw_stats['total'] = x
                elif 'MemFree:' in x:
                        raw_stats['free'] = x
                elif 'Cached:' in x and 'Swap' not in x:
                        raw_stats['cache'] = x
                elif 'Buffers:' in x:
                        raw_stats['buffers'] = x
        for index, value in raw_stats.iteritems():
                chars, val = list(value), str()
                for x in value:
                        if not x.isdigit():
                                chars.remove(x)
                for x in chars:
                        val += x
                stats[index] = val
        return stats


and apply the following patch to the desklet:

Code:

--- SystemMonitor.py.old        2005-10-02 22:28:25.000000000 -0500
+++ SystemMonitor.py    2005-10-01 11:32:14.000000000 -0500
@@ -40,7 +40,7 @@
 """
 
 import adesklets
-import statgrab
+import statgrab, memstat
 
 from os import getenv, system
 from os.path import join, dirname
@@ -655,11 +655,15 @@
             
     
     def getMeterValues(self):
-        mem_stats = statgrab.sg_get_mem_stats()
-        krell_value = float(mem_stats["total"] - mem_stats["free"] - 
-                          mem_stats["cache"])/float(mem_stats["total"])
-        text_value = str(int((mem_stats["free"] + mem_stats["cache"])/(1024.0**2))) + "M Free"
-        
+        #mem_stats = statgrab.sg_get_mem_stats()
+        #krell_value = float(mem_stats["total"] - mem_stats["free"] - 
+        #                  mem_stats["cache"])/float(mem_stats["total"])
+        #text_value = str(int((mem_stats["free"] + mem_stats["cache"])/(1024.0**2))) + "M Free"
+        mem_stats = memstat.get()
+       total, free = mem_stats['total'], mem_stats['free']
+       cache, buffers = mem_stats['cache'], mem_stats['buffers']
+       krell_value = float(total - free - cache - buffers) / float(total)
+       text_value = str(int(free + cache + buffers)) + 'M Free'
 #        assert type(krell_value) is float and \
 #            krell_value >= 0 and krell_value <= 1
 #        assert len(text_value) > 1 and len(text_value) <= 12


I hope someone finds this useful. :)

By Borromini (User), on Sun Oct 16 19:17:29 2005.

I just installed aDesklets on my box. I can the Calendar and weatherforecast desklets just fine, but when I try to run Systemmonitor (testing), I get the following output:

Code:

stijn[SystemMonitor-0.1.3]$ ./SystemMonitor.py 
Do you want to (r)egister this desklet or to (t)est it? t
Now testing...
============================================================
If you do not see anything (or just an initial flicker
in the top left corner of your screen), try `--help',
and see the FAQ: `info adesklets'.
============================================================
Traceback (most recent call last):
  File "./SystemMonitor.py", line 1107, in ?
    EventHandler(dirname(__file__)).pause()
  File "./SystemMonitor.py", line 974, in __init__
    adesklets.Events_handler.__init__(self)
  File "/usr/lib/python2.4/site-packages/adesklets/events_handler.py", line 157, in __init__
    self.ready()
  File "./SystemMonitor.py", line 1004, in ready
    self.meters[-1].create((8,tmp_height), self.basedir, meter[1])
  File "./SystemMonitor.py", line 918, in create
    info = self.parseFile(self.info_file)
  File "./SystemMonitor.py", line 899, in parseFile
    acpi_file = open(file, "r")
IOError: [Errno 2] No such file or directory: '/proc/acpi/battery/BAT0/info'



Now about the IOError I could do something - I use a desktop so there's no such directory. I disabled all the concerning entries, and test the script again:

Code:

stijn[SystemMonitor-0.1.3]$ ./SystemMonitor.py 
Do you want to (r)egister this desklet or to (t)est it? t
Now testing...
============================================================
If you do not see anything (or just an initial flicker
in the top left corner of your screen), try `--help',
and see the FAQ: `info adesklets'.
============================================================
Traceback (most recent call last):
  File "./SystemMonitor.py", line 1107, in ?
    EventHandler(dirname(__file__)).pause()
  File "./SystemMonitor.py", line 974, in __init__
    adesklets.Events_handler.__init__(self)
  File "/usr/lib/python2.4/site-packages/adesklets/events_handler.py", line 157, in __init__
    self.ready()
  File "./SystemMonitor.py", line 989, in ready
    join(self.basedir,'config.txt'))
  File "./SystemMonitor.py", line 265, in __init__
    adesklets.ConfigFile.__init__(self, identifier, filename)
  File "/usr/lib/python2.4/site-packages/adesklets/configfile.py", line 162, in __init__
    self._load_and_save()
  File "/usr/lib/python2.4/site-packages/adesklets/configfile.py", line 205, in _load_and_save
    all= ConfigImport.load(buf[:])
  File "/usr/lib/python2.4/site-packages/adesklets/configfile.py", line 41, in __call__
    return dict(self._group(
  File "/usr/lib/python2.4/compiler/transformer.py", line 52, in parse
    return Transformer().parsesuite(buf)
  File "/usr/lib/python2.4/compiler/transformer.py", line 129, in parsesuite
    return self.transform(parser.suite(text))
  File "<string>", line 182
    'text colour': (0, 0, 0, 200),
                 ^
SyntaxError: invalid syntax



I checked out line 182, there are other, similar entries, that do not seem to be a problem (with the ':'). Yet I don't know nothing of Perl so I really can't tell... But I do know I didn't change anything on that line ( I did comment out the previous lines because they handled the battery meter).

Can anyone help me out? I can post the full config.txt if needed...

P.S. I read this whole thread, I did encounter a similar problem however it seems to differ. I only tested my desklet, so it's nothing about not being unloaded or something. It doesn't appear in .adesklets.

By gil-galad (User), on Wed Nov 23 13:04:23 2005.

Hello!
Maybe someone as already post this bugs:
With SystemMonitor-0.1.3 with gentoo and dell Inspiron 9100,

1) if I remove the battery, the desklet won't start.
2) with the command ifconfig eth0 hw ether 00:06:5B:A6:20:01 up (so I change my mac address) the desklet is almost crash. I mean, very-very slow maybe 2min to start a half.

and I saw a screenshot to have remaining time on battery, is it possible with the last version? or I have to overwrite the SystemMonitor.py?

Thanks!

By dosenbier (User), on Sun Nov 27 18:08:09 2005.

The fix for this Problem

Code:

...
  File "./SystemMonitor.py", line 945, in create
    info = self.parseFile(self.info_file)
  File "./SystemMonitor.py", line 905, in parseFile
    [key, value] = split(":\s+", line)
ValueError: unpack list of wrong size



simply is to add:

Code:


# files in /proc/acpi - provide parsing facilities.
class ACPIMeter (AbstractMeter):
    """Abstract ACPI meter for all ACPI related monitoring"""
    
    def create(self, location, basedir, config_dictionary):
        self.file = config_dictionary["file"]
        AbstractMeter.create(self, location, basedir, config_dictionary)
    
    def parseFile(self, file):
        acpi_data = {}
        acpi_file = open(file, "r")
        acpi_lines = acpi_file.readlines()
        acpi_file.close()
        acpi_lines = map(strip, acpi_lines)
        
        for line in acpi_lines:
            try:
                [key, value] = split(":\s+", line)
                acpi_data[key] = value
            except ValueError:
                acpi_data[key] = 0;
            
        return acpi_data



Its somewhere around line 905.

Have fun !

By eris_pluvia (User), on Thu Mar 23 04:45:59 2006: DiskSpaceMeter mount point.

What is the key word to tell DiskSpaceMeter the correct partition to get care?

TIA

By eris_pluvia (User), on Thu Mar 23 04:53:47 2006.

OK. I've just realized that it shows all current partitions. But in other computer i've tested it, and the monitorized disk was "hdb" instead of "hda". How can I change this behavior?

TIA

By Karol (User), on Wed Apr 19 09:22:11 2006.

Code:

bash-3.00$ ./SystemMonitor.py 
Do you want to (r)egister this desklet or to (t)est it? t
Now testing...
============================================================
If you do not see anything (or just an initial flicker
in the top left corner of your screen), try `--help',
and see the FAQ: `info adesklets'.
============================================================
Traceback (most recent call last):
  File "./SystemMonitor.py", line 43, in ?
    import statgrab
ImportError: No module named statgrab
bash-3.00$ ls /var/log/packages/ |grep statgrab
libstatgrab-0.13-i386-1
Statgrab-0.5.0

By Muraii (User), on Thu Jun 8 09:44:49 2006.

Hi,

I've been trying to use SystemMonitor, my only desklet, for a couple of days. For some time, I thought I had an issue with adesklets itself, but it appears that there's something awry with SystemMonitor. It might be both, for all I know.

To save typing and bytes, I'll just refer you to Borromini's post from October of '05. I have experienced precisely the same thing:

(1) Upon testing SystemMonitor.py, I get the very same IOError for the /proc/acpi/battery/BAT0/info directory.
(2) After commenting out the BatteryMeter in config.txt, I get the same "Invalid Syntax" error regarding that very same colon.

I didn't see a response to Borromini, and thought of contacting h directly; but then I figured that wouldn't really help out anyone else. So here we are.

Any advice?

By syfou (Core Developer & Desklet Author), on Thu Jun 8 13:05:55 2006.

Muraii: 95% of the time I see this, this is because people fail to provide a syntactically correct config.txt file. Don't just comment out the lines: make sure you preserve the parenthesis, brackets and commas so everything balances out and python can parse it. At the end, you should not get any error when doing:

Code:


cat config.txt | python

Yours,

By Muraii (User), on Thu Jun 8 14:13:01 2006.

syfou wrote:

Muraii: 95% of the time I see this, this is because people fail to provide a syntactically correct config.txt file. Don't just comment out the lines: make sure you preserve the parenthesis, brackets and commas so everything balances out and python can parse it. At the end, you should not get any error when doing:

Code:


cat config.txt | python



I can completely see that, and thought I'd scanned thoroughly enough to make sure containment was properly maintained. I'll take another look tonight.

Thank you.

By Muraii (User), on Thu Jun 8 15:56:48 2006.

syfou:

I'm curious, though, about the problem that precedes the syntax error issue. Remember that prior to commenting part of the config file out, the SystemMonitor desklet still threw up an error, an IO error, regarding the BatteryMeter. I'd read or skimmed somewhere (possibly just in this thread) that this sort of error would only result in that particular meter being blank, and not breaking the entire desklet. Is that the case; or will that IO error actually result in the desklet not launching at all?

By syfou (Core Developer & Desklet Author), on Thu Jun 8 16:38:03 2006.

Muraii,

I haven't wrote SystemMonitor (Leland McInnes did), but I can tell from experience that as soon as some monitor fails in a "fatal" way caused by misconfiguration for a given system (such as missing battery monitor information), the whole desklet will exit, throwing an exception trace back at the user. The usual "pythonic" way to handle scripting error resulting from external fatal conditions is not to handle them at all. ;-) I know this can sound weird, but it really helps keeping the code clean and simple, as python exception system provide really good feedback.

Customizing (or removing altogether) the part in the config file concerning the battery monitor if it doesn't suit your machine was the right thing to do.

By Muraii (User), on Thu Jun 8 20:13:09 2006.

syfou wrote:

Customizing (or removing altogether) the part in the config file concerning the battery monitor if it doesn't suit your machine was the right thing to do.


Done. Works well. Now to learn about changing the icons (not much to learn there--it's in the config file) and transparency (not so straightforward, it would seem).

Thanks again.

By Efhach84 (User), on Tue Jul 11 07:48:35 2006.

Hello all,

I've installed the adesklets with modubar, weatherforcast somes weeks ago. And today I'd like to instal SystemMonitor...

All works perfectly except the temperature's indication. The desklet indicate "read failure". I've searched the acpi/thm/temperature repertory, but I didn't found it...

I've an motherboard ASUS P4PE-X, a CPUIntel Pentium 4. If it can help you...


I need your help! How can I use the temperature's indication??

Thanks :)

By syfou (Core Developer & Desklet Author), on Tue Jul 11 15:39:48 2006.

Efhach84, before using any temperature monitor, you first need to make the information available from user space somehow. You are in luck: according to the P4PE-X manual, this motherboard will have some I2C compatible Intel sensor chipset (a chip from the 82801* family), which is broadly supported on most free and non-free operating systems.

If you are under linux, the ubiquitous lm-sensors package can help you locate and calibrate your cpu and fan probes: run sensors_detect . Yours,

By Efhach84 (User), on Tue Jul 11 16:21:31 2006.

Thanks for your answer. I will do that thursday...

But the sensor-detect will indicate me the sensor's values, no?

Why I've not a file temperature and a directory THM (or THRM)? it's important?

Must I do create the file temperature? And what it'll contains? I'am a beginer on Linux (for 3 weeks). So could you please tell me somes details on the procedure?


NB :My Linux distribution is Ubuntu

Thanks for your help :wink:

By syfou (Core Developer & Desklet Author), on Tue Jul 11 16:46:57 2006.

Efhach84, you do not need to create any file: all files under /proc and /sys are in fact pseudo-files, dynamically created and actualized by the Linux kernel -- they are just a convenient way to expose in user space various kernel stats and switches through a convenient file semantic (see wikipedia procfs and sysfs entries for a gentle introduction). sensors-detect will merely help you find what kernel modules to load, and what parameters to pass to the kernel so the temperature report files for your motherboard sensors can be made automatically available to you. Look at the documentation of lm-sensors (either online, or the man pages) for more details. Yours,

_________________
Sylvain

P.-S. Once it works, backtrack in the SystemMonitor forum if ever you need to adapt the desklet to your system.

By Efhach84 (User), on Thu Jul 13 10:18:31 2006.

Hello, so I've installede the library lm-sensor. I've follow the "how to" that I found on the Ubuntu's wiki : http://doc.ubuntu-fr.org/materiel/sensors?s=sensors (in French...)

Now when I type : "sensors" in the terminal I obtained that :

Quote:

as99127f-i2c-0-2d
Adapter: SMBus I801 adapter at e800
VCore 1: +1.60 V (min = +1.44 V, max = +1.60 V)
VCore 2: +0.00 V (min = +0.00 V, max = +0.00 V)
+3.3V: +3.26 V (min = +3.14 V, max = +3.46 V)
+5V: +5.21 V (min = +4.73 V, max = +5.24 V)
+12V: +11.67 V (min = +10.82 V, max = +13.19 V)
-12V: -0.00 V (min = -0.00 V, max = -0.00 V)
-5V: -0.00 V (min = -0.00 V, max = -0.00 V)
fan1: 2789 RPM (min = 0 RPM, div = 2)
fan2: 0 RPM (min = 0 RPM, div = 8)
fan3: 0 RPM (min = 0 RPM, div = 8)
M/B Temp: +36?C (high = +80?C, hyst = +75?C)
CPU Temp: +49.5?C (high = +100?C, hyst = +90?C)
temp3: -32.0?C (high = +100?C, hyst = +90?C)
vid: +1.525 V (VRM Version 9.0)
alarms:
beep_enable:
Sound alarm enabled


So, in the terminal, I have the temperature... But, not yet on the SystemMonitor desklet (always read failure) What have I do now?


Thaks for your help :)

By syfou (Core Developer & Desklet Author), on Thu Jul 13 13:10:47 2006.

Great: you are almost done, Efhach84.... Just re-read the post-scriptum in my last message to you... Basically, find were this information lies in your system (the kernel pseudo-file hook in either /proc or /sys that sensors takes its information from), and adapt SystemMonitor to it. Recipes for almost all types of temperature meters can already be found in this thread. Yours,

By Efhach84 (User), on Thu Jul 13 18:12:48 2006.

I don't understand :cry: How can I find where the informations used by "sensors" is?

I have seen your PS, but I've not the same files. And I dont know what I must to search...
There is a comand to enter in ther terminal to see it?
(I begin on linux... sorry :oops: )

Thanks for your help :)

By syfou (Core Developer & Desklet Author), on Thu Jul 13 21:03:22 2006.

Efhach84, on a modern 2.6 vanilla kernel based system, i2c temperature sensors source such as yours are listed as symbolic links under /sys/bus/i2c/devices. Alternatively, an easy way to find out were sensors collects the info is to simply strace it (on Ubuntu, strace comes pre-packaged):

Code:


strace -e trace=open sensors


Yours,

By Efhach84 (User), on Fri Jul 14 04:24:08 2006.

THANKS :D

So I've find the file with the code that you give.

Quote:

open("/sys/devices/pci0000:00/0000:00:1f.3/i2c-0/0-002d/temp1_max", O_RDONLY) = 3
M/B Temp: +32?C (high = +80?C, hyst = +75?C)
open("/sys/devices/pci0000:00/0000:00:1f.3/i2c-0/0-002d/temp2_input", O_RDONLY) = 3
open("/sys/devices/pci0000:00/0000:00:1f.3/i2c-0/0-002d/temp2_max_hyst", O_RDONLY) = 3
open("/sys/devices/pci0000:00/0000:00:1f.3/i2c-0/0-002d/temp2_max", O_RDONLY) = 3
CPU Temp: +46.0?C (high = +100?C, hyst = +90?C)


Now I'll change in the desklet and type/sys/devices/pci0000:00/0000:00:1f.3/i2c-0/0-002d/temp2_input /.
But there ise two temperature. One for the CPU and one for the MB. Is it possible to indicate the two with SystemMonitor? As for network (one indcation for Up and one for down)?
Thanks :)

EDIT : I did the change but it is always "read failure". And when I test to open the file temp2_input. Gnome indicate me that it's impossible to open :?
It's the same when I open in a terminal whit the "sudo" command (as I was root)

By Efhach84 (User), on Fri Jul 14 04:36:51 2006.

May be I must change the right on this file??

By syfou (Core Developer & Desklet Author), on Fri Jul 14 14:29:35 2006.

Efhach84 wrote:


But there ise two temperature. One for the CPU and one for the MB. Is it possible to indicate the two with SystemMonitor?

Yes, it is. It is just a matter of setting two meters. The one provided with SystemMonitor is for ACPI sensors though: you will probably want to use the I2C meter already referenced in this forum instead.

Efhach84 wrote:


As for network (one indcation for Up and one for down)?

Look at the configuration file of SystemMonitor... This is supported, and explained in detail there.

Efhack84 wrote:


I did the change but it is always "read failure". And when I test to open the file temp2_input. Gnome indicate me that it's impossible to open.

It's the same when I open in a terminal whit the "sudo" command (as I was root)

May be I must change the right on this file??


The "cannot open as root either" bit puzzles me... This is not consistent with the sensors trace though:

Code:


open("/sys/devices/pci0000:00/0000:00:1f.3/i2c-0/0-002d/temp2_input", O_RDONLY) = 3 


As you see, the file was successfully opened (and as a normal user, or is it?). As an unprivileged user, try (make sure the path didn't change):

Code:


ls -lh /path/to/temp2_input
cat /path/to/temp2_input


Yours,

_________________
Sylvain

P.-S. Either I am missing something obvious, or this might very well be due to some security mechanism in your distribution I am not aware of.... Maybe would it be the right time to look at Ubuntu documentation?

P.P-S. If we need a workaround, it would not be hard either to extract the needed info directly from sensors output, and to feed it back to SystemMonitor somehow:

Code:


sensors | sed -n '/Temp/{s/\(.*\)Temp:[[:space:]]*.\([0-9.]*\).*/\1\2/;p}'

By Efhach84 (User), on Fri Jul 14 16:25:45 2006.

:( No... impossible to me to read this file. May be, as you say, a mechanism of security ??

when I try the command

Code:

ls -lh /path/to/temp2_input
cat /path/to/temp2_input 


I've the return "No file or repertory of this type " :shock: :?


I'll re-answer the ubuntu's communauty...

By syfou (Core Developer & Desklet Author), on Fri Jul 14 17:21:07 2006.

So far, this just means you did not use the right path and that the temp2_input file could not be found: set /path/to to match were the file is on your system. Yours,

By Efhach84 (User), on Fri Jul 14 18:24:09 2006.

hum... yes... :oops:

so now I've this

Quote:

fhier@Orion:~$ ls -lh /sys/devices/pci0000:00/0000:00:1f.3/i2c-0/0-002d/temp2_input
-r--r--r-- 1 root root 4,0K 2006-07-15 00:04 /sys/devices/pci0000:00/0000:00:1f.3/i2c-0/0-002d/temp2_input
fhier@Orion:~$ cat /sys/devices/pci0000:00/0000:00:1f.3/i2c-0/0-002d/temp2_input
45000
fhier@Orion:~$

By syfou (Core Developer & Desklet Author), on Fri Jul 14 19:51:39 2006.

Efhach84 wrote:


Code:


fhier@Orion:~$ ls -lh /sys/devices/pci0000:00/0000:00:1f.3/i2c-0/0-002d/temp2_input
-r--r--r-- 1 root root 4,0K 2006-07-15 00:04 /sys/devices/pci0000:00/0000:00:1f.3/i2c-0/0-002d/temp2_input
fhier@Orion:~$ cat /sys/devices/pci0000:00/0000:00:1f.3/i2c-0/0-002d/temp2_input
45000
fhier@Orion:~$



The good news is that's a perfectly usable output: permissions are all right, and the value (45 deg. C) could be retrieved from sysfs without problem. There shouldn't be anything preventing you from using this recipe.... Yours,

By Efhach84 (User), on Sat Jul 15 05:43:40 2006.

It's ok, it work :D


Very thanks, you are a boss 8)

By syfou (Core Developer & Desklet Author), on Sat Jul 15 14:00:29 2006, last edited on Sat Jul 15 16:47:40 2006.

You are very welcomed, Efhach84. I hope adesklets will keep being useful to you. Thanks for your perseverance on this issue. Yours,

_________________
Sylvain

P.-S. For those of you who read French, a few other posts by Efhach84 related to this can be found here.

By Efhach84 (User), on Sat Jul 15 15:11:17 2006.

another one very small question : where can I find somes pictures/icon. I've one for the CPU's temperature (tux with a thermometer) but now it's the same picture for the M/B's temperature. And I'd like to change it...

If you can give me some information about it?? :wink:

By syfou (Core Developer & Desklet Author), on Sat Jul 15 16:46:42 2006.

Efhach84 wrote:

another one very small question : where can I find somes pictures/icon.

kde-look.org (see "Icons" section) is a good start point. So is Devianart.com. A huge bank of GPL'ed iconic artwork can also be found in similar gdesklets displays. Yours,

By Efhach84 (User), on Sun Jul 16 04:38:01 2006.

Thanks... I've done it myself...

By Lord_Fairy (User), on Sun Jul 23 18:17:46 2006: transparency.

Hy!

I'm using System Monitor, and works well, but i want a transparent background.

How can I do it?

Thanks for the help.

By syfou (Core Developer & Desklet Author), on Mon Jul 24 23:13:38 2006: Re: transparency.

Hi,

Lord_Fairy wrote:

I'm using System Monitor, and works well, but i want a transparent background. How can I do it?

Look into this thread... This has been answered a few times already. Yours,

By Mano (User), on Tue Aug 15 04:05:37 2006.

Hello everybody,

I'm using System Monitor and it works great. However I face a problem with the temperature. It's the only thing that is still not working.

When I do a "strace -e trace=open sensors ", I have:

Quote:

open("/sys/devices/platform/i2c-9191/9191-0290/temp2_input", O_RDONLY) = 3
open("/sys/devices/platform/i2c-9191/9191-0290/temp2_max_hyst", O_RDONLY) = 3
open("/sys/devices/platform/i2c-9191/9191-0290/temp2_max", O_RDONLY) = 3
open("/sys/devices/platform/i2c-9191/9191-0290/temp2_type", O_RDONLY) = 3
CPU Temp: +33.0?C (high = +80?C, hyst = +75?C) sensor = thermistor
The sensors are working and I can read the temperature of my CPU.


As a result, I changed the config.txt file to be:

Code:

('TemperatureMeter',
 {'file': '/sys/devices/platform/i2c-9191/9191-0290/temp2_input',
  'horizontal padding': 8,
  'icon': 'images/icons/temperature.png',
  'krell': 'images/shared/krell_red.png',
  'max_temp': 100.0,
  'meter font name': 'VeraBd',
  'meter font size': 8,
  'trough': 'images/shared/trough.png',
  'update_speed': 30,
  'vertical padding': 8})


It was not working so I made a small search on the forum and I found this topic. A few post before somebody had the same problem and it was solve by changing a little bit the SystemMonitor.py file. I did the same:

Code:

def getMeterValues(self):
    read_value = float(file(self.file).read().strip())
    text_value = '%.1f' % (read_value/1000)
    krell_value = float(text_value)/self.max_temp
    return [krell_value,], [text_value,] 


Well, I still have "Temperature read fail"... did I miss anything ? :?
Here are some additional details of the computer:
- Mother Board: Asus P4P800 Deluxe
- Ubuntu 6.06

I'm stuck with this problm. Any help is welcome.
Thanks in advance

Romain

By fernandorui (User), on Sat Aug 19 16:10:55 2006.

Hello, People

I have 2 desklets: yab and System monitor...

I try to register them and run adesklets, but system monitor don't appear..

Only yab is shown in the screen, the system monitor I can't see...

I put test for the System monitor and the result is:
----------------------------------------
Traceback (most recent call last):
File "./SystemMonitor.py", line 43, in ?
import statgrab
ImportError: No module named statgrab
----------------------------------------

By Mano (User), on Sun Aug 20 01:55:25 2006.

fernandorui wrote:


I put test for the System monitor and the result is:
----------------------------------------
Traceback (most recent call last):
File "./SystemMonitor.py", line 43, in ?
import statgrab
ImportError: No module named statgrab
----------------------------------------


Hello fernandorui,

Did you install the following dependencies:
libstatgrab >= 0.11.1
pystatgrab >= 0.3

It should solve your problem.

By timor (User), on Sun Sep 10 06:35:53 2006.

Mano wrote:

...
As a result, I changed the config.txt file to be:

Code:

('TemperatureMeter',
 {'file': '/sys/devices/platform/i2c-9191/9191-0290/temp2_input',
  'horizontal padding': 8,
  'icon': 'images/icons/temperature.png',
  'krell': 'images/shared/krell_red.png',
  'max_temp': 100.0,
  'meter font name': 'VeraBd',
  'meter font size': 8,
  'trough': 'images/shared/trough.png',
  'update_speed': 30,
  'vertical padding': 8})


It was not working so I made a small search on the forum and I found this topic. A few post before somebody had the same problem and it was solve by changing a little bit the SystemMonitor.py file. I did the same:

Code:

def getMeterValues(self):
    read_value = float(file(self.file).read().strip())
    text_value = '%.1f' % (read_value/1000)
    krell_value = float(text_value)/self.max_temp
    return [krell_value,], [text_value,] 


Well, I still have "Temperature read fail"... did I miss anything ? :?
...


Hello I'have the same problem. Please guys, help us :)
I almost love adesklets and temp-mon is the only thing I need to be perfectlly happy :D

When I run System Monitor with this fix listed under my topic I have this error:

Code:

timor@timor ~ $ ./.desklets/SystemMonitor-0.1.3/SystemMonitor.py 
Do you want to (r)egister this desklet or to (t)est it? t
Now testing...
============================================================
If you do not see anything (or just an initial flicker
in the top left corner of your screen), try `--help',
and see the FAQ: `info adesklets'.
============================================================
unpack non-sequence
unpack non-sequence
unpack non-sequence
unpack non-sequence
unpack non-sequence
unpack non-sequence
unpack non-sequence
unpack non-sequence
unpack non-sequence
unpack non-sequence
unpack non-sequence
.... many many times...


I think it is problem in reading input file but I have no idea how to fix it. This is one thing that could help, in temp2_input ther is not only temp - there are some rubbish in second line.

Code:

37000
....................................................................

When I use cat to list file content I have only 37000 number, but when I use mc preview thera are may dots.

Thanks for the help.

By my_username (User), on Thu Sep 21 12:06:06 2006.

timor wrote:

[...]
I think it is problem in reading input file but I have no idea how to fix it. This is one thing that could help, in temp2_input ther is not only temp -
When I use cat to list file content I have only 37000 number, [...]
Thanks for the help.

I have EXACTLY the same problem. Conky works just fine with i2c. When I type:

Code:

cat /sys/devices/platform/i2c-2/2-0290/temp2_input

It returns the correct tepemperature value (but it's a 1000 times too high). So I know I found the correct location for my temperature. But I have NO idea whatsoever on how to change SystemMonitor.py. The other replys in this forum post are not clear to me because I do not know howto program. I'm absolutely sure that it must be very simple!!! Help! :roll:

P.S. I changed the following line in my config.txt:

Code:

{'file': '/sys/devices/platform/i2c-2/2-0290/temp2_input',

and I get the error "need more than 1 value to unpack" too. :?:

[EDIT]
Found it too!!! One should cange the following line in SystemMonitor.py:

Quote:

def getMeterValues(self):
read_value = float(file(self.file).read().strip())
divide_no = float(1000)
text_value = '%.1f' % (read_value/divide_no)
krell_value = float(text_value)/self.max_temp

return [krell_value,], [text_value,]

By my_username (User), on Thu Sep 21 12:26:45 2006.

[getting pretty addicted to adesklets and SysemMonitor here] I now have two tempetature meters in my Systemmonitor. One is my CPU, the other my MoBo temp. However, both were simply labeled "Temperature". Of course, I want the one to be called 'CPU' and the other 'MoBo'.

Here's the hack:

1. Copy the following text in SystemMonitor.py:

Code:

# get CPU temperature information and display in a meter        
class TemperatureMeter (ACPIMeter):
    
    def create(self, location, basedir, config_dictionary):

        config_dictionary["base text"] = ("Temperature",)
        config_dictionary["value text length"] = (6,)
        
        self.max_temp = config_dictionary["max_temp"]
        
        ACPIMeter.create(self, location, basedir, config_dictionary)
        
    def getMeterValues(self): 
        read_value = float(file(self.file).read().strip())      
        divide_no = float(1000) 
        text_value = '%.1f' % (read_value/divide_no) 
        krell_value = float(text_value)/self.max_temp 

        return [krell_value,], [text_value,]

and change te text "TemperatureMeter" into "TemperatureMeter2" and the apprpriate part in the text: "config_dictionary["base text"] = ("Temperature",)" into 'CPU temp' and 'MoBo temp'.

2. In config.txt copy the "temperature meter" things and, again, change TemperatureMeter into TemperatureMeter2.

It may not be a very pretty method, but it works. :)

By Mano (User), on Fri Sep 29 06:17:39 2006.

It is working fine for me too. The thing I had forgotten to change was:

Code:

config_dictionary["value text length"] = (6,) 


Thanks a lot for the help.

By cheeze (User), on Sun Oct 1 13:08:21 2006.

Mano wrote:

fernandorui wrote:


I put test for the System monitor and the result is:
----------------------------------------
Traceback (most recent call last):
File "./SystemMonitor.py", line 43, in ?
import statgrab
ImportError: No module named statgrab
----------------------------------------


Hello fernandorui,

Did you install the following dependencies:
libstatgrab >= 0.11.1
pystatgrab >= 0.3

It should solve your problem.


Hi, I have the same problem.

I tried installing both these packages. llbstatgrab is fine, but pystatgrab says:

Code:

Error. could not find pkg-config


How do I go about resolving this one?

Thanks.

By Ryuga (User), on Sun Oct 1 21:31:06 2006.

Hello everyone here is the error I get when trying to use Systemmonitor

Code:


Traceback (most recent call last):
  File "./SystemMonitor.py", line 1107, in ?
    EventHandler(dirname(__file__)).pause()
  File "./SystemMonitor.py", line 974, in __init__
    adesklets.Events_handler.__init__(self)
  File "/usr/lib/python2.4/site-packages/adesklets/events_handler.py", line 157, in __init__
    self.ready()
  File "./SystemMonitor.py", line 1004, in ready
    self.meters[-1].create((8,tmp_height), self.basedir, meter[1])
  File "./SystemMonitor.py", line 918, in create
    info = self.parseFile(self.info_file)
  File "./SystemMonitor.py", line 905, in parseFile
    [key, value] = split(":\s+", line)
ValueError: need more than 1 value to unpack




Any idea on how to resolve this error?

By raul_ (User), on Mon Oct 9 18:28:09 2006.

Sorry for bringing this up for the millionth time but i haven't found a solution. I get this error:

Code:


Traceback (most recent call last):
  File "./SystemMonitor.py", line 1107, in ?
    EventHandler(dirname(__file__)).pause()
  File "./SystemMonitor.py", line 974, in __init__
    adesklets.Events_handler.__init__(self)
  File "usr/lib/python2.4/site-packages/adesklets/events_handler.py", line 157, in __init__
  File "./SystemMonitor.py", line 1004, in ready
    self.meters[-1].create((8,tmp_height), self.basedir, meter[1])
  File "./SystemMonitor.py", line 631, in create
    AbstractMeter.create(self, location, basedir, config_dictionary)
  File "./SystemMonitor.py", line 480, in create
    self._create_fonts(config_dictionary)
  File "./SystemMonitor.py", line 329, in _create_fonts
    self._meter_font = adesklets.load_font(self._meter_font_name + "/" + \
  File "/usr/lib/python2.4/commands.py", line 706, in load_font

  File "usr/lib/python2.4/site-packages/adesklets/commands_handler.py", line 103, in out
adesklets.error_handler.ADESKLETSError: adesklets command error - font 'VeraBd/8' could not be loaded



Now, this is the "original" error. I've tried changing the font, deleting/commenting the battery section and god knows what more. So i just decided to download again and post the "original" error. Thanks in advance.

EDIT: Ok i got it to work. Now i just have to figure how to make the background transparent =)

By raul_ (User), on Tue Oct 10 13:03:41 2006.

I'm trying to make my temperature meter work =) i tried installing lm-sensors but when i type "sensors-detect" it tells me that no i2c devices were found. so i guess my motherboard isn't supported. how can i make this work? My motherboard is Asus K8N AI series

By adeeln (User), on Wed Oct 18 04:55:06 2006.

Hi, I just recently installed SystemMonitor-0.1.3 on a gentoo system running a kernel version of 2.6.17-r8 and am having issues trying to get SM to monitor my other drives and second network adapter. I can get SM to display entries for the other drives and adaptor, but the data i/o field never updates, regardless of activity on the drives. The output from statgrab correctly lists and shows my other drives (hdb, hdd). I'm not sure where the problem must lie, so I was wondering if anyone else has any experience with this.

I don't think there is an error in my config.txt file, but will post it anyways, as well as the output of statgrab.

Code:

 
[b]statgrab | grep disk[/b]

disk.hda.disk_name = hda
disk.hda.read_bytes = 27950580224
disk.hda.systime = 1161161414
disk.hda.write_bytes = 7907446784
disk.hdb.disk_name = hdb
disk.hdb.read_bytes = 145823744
disk.hdb.systime = 1161161414
disk.hdb.write_bytes = 8192
disk.hdc.disk_name = hdc
disk.hdc.read_bytes = 6483968
disk.hdc.systime = 1161161414
disk.hdc.write_bytes = 0
disk.hdd.disk_name = hdd
disk.hdd.read_bytes = 159527936
disk.hdd.systime = 1161161414
disk.hdd.write_bytes = 0



Here's my config.txt output

Code:


id0 = {'background colour': (220, 220, 220, 80),
 'background images': ['images/shared/bg_top.png',
                       'images/shared/bg_middle.png',
                       'images/shared/bg_bottom.png'],
 'meters': [('CPUMeter',
             {'horizontal padding': 12,
              'icon': 'images/icons/cpu.png',
              'krell': 'images/shared/krell.png',
              'meter font name': 'VeraBd',
              'meter font size': 8,
              'trough': 'images/shared/trough.png',
              'vertical padding': 1}),
            ('MemoryMeter',
             {'horizontal padding': 12,
              'icon': 'images/icons/memory.png',
              'krell': 'images/shared/krell.png',
              'meter font name': 'VeraBd',
              'meter font size': 8,
              'trough': 'images/shared/trough.png',
              'update speed': 10,
              'vertical padding': 2}),
            ('SwapMeter',
             {'horizontal padding': 12,
              'icon': 'images/icons/swap.png',
              'krell': 'images/shared/krell_blue.png',
              'meter font name': 'VeraBd',
              'meter font size': 8,
              'trough': 'images/shared/trough.png',
              'update speed': 30,
              'vertical padding': 2}),
            ('DiskIOMeter',
             {'disk name': 'hda',
              'horizontal padding': 12,
              'icon': 'images/icons/disk.png',
              'krell': ['images/shared/krell_green_small.png',
                        'images/shared/krell_red_small.png'],
              'max read speed': 35240,
              'max write speed': 35240,
              'meter font name': 'Vera',
              'meter font size': 7,
              'trough': 'images/shared/trough_small.png',
              'update speed': 2,
              'vertical padding': 2}),
            ('DiskIOMeter',
             {'disk name': 'hda',
              'horizontal padding': 12,
              'icon': 'images/icons/disk.png',
              'krell': ['images/shared/krell_green_small.png',
                        'images/shared/krell_red_small.png'],
              'max read speed': 3524,
              'max write speed': 3524,
              'meter font name': 'Vera',
              'meter font size': 7,
              'trough': 'images/shared/trough_small.png',
              'update speed': 2,
              'vertical padding': 2}),
            ('DiskIOMeter',
             {'disk name': 'hdd',
              'horizontal padding': 12,
              'icon': 'images/icons/disk.png',
              'krell': ['images/shared/krell_green_small.png',
                        'images/shared/krell_red_small.png'],
              'max read speed': 3524,
              'max write speed': 3524,
              'meter font name': 'Vera',
              'meter font size': 7,
              'trough': 'images/shared/trough_small.png',
              'update speed': 2,
              'vertical padding': 2}),
            ('DiskSpaceMeter',
             {'horizontal padding': 12,
              'icon': 'images/icons/diskfree.png',
              'krell': 'images/shared/krell_blue_small.png',
              'meter font name': 'Vera',
              'meter font size': 9,
              'trough': 'images/shared/trough_small.png',
              'update speed': 60,
              'vertical padding': 3})],
 'text colour': (0, 0, 0, 200),
 'update speed': 1}
id1 = {'background colour': (210, 210, 210, 150),
 'background images': ['images/shared/bg_top.png',
                       'images/shared/bg_middle.png',
                       'images/shared/bg_bottom.png'],
 'meters': [('NetworkMeter',
             {'horizontal padding': 10,
              'icon': 'images/icons/network.png',
              'interface name': 'eth0',
              'krell': ['images/shared/krell_green_small.png',
                        'images/shared/krell_red_small.png'],
              'max down speed': 400,
              'max up speed': 80,
              'meter font name': 'Vera',
              'meter font size': 7,
              'trough': 'images/shared/trough_small.png',
              'update speed': 2,
              'vertical padding': 1}),
            ('NetworkMeter',
             {'horizontal padding': 10,
              'icon': 'images/icons/network.png',
              'interface name': 'eth1',
              'krell': ['images/shared/krell_green_small.png',
                        'images/shared/krell_red_small.png'],
              'max down speed': 400,
              'max up speed': 80,
              'meter font name': 'Vera',
              'meter font size': 7,
              'trough': 'images/shared/trough_small.png',
              'update speed': 2,
              'vertical padding': 1})],
 'text colour': (0, 0, 0, 200),
 'update speed': 1}


By jfkinpa (User), on Thu Nov 9 10:01:59 2006, last edited on Mon Nov 27 16:58:25 2006: SystemMonitor only one not working (SOLVED).

I installed from the Ubuntu synaptic version 0.5.0-2 of adesklet. I used the installer command and have successfully installed the weather forecast, calendar and other desklets but the system monitor will not work. I've gone through the FAC and the forum but can't find anything. I tried a trace and this what I got.

Quote:

Traceback (most recent call last):
File "/home/jkroto/.desklets/SystemMonitor-0.1.3/SystemMonitor.py", line 42, in ?
import adesklets
File "/usr/lib/python2.4/site-packages/adesklets/__init__.py", line 43, in ? raise e
adesklets.error_handler.ADESKLETSError: adesklets process exited -
Exception exceptions.AttributeError: <exceptions.AttributeError instance at 0xb7dfd34c> in <bound method _Communicator.__del__ of <adesklets.communicator._Communicator instance at 0xb7cdba4c>> ignored


Anyone have any ideas?
Thanks in advance.
John

EDIT: after further review of the forums my problem was solved by removing all the lines relating to 'battery' in the config. great eye candy. thanks.

By metalsam (User), on Sun Nov 12 15:40:16 2006.

I have a problem with the desklet not being able to find the dependancy lib file:

Code:


Traceback (most recent call last):
  File "./SystemMonitor.py", line 43, in ?
    import statgrab
  File "/usr/lib/python2.4/site-packages/statgrab.py", line 23, in ?
    import _statgrab
ImportError: libstatgrab.so.6: cannot open shared object file: No such file or directory
sam@sam-kubuntu:~/.desklets/SystemMonitor-0.1.3$
sam@sam-kubuntu:~/.desklets/SystemMonitor-0.1.3$ whereis libstatgrab.so.6
libstatgrab.so: /usr/local/lib/libstatgrab.so.6 /usr/local/lib/libstatgrab.so



what am I to do ?

By falky (User), on Tue Nov 14 12:27:50 2006: Re: SystemMonitor only one not working.

jfkinpa wrote:

I installed from the Ubuntu synaptic version 0.5.0-2 of adesklet. I used the installer command and have successfully installed the weather forecast, calendar and other desklets but the system monitor will not work. I've gone through the FAC and the forum but can't find anything. I tried a trace and this what I got.

Quote:

Traceback (most recent call last):
File "/home/jkroto/.desklets/SystemMonitor-0.1.3/SystemMonitor.py", line 42, in ?
import adesklets
File "/usr/lib/python2.4/site-packages/adesklets/__init__.py", line 43, in ? raise e
adesklets.error_handler.ADESKLETSError: adesklets process exited -
Exception exceptions.AttributeError: <exceptions.AttributeError instance at 0xb7dfd34c> in <bound method _Communicator.__del__ of <adesklets.communicator._Communicator instance at 0xb7cdba4c>> ignored


Anyone have any ideas?
Thanks in advance.
John


Got nearly same error, adesklets 0.6.1

Code:


Traceback (most recent call last):
  File "/home/falky/.desklets/SystemMonitor-0.1.3/SystemMonitor.py", line 42, in ?
    import adesklets
  File "usr/local/lib/python2.3/site-packages/adesklets/__init__.py", line 43, in ?
adesklets.error_handler.ADESKLETSError: adesklets process exited - 
Exception exceptions.AttributeError: <exceptions.AttributeError instance at 0xb7ee664c> in <bound method _Communicator.__del__ of <adesklets.communicator._Communicator instance at 0xb7c1132c>> ignored


I?m now trying hours getting adesklets to work.
I?m nearly going to explode :x

By syfou (Core Developer & Desklet Author), on Tue Nov 14 15:07:48 2006.

Hi falky,

jkinpa has the problem with SystemMonitor specifically, and I have no idea why (I don't have a intimate knowledge of this desklet); but if you have the problem with every desklet in existence, I suggest you look on the site main page (see the message near the bottom). Yours,

By syfou (Core Developer & Desklet Author), on Tue Nov 14 15:15:52 2006.

I accidentally deleted this post from fkinpa, my apologies to him. Content reproduced here verbatim:

jfkinpa wrote:

I installed from the Ubuntu synaptic version 0.5.0-2 of adesklet. I used the installer command and have successfully installed the weather forecast, calendar and other desklets but the system monitor will not work. I've gone through the FAC and the forum but can't find anything. I tried a trace and this what I got.

Quote:

Traceback (most recent call last):
File "/home/jkroto/.desklets/SystemMonitor-0.1.3/SystemMonitor.py", line 42, in ?
import adesklets
File "/usr/lib/python2.4/site-packages/adesklets/__init__.py", line 43, in ? raise e
adesklets.error_handler.ADESKLETSError: adesklets process exited -
Exception exceptions.AttributeError: <exceptions.AttributeError instance at 0xb7dfd34c> in <bound method _Communicator.__del__ of <adesklets.communicator._Communicator instance at 0xb7cdba4c>> ignored


Anyone have any ideas?
Thanks in advance.
John

By robmeister (User), on Fri Nov 17 18:25:03 2006.

hi
I have a problem with the desklet, it trows this in the terminal

Code:

Traceback (most recent call last):
  File "./SystemMonitor.py", line 1107, in ?
    EventHandler(dirname(__file__)).pause()
  File "./SystemMonitor.py", line 974, in __init__
    adesklets.Events_handler.__init__(self)
  File "/usr/lib/python2.4/site-packages/adesklets/events_handler.py", line 157, in __init__
    self.ready()
  File "./SystemMonitor.py", line 1004, in ready
    self.meters[-1].create((8,tmp_height), self.basedir, meter[1])
  File "./SystemMonitor.py", line 918, in create
    info = self.parseFile(self.info_file)
  File "./SystemMonitor.py", line 899, in parseFile
    acpi_file = open(file, "r")
IOError: [Errno 2] No such file or directory: '/proc/acpi/battery/BAT0/info'



I'm using a desktop PC so I guess that's part of the problem
:?

By Jedidiah (Desklet Author), on Thu Nov 23 20:43:08 2006.

Robmeister: The problem is that the battery meter is configured to run, but you don't have an ACPI system wth a battery so it's balking. What you need to do is check your configuration file and remove the battery meter configuration. Things should run after that.

By jfkinpa (User), on Mon Nov 27 17:32:36 2006.

Quote:

I accidentally deleted this post from fkinpa, my apologies to him. Content reproduced here verbatim:

syfou, no harm no foul. And for others, I did edit my post to reflect that the problem has been fixed by removing part of the config for systemmon. The answer was found by further review and interpretation of these forums.
Thanks to you and to the forum,
John

By EricDele (User), on Fri Dec 15 17:19:20 2006.

Hi all

I have a question for the intel dual core. How could I do for that SystemMonitor show me the 2 core ?
Actually it's show only one core.

I don't understand if just in editing config.txt it could works, or Imust put a for in the CPUMeter class, like for network and fs.

I am under Ubuntu 6.10 Edgy Eft with adesklets 0.5.0

Thanks

By zeroth404 (User), on Fri Jan 12 21:51:22 2007.

I've got lm-sensors installed correctly, and I know the file which has my cpu temp in it in /sys, I've edited my config.txt accordingly, and I've replaced the following function to the .py script itself

def getMeterValues(self):
read_value = float(file(self.file).read().strip())
text_value = '%.1f' % (read_value/1000)
krell_value = float(text_value)/self.max_temp

return [krell_value,], [text_value,]

but STILL I get "Temperature read fail"

I've read this thread up and down and I can't figure it out ...

By Efhach84 (User), on Wed Feb 28 16:27:13 2007.

Hello all,

could you help me again with the desklet "system monitor"?
I can't read my temperature (temperature read fail).

I've install system monitor on a laptop (acer aspire 5633wlmi - 5630 series), the path is /proc/acpi/thermal_zone/TZ00/temperature or ../TZ01/temperature (I've a dual core...) I'm sure of the path, cause I can read temperature with cat !!!

thaks for help :D

By sagara (User), on Thu Apr 26 23:34:28 2007: Displaying all hard drives.

Anybody know how to get the system monitor to display disk space for all your hard drives?

Mine only currently shows the partitions on the disk where ubuntu is installed.
I have 3 other HD that I would like to monitor.

Thanks!

By Larcen (User), on Mon May 14 19:45:10 2007.

I've similar questions as well. I've no experience with Python, though I find my way around code well once I realize whats 'happening' though I've failed horribly for weeks trying to get both cores of my CPU to show, all my Hard drives, and my i2c & lm_sensors Temps/Fan speed etc to show. :/ If -anyone- has figured this out or knows how, I would greatly appreciate the help.

By cloneofme (User), on Sat May 19 19:38:45 2007.

Im having a problem starting the app all together.

I get this when i test :

root@harvie:/home/mark/SystemMonitor-0.1.3# ./SystemMonitor.py Do you want to (r)egister this desklet or to (t)est it? t
Now testing...
============================================================
If you do not see anything (or just an initial flicker
in the top left corner of your screen), try `--help',
and see the FAQ: `info adesklets'.
============================================================
Traceback (most recent call last):
File "./SystemMonitor.py", line 43, in ?
import statgrab
ImportError: No module named statgrab



Is there anything i have overlooked perhaps ?
If you need me to post any files or code just tell me what to get you.

-cheers

By syfou (Core Developer & Desklet Author), on Sun May 20 00:38:54 2007.

cloneofme: look at the README.


adesklets is proud to be hosted on:

SourceForge.net Logo

Back to adesklets.sf.net.