Re: most efficient way to get linux kernel statistics

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



>>> 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 parsing it
>> himself. You're right. Performance-wise, it's pretty much the same.
>>
>
> 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/meminfo. libgtop parses /proc/meminfo.
> Querying the information probably takes much more time than parsing it.
>
> Your suggestion to use free may indeed be useful if the original poster
> wants parsing to be slightly simpler and does not mind the additional
> dependency. My impression was that they considered parsing to be too
> inefficient.

there's also `sysinfo(2)`

-- 
damjan



[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