LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 05-14-2010, 02:17 AM   #1
geddysekar
LQ Newbie
 
Registered: Mar 2010
Posts: 18

Rep: Reputation: 0
How frequently does kernel update the /proc files?


Hi,

I am very new to the kernel world.

I want to know that how frequently the /proc files are updated by kernel?

My Kernel version : 2.6.18-8.1.8.el5

By,
Geddysekar

Last edited by geddysekar; 05-14-2010 at 02:21 AM. Reason: editing
 
Old 05-14-2010, 02:28 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
I can't cite an authoritative reference but believe they are updated when read.

Last edited by catkin; 05-14-2010 at 02:33 AM. Reason: speeling
 
1 members found this post helpful.
Old 05-14-2010, 02:29 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Every time you read them.
/proc is not a true filesystem, but a pseudo filesystem. The "files" are merely representations of kernel data, and are created as you read them.
 
1 members found this post helpful.
Old 05-14-2010, 04:38 AM   #4
geddysekar
LQ Newbie
 
Registered: Mar 2010
Posts: 18

Original Poster
Rep: Reputation: 0
Thanks for replying to the basic level question.

Once again Thanks..
GeddySekar
 
Old 05-14-2010, 05:51 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I was not aware that the files were ever created---e.g. I don't believe the hard disk ever sees them.

My understanding is that you are see data structures in memory. The interface allows you to read (and--at your own risk--write) as if they were files.

(In *n(u|i)x, "everything is a file")
 
Old 05-14-2010, 06:04 AM   #6
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
/proc is merely an interface to your kernel data structures in an fs-like fashion (in the purest *nix tradition), the files there do not exist in the same sense that a file exists in your hd, a pen or a ram drive. The data is provided as you ask for it, as real-time as the linux kernel can get.
 
Old 05-14-2010, 06:32 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Kernel structures done't (automatically) have a procfs entry - they can be represented, but somebody has to provide the code to do create_proc_entry (and remove_proc_entry) - and provide read and write routines. And permissions.
Kobjects and sysfs are perhaps closer to what you're thinking pix. But someone still has to write the code.
 
1 members found this post helpful.
Old 05-15-2010, 09:28 AM   #8
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
In case are interested in seeing practically how the /proc entries are created ,read from and written to refer the following

http://tldp.org/LDP/lkmpg/2.6/html/c708.html
 
1 members found this post helpful.
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How often do Linux /proc files update? Aztral Linux - Newbie 13 07-22-2009 11:11 AM
where does the /proc dir get its information so that it can update? paranoid times Linux - Software 13 03-22-2006 01:26 AM
How to Make Linux Update Time Frequently? notooth Linux - Newbie 2 09-17-2005 05:13 AM
Which directory contains files that normally change their size frequently? Simon Adebisi Linux - Software 4 06-28-2005 03:37 PM
Mandrake Update and Kernel Source Files Campy19 Mandriva 2 12-24-2003 02:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 01:01 PM.

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