|
|
wmacpiload
| Category: |
System Monitoring |
|
|
| Maintainer: |
Bratag |
| Description: |
An app for monitoring CPU temp and battery time from ACPI. In the style of wmcpuload and wmapmload |
Screenshots:
|
|
|
Available Versions:
|
You are not the owner of this file version
User Comments
Bad acpi proc files path
I downloaded wmacpiload 0.1.2 and compiled it.
But all values were 0.
So, i look your code.
In fact, all is OK except some files path.
For me these filenames are bad:
/proc/acpi/thermal_zone/THRM/temperature
/proc/acpi/ac_adapter/AC/state
/proc/acpi/battery/BAT0/state
/proc/acpi/battery/BAT0/info
I must use those:
/proc/acpi/thermal_zone/ATF0/temperature
/proc/acpi/ac_adapter/ACAD/state
/proc/acpi/battery/BAT1/state
/proc/acpi/battery/BAT1/info
Can you explain me these differences?
Basically the code is written for the machine I am on ( a dell laptop ) - unfortunately the paths vary from machine to machine based on the BIOS. At a later stage in the code (keep in mind this is first release) I will attempt to add some sort of intelligence so that it can handle all path names. Until then I can only suggest you change them in the code.
Regards
Anthony Peacock
Basically the code is written for the machine I am on ( a dell laptop ) - unfortunately the paths vary from machine to machine based on the BIOS. At a later stage in the code (keep in mind this is first release) I will attempt to add some sort of intelligence so that it can handle all path names. Until then I can only suggest you change them in the code.
Regards
Anthony Peacock
You say you use a dell, I have a dell inspiron 2600 and I don't get the acpimon working, (telling something about wrong acpi version, i'm running kernel 2.4.20) do you have any idea what I have to do ?
tnx,
jer'm
you might want to apply the latest acpi patches (acpi.sf.net) and patch the dsdt table for your laptop. worked for me (dell lat d600). swsusp is a roxor. sux that dell took apm out, cause acpi is quite fcked up.
-h
CPU load
wmacpiload takes 6% of CPU on my Pentium III 866 Mhz, making my mouse choppy everytime it refreshes. Not acceptable. Besides, many app strings have not been accordingly modified in the source code: wmapmload, "Window Maker mails monitor dockapp", etc...
CPU Load
I am aware of the problem with CPU usage of wmacpiload - I have already posted that lowering the refresh tim in the code will lower the CPU usage. The reason CPU usage is so high is because of the number of files that must be opened and read in order to maintain the status (one for battery/heat/and charge status). If you or anyone else is able to establish a faster and less CPU intensive way of doing this I of course would be interested. I was however unable to find the reference in the source code you mentioned - perhaps next time you could include your email so that I can directly correspond with you.
many patchs ...
I also had to modify some lines in main.c to make it compliant with my own /proc/acpi ... but i got an other problem : "fscanf(fd, "temperature: %d", &i->thermal_temp);" reads the temperatur as is, in the file, regardless of the unit :/ ... thus, just after reading it, I have to convert the kelvin value into celcius value. The unit is given just after the value; here is the line from /proc: 'temperature: 3292 dK' ; I let you look for the proper equations, call them conditionally ... I also suggest the developer to mail me, so that I can send him the tree of my proc : 'cd /proc/acpi; find | mail developper ' :=) so that you can have a clue about some funny archs :=)
I givr you the line when i write the unit converter. Bye.
temperature adjustments ...
I just add
i->thermal_temp=(i->thermal_temp/10)-273;
between fscanf and fclose. It would be a better idear to put it just after fclose :=)
that gives me the temp in Celcius.
By the way, I tell you that the battery stuff do not work at all, but i dont mind since gkrelllm does it very well. For now, i just wanted my CPU temp asap :=) I have it, I am glad. I hope gkrellm supoprts ACPI temp asap WITHOUT requireing LM-SENSOR ...
here is my tree :
pluton:/proc/acpi# find
.
./thermal
./thermal/0
./thermal/0/info
./thermal/0/status
./button
./button/lid
./button/sleep
./button/power
./button/power
./ac_adapter
./ac_adapter/0
./ac_adapter/0/status
./battery
./battery/0
./battery/0/info
./battery/0/status
./processor
./processor/0
./processor/0/info
./processor/0/status
./dsdt
./gpe
./alarm
./sleep
./info
./event
Sorry for the flood, that for your futur well being :=)
Bye ;)
Firstly please note that I can only write and test this Software on my current systems. Since I do not have access to a multitude of systems I am unable to guarentee it working on anything other than an Inspiron 5000e (this info is in the README). Demaine a couple of things
1) Whats your email - I cant email you without it.
2) What about the battery stuff doesnt work well. It simply takes the maximum charge and divides by the current charge and works out a percentage.
ACPI
I am using a desktop pc and obviously dont use battery, is there a way to change something, so I can use it here?
app patched ...
I put my modified version here
http://www.doublehp.org/wmacpiload-0.1.2_doublehp.tar.gz
it works fine for me(temp sensor + batt)(i compensate the kelvin temp with factor 270 instead of 273.17 sorry for the mistake ) with some modified lies mainly in main.c ... make a diff with the expanded tree of wmacpiload-0.1.2.tar.gz to see what i modified ... bye all
just wanted to say how great this software is. Linux power management is really pretty capable, but there are few applications that take such nice advantage of the acpi - way to go Anthony! When's the version due?:)
Look for a new version that uses .config files to set the ACPI path names within the next few weeks. Sorry its been so long between updates - even I have to do work sometimes :)
good!!!!!!!!
cpu
I have an idea to reduce cpu usage. for starters, think back to scamp's remark "makes my mouse choppy whenever it reloads" and then to Peacock's "because of the number of files that must be opened and closed".
The simplest method may not be to actually /reduce/ the number of calls to the cpu, but to spread them out. For example, you could have a loop of files in your proc tree to be read one at a time over and over seperated by an arbitrary ammount of time.
The following example code is just that, an example, it will not run:
void refreshloop() /* calls for refreshments! */
{
refresh(battery,/proc/battery) /*refresh battery*/
wait(10)
refresh(temp,/proc/temp) /*refresh temp*/
wait(10)
...and so on...
}
and then your refresh(char a[],char b[]) would update the gui by telling it to set a[] to the contents of the proc file b[].
Pardon the sloppy coding too:) You might want to look up that wait command... I think wait() is used to wait for a process to end!
So, there ya go.
New patch
I have made my own patch to wmacpiload. Now it can handle different names "BAT0", "C11B" or whatever at run-time, without manuelly edit the source.
As Anthony doesn't have the time to review it, I release it temporarily on my webpage:
http://perso.wanadoo.fr/acarriou/wmacpiload/index.html
Feel free to test it.
New maintainer and new website
Hello all, having talked with Anthony, I am now maintainer of wmacpiload.
I have moved my webpqge; you'll now find newest versions and documentation at http://wmacpiload.tuxfamily.org
Next release coming soon...
|
|
|
|