Re: [arch-general] most efficient way to get linux kernel statistics

2016-03-08 Thread Andre Schmidt
On Mon, 7 Mar 2016 21:20:18 +0100 Damjan Georgievski wrote: > >>> 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. > >> > >> Hello, > >> Thank you Florian. Actually, I already knew it's

Re: [arch-general] most efficient way to get linux kernel statistics

2016-03-07 Thread Florian Pelz
On 03/07/2016 09:20 PM, Damjan Georgievski wrote: > there's also `sysinfo(2)` > I didn't know there's a syscall for that. That seems like the easiest way to get memory data. I'm not sure if you can get the other information the original poster wanted without parsing /proc though. On 02/19/2016 0

Re: [arch-general] most efficient way to get linux kernel statistics

2016-03-07 Thread Jonathan Horacio Villatoro Córdoba
On Mon, Mar 07, 2016 at 09:15:06PM +0100, Florian Pelz wrote: > Sorry, I didn't express myself properly. I didn't mean to criticize > free. What I meant to say was that the time it takes to parse > /proc/meminfo or free is negligible. It doesn't need to be any more > efficient. free parses /proc/me

Re: [arch-general] most efficient way to get linux kernel statistics

2016-03-07 Thread Damjan Georgievski
>>> 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. >> >> Hello, >> Thank you Florian. Actually, I already knew it's the same, I just >> thought that he could use the free command instead of pa

Re: [arch-general] most efficient way to get linux kernel statistics

2016-03-07 Thread Florian Pelz
On 03/07/2016 04:36 PM, Jonathan Horacio Villatoro Córdoba wrote: > On Sun, Mar 06, 2016 at 05:13:37PM +0100, Florian Pelz wrote: >> 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, tho

Re: [arch-general] most efficient way to get linux kernel statistics

2016-03-07 Thread Jonathan Horacio Villatoro Córdoba
On Sun, Mar 06, 2016 at 05:13:37PM +0100, Florian Pelz wrote: > 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. > >> >

Re: [arch-general] most efficient way to get linux kernel statistics

2016-03-06 Thread Florian Pelz
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

Re: [arch-general] most efficient way to get linux kernel statistics

2016-03-06 Thread Jonathan Horacio Villatoro Córdoba
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, re

[arch-general] most efficient way to get linux kernel statistics

2016-03-06 Thread Andre Schmidt
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 file