Wednesday, October 14, 2009

The fastest program for acquiring system information

While developing oddfx I've come to the conclusion I should start a second project. A very brief one for sure. But, after seeing the numbers myself, I found oddfx's linuxrules too compelling to be taken vainly. [...] And I am quite sure many people will want this. I hope they get notice soon. You see, linuxrules is a POSIX awk compliant set of rules for reading as much Linux system information as we can. And I was talking to my wife about how great could be doing all of this in one pass whilst, normally, you should issue a lot of programs for achieving the same effect. I'll give you an ordinary example, here are the numbers in a simple comparison... Comparing program times uptime
time uptime 02:42:28 up 42 min, 3 users, load average: 0.00, 0.00, 0.00 real 0m0.009s user 0m0.003s sys 0m0.007s
linux rules
time linuxrules.awk CPU_0=800 CPU_1=800 MEMF=3437 SWAP=0 UPTIME=00:00:45 IDLE=01:28 LOAD="0.00 0.00 0.00" PROCS=3/186 USERS=3 LID=open TIME=02:45:54 DATE=2009-10-14 GPU_TH=54 real 0m0.012s user 0m0.003s sys 0m0.000s
Numbers speak for themselves, uptime gets overtaken. Linux rules proves to be an excellent choice for resources savvy people. I think that many sysadmins, general geeky users and WMII alike people could benefit a lot from this little utility. NOTE: The present test was run with mawk (not gawk, for obvious reasons) uptime results were the best from a series of tries. No effort was made to favour linuxrules.awk, all the contrary.

No comments:

Post a Comment