LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Closed Thread
  Search this Thread
Old 12-08-2010, 08:11 AM   #1
geddysekar
LQ Newbie
 
Registered: Mar 2010
Posts: 18

Rep: Reputation: 0
read time of /proc/net/tcp6 file


Hi,

I am trying to read the /proc/net/tcp6 file of a huge server (chat server) for monitoring the tcp6 connection states.

My server's tcp6 file has more than 26000 lines. For monitoring the server connections, my monitoring tool has to read the /proc/net/tcp6 file quickly in a regular interval (5 secs) and process. Presently it takes minimum 6-7 seconds for reading the whole file.

My tool can able to read the normal file (26,000 lines) less than 1 second, but it is not possible to read the same size of proc file.

I have 2 questions:

1) Why proc file takes more read time than normal file?

2) Is there any way to read the /proc/net/tcp6 file more quickly?
 
Old 12-08-2010, 07:24 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
This is a duplicate of
http://www.linuxquestions.org/questi...uickly-849040/
and
http://www.linuxquestions.org/questi...14#post4183314
 
Old 12-09-2010, 08:13 AM   #3
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

follow the discussion here:

http://www.linuxquestions.org/questi...uickly-849040/
 
  


Closed Thread



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
Can't create file using echo: /proc/sys/net/ipv4/ip_local_port_change rsumbeling Linux - General 4 07-17-2013 04:20 AM
delay in reading the huge proc net tcp6 file geddysekar Linux - Networking 1 12-08-2010 03:46 PM
[SOLVED] /proc/net/snmp file: what OutRsts tells? geddysekar Linux - Networking 4 09-17-2010 04:57 AM
[SOLVED] how to read /proc/net/netstat within a dynamic kernel module vinayaka_c Linux - Kernel 1 09-01-2009 09:49 AM
read /proc/net/dev with sscanf? Thinking Linux - General 0 03-30-2005 09:14 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:17 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