LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-26-2009, 11:59 PM   #1
dividingbyzero
Member
 
Registered: May 2008
Location: Earth
Distribution: Slackware 12.2
Posts: 52

Rep: Reputation: 16
/proc and is state of deprecation ..


Hi.

I'm wondering. When I build a kernel with 'make menuconfg' I usually comes across the part to include the "deprecated" /proc filesystem that "has been replaced with /sys" in the menu. I ask the question if I should still use /proc, because I use it to check the state of my battery's charge with 'cat /proc/acpi/battery/BAT1/state '. Is there a way with the /sys filesystem to check my battery's charge state, etc., and should I NOT use /proc anymore?

Thanks
 
Old 01-27-2009, 12:58 AM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
hi

I have seen that as well. I use diff cats of proc

eg cat /proc/interrupts
cat /proc/asound/card0/codec#0

so the answer is as I do not have a laptop...do a search of sys and see if you can get the same info
or...install lm-sensors and a frontend like gkrellm and use sensors instead.

if your kernel is desperate for ram...because its a laptop...cull proc...but then compare how much juice you are using to run gkrellm?
 
Old 01-27-2009, 01:05 AM   #3
dividingbyzero
Member
 
Registered: May 2008
Location: Earth
Distribution: Slackware 12.2
Posts: 52

Original Poster
Rep: Reputation: 16
thanks. Not short on RAM; I have 3 gigs on my IBM lenovo 3000 G530 (Awesome laptop, for cheap ), but yeah, I'm gonna read up on /sys.

Thanks again
 
Old 01-27-2009, 04:25 AM   #4
maginotjr
Member
 
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661

Rep: Reputation: 35
well, there is already a thread to discuss that, https://www.linuxquestions.org/quest...in-2.6-317088/

[ ]'s
 
Old 01-27-2009, 07:18 AM   #5
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,376

Rep: Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756
Quote:
Is there a way with the /sys filesystem to check my battery's charge state, etc.
On my laptop, 'cat /sys/class/power_supply/BAT1/*' provides similar information to that provided by 'cat /proc/acpi/battery/BAT1/state'.
I believe that there is a move to standardise the interface between devices and user space using /sys so that it is hardware and distribution agnostic. For an example of this, look at pm-utils, introduced into Slackware 12.2.
From /usr/doc/pm-utils-1.2.3/README:
Quote:
Why do we need it?

* All the main distributions are re-implementing the same
functionality to support common power management
operations. pm-utils provides a standardized distribution agnostic
layout and interface for common power management tasks, which frees
software and hardware vendors from having to maintain
distribution-specific suspend/resume functionality.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Boot hang after 'proc on /proc type proc (rw)' Hagoromo Slackware 13 10-05-2007 05:03 PM
JAVA SDK 6 help about Xlint:deprecation nathan.eder2004 Programming 5 07-29-2007 01:18 AM
Password Encryption After MD5 Deprecation ombill Fedora 1 08-22-2005 05:16 PM
Query about /proc/state rajsun Programming 1 03-28-2005 03:45 AM
gcc feature deprecation question itsme86 Programming 3 07-09-2004 03:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration