You are not logged in.

#1 2009-11-12 11:00:01

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

acpi and /sys and/or /proc

Hello all,

I've got Arch running on my Asus eee 901, stock kernel, 2.6.31-ARCH.
I have acpid started as a daemon, as well as laptop-mode and cpufreq, etc.
I load eeepc_laptop and acpi_cpufreq & cpufreq_ondemand modules.

I use acpi to get the battery status, in a script that runs every five seconds, for my status bar.

The acpi client returns the battery status, as expected, 99% of the time. However, every now and then it decides to return nothing, even if run manually. If I then run it using acpi -p it seems to force it to start working again, not just manually, but also in the status bar script.

Looking at the system, I see battery info in both /sys and /proc. Is acpi looking in /sys and are there issues with the data appearing there? I've not yet checked /sys when acpi is returning blank - I need it to occur again before I can do that.

Also, on a more general point, I've seen talk that all the information like this will be moving to /sys and eventually won't be on /proc. Is that the case, and does anyone have a link to a discussion of it? I've tried searching but /sys and /proc tend to throw up a lot of hits. wink

I'm thinking of ditching the acpi client and going in directly (I believe that that's all these sorts of clients do anyway). I could go to /proc, but if the future is /sys, I'll go there instead.


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#2 2009-11-12 18:31:42

MadTux
Member
Registered: 2009-09-20
Posts: 553

Re: acpi and /sys and/or /proc

As far as I know, /proc is deprecated and every information is in /sys.

Offline

#3 2009-11-13 10:13:42

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: acpi and /sys and/or /proc

Thanks for that.

There's a lot of scripts out there that go to /proc - including new ones on the forums. Any ideas how long /proc is expected to hang around for? I can understand some distros it won't be an issue for a while, but Arch will be one of the earlier ones to see the change.

Anyway, I'll start switching my stuff to go to /sys.


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#4 2009-11-18 22:07:06

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: acpi and /sys and/or /proc

Okay, it looks like it's not as simple as that... wink

I couldn't find mem info in /sys, so I did a bit of looking.
From wikipedia:

"Sysfs is designed to export the information present in the device tree which would then no longer clutter up procfs."

So it looks like it's useful for device info, including providing a map of installed devices, but any process info should come from /proc. It seems to be used by udev & hal as well. So, I'll stick with /proc for mem etc., but I might do a compare of /sys & /proc for battery.


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

Board footer

Powered by FluxBB