Need help in understanding sysfs

Anuz Pratap Singh Tomar chambilkethakur at gmail.com
Wed Aug 10 18:08:18 EDT 2011


On Wed, Aug 10, 2011 at 10:43 PM, Vaibhav Jain <vjoss197 at gmail.com> wrote:

>
>
> On Wed, Aug 10, 2011 at 2:14 PM, Jeff Haran <jharan at bytemobile.com> wrote:
>
>>    *From:* kernelnewbies-bounces at kernelnewbies.org [mailto:
>> kernelnewbies-bounces at kernelnewbies.org] *On Behalf Of *Vaibhav Jain
>> *Sent:* Wednesday, August 10, 2011 12:09 PM
>> *To:* kernelnewbies at kernelnewbies.org
>> *Subject:* Need help in understanding sysfs****
>>
>> ** **
>>
>> Hi,****
>>
>> I need to undestand sysfs and make changes to it.****
>>
>> Please provide me with some good references.****
>>
>>  ****
>>
>> Thanks****
>>
>> Vaibhav Jain****
>>
>>  ****
>>
>> First thing to try would be your favorite search engine. If you do a
>> search for “lwn <topic>” you’ll often be taken to a LWN article that is on
>> topic though perhaps a bit dated. For instance, a search for “lwn sysfs”
>> takes you to here:****
>>
>> ** **
>>
>> http://lwn.net/Articles/54651/****
>>
>> ** **
>>
>> Probably a good place to start. Linux is mostly good code, but the
>> documentation that comes with the kernel sources mostly sucks, so the web is
>> your friend in this regard.****
>>
>> ** **
>>
>
>
>  Hi,
>
> Sorry for the vague question. I would clarify. There are two things I need
> :
>
> 1-  I need to know how information is organized in the sysfs and
> understand the concepts of kobjects , attributes etc.
>
> 2.- I need to understand how to create a file entry in the sysfs.
> Particulary i need to create an entry inside the
> directory /sys/devices/system/cpu/ . I will be required
> to write some driver in the future which will accept inputs from this file
> but I am not very clear about that right now. So I was thinking of just
> trying to create an entry for now.
>
> I tried searching the web but there are not many articles that explain the
> above two in detail unlike procfs for which there are a lot of articles with
> samples.
> The ones I found were not very interesting to read.
>
> Thanks
> Vaibhav Jain
>
>
>
>
Have you used google?
The third link in the google is a classic paper by patrick Mochel, it pretty
much covers all the basics.

There is a lot of information on sysfs in Robert love's LKD and
There is an entire chapter on sysfs in LDD, which tells all the details
about creating entry and other basics.



>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110810/5b26b8e0/attachment.html 


More information about the Kernelnewbies mailing list