Date: Wed, 14 Jul 2010 15:33:59 +0200 From: Dominic Fandrey <kamikaze@bsdforen.de> To: Atom Smasher <atom@smasher.org> Cc: freebsd-hackers@freebsd.org Subject: Re: sysctl way too slow Message-ID: <4C3DBCC7.8060500@bsdforen.de> In-Reply-To: <1007142345320.5546@smasher> References: <1007142345320.5546@smasher>
next in thread | previous in thread | raw e-mail | index | archive | help
On 14/07/2010 13:49, Atom Smasher wrote: > http://smasher.org/tmp/zsh-bsd-sysctl-slow.png Why use a screen shot here? > is there a way to get this information that doesn't take so long? > > the same info is available on linux via /sys and /proc and on comparable > hardware, i can get the info about 100x faster. It probably depends on your BIOS. This is the same call on my system: % time sysctl -n hw.acpi.battery.life hw.acpi.battery.time hw.acpi.battery.state 100 -1 0 sysctl -n hw.acpi.battery.life hw.acpi.battery.time hw.acpi.battery.state 0.00s user 0.01s system 96% cpu 0.013 total As you can see 33 times faster than on your system. I agree that 0.413 seconds is too long, but I don't think it makes sense to call this value more frequently than every 30 seconds. So I'd say it's more of an annoyance than a real problem. Regards -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C3DBCC7.8060500>