LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 08-21-2013, 07:29 PM   #1
IshmaelMD
LQ Newbie
 
Registered: Aug 2013
Posts: 4

Rep: Reputation: Disabled
/proc output max length


Is there a maximum size limit to the number of bytes I can print through a file in /proc directory ?

I created an entry under /proc. I am trying to display some driver data there but there are quite a few data to display. The display gets cut at ~80% so I was wondering if there is an upper limit on number of bytes that can be displayed in /proc that anyone knows of and if there is a way around it.

Thanks!
 
Old 08-22-2013, 11:48 AM   #2
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,401

Rep: Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120
I would suggest that you ought to further refine your /proc interface, so that the requesting programs can be more specific as to what they are asking for, or can ask for a subset of it (in the flavor of MySQL's LIMIT verb). Don't give the requesting program indigestion ... and don't consume an unnecessary amount of kernel memory preparing the response to any given request.

For example, if I want to "find out about all the processes in the system," one request gives me a set of PIDs. Then, by looping through that list, my program can individually request information about each PID and in so doing build up the complete set of information that it requires. But at no point did the kernel have to prepare (nor did the program have to deal with) a huge amount of data.

Last edited by sundialsvcs; 08-22-2013 at 11:49 AM.
 
Old 08-22-2013, 12:00 PM   #3
IshmaelMD
LQ Newbie
 
Registered: Aug 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
To elaborate further, I need to display spectrum information of 4 chains in the wireless device. Each chain displays 256 words. This is what I am trying to display in /proc/spectrum and am not able to display all. I split it into /proc/spectrum/chain1,2 etc. But when the sample size is higher, I can't think of any other way of displaying them except further subdividing the proc folder.
Other than /proc, is mmap perhaps the only way to make this available to user space upon request ?

Thanks. Appreciate the replies.

Last edited by IshmaelMD; 08-22-2013 at 12:09 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
What is the max length of ID description? dwarf007 Linux - General 6 10-10-2007 10:35 AM
Cat5 Max Length Jane Linux - Networking 7 06-07-2007 10:26 AM
POSIX - max line length? lowpro2k3 Programming 1 08-24-2005 08:59 PM
Max pass length xathras Linux - Security 1 06-26-2004 03:46 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration