mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Any faster and more efficient way to repeatedly access /proc/*
@ 2007-03-09  0:55 mchu
  2007-03-09  3:11 ` Matthew Helsley
  0 siblings, 1 reply; 2+ messages in thread
From: mchu @ 2007-03-09  0:55 UTC (permalink / raw)
  To: linux-kernel

Hi,

Is there a faster way to access "/proc/*" other than open it as a file and reading/parsing contents? e.g. fopen("/proc/stat", "r");

In BSD, there is the kvm method of access, which is relatively fast (light weight)

In Linux, if I have a daemon that keeps track of these statistics, it's a hell way to manage.

Imagine, having to probe the stat of each process?

Thanks,
Michael

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Any faster and more efficient way to repeatedly access /proc/*
  2007-03-09  0:55 Any faster and more efficient way to repeatedly access /proc/* mchu
@ 2007-03-09  3:11 ` Matthew Helsley
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Helsley @ 2007-03-09  3:11 UTC (permalink / raw)
  To: mchu; +Cc: linux-kernel

On Thu, 2007-03-08 at 16:55 -0800, mchu@mirapoint.com wrote:
> Hi,
> 
> Is there a faster way to access "/proc/*" other than open it as a file and reading/parsing contents? e.g. fopen("/proc/stat", "r");
> 
> In BSD, there is the kvm method of access, which is relatively fast (light weight)
> 
> In Linux, if I have a daemon that keeps track of these statistics, it's a hell way to manage.
> 
> Imagine, having to probe the stat of each process?

Have you looked at Task Stats (CONFIG_TASKSTATS)?

Cheers,
	-Matt Helsley


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-09  3:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-09  0:55 Any faster and more efficient way to repeatedly access /proc/* mchu
2007-03-09  3:11 ` Matthew Helsley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®