Re: most efficient way to get linux kernel statistics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 03/06/2016 04:47 PM, Jonathan Horacio Villatoro Córdoba wrote:
> On Sun, Mar 06, 2016 at 03:23:33PM +0100, Andre Schmidt wrote:
>> hello archers,
>>
>> thought i ask here first, before i try some kernel mailing list.
>>
>> i'm writing (for fun) a tiny daemon that sends linux usage (cpu, mem, net, etc.) statistics as efficiently as possible to another machine, repeatedly, to get "live" data.
>>
>> at the moment i'm simply sending /proc files, but they sometimes have too much data. so was wondering if there is a more efficient way to get (only parts of) the data thats available in /proc?
>>
>> for example, /proc/meminfo has all this info:
>>
>> […]
>>
>> if /proc is the only way to get this info, i wonder if creating a kernel module for this would be more efficient, or even possible?
> 
> Hello Andre,
> 
> According to what you need, you may want to use the 'free' command
> instead, as its output is much simpler than the output of the
> /proc/meminfo file
> 
> […]
> 

Hello,

The free command gets its information from /proc/meminfo.
Performance-wise, it doesn't really matter if a few additional lines
need to be parsed.



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux