Comment 6 for bug 386546

Revision history for this message
Chris Galardi (ixplode) wrote :

I'm not actually sure why the numbers are different, but all the documents I can find about proc/loadavg say that it shows the current running process and the total processes.

Anyway, while the difference is small ( your way gets sys 0.016s - 0.020s vs my way's sys 0.010s - 0.012s on my machine ) it could potentially add up when a bunch of other calls are being run by screen every second.

I honestly don't think most of these files in the usr/lib/byobu directory are whats weighing down performance. /Although/ now that I think about it, you should have a look at sysctl -a, because there is a huge amount of information that can be printed out about the system by simply using `sysctl -n <key>` which removes the need to do expensive greps and regexes entirely in some situations. I mean, you can get very detailed information about the cdrom drive, or the swap file, for example.

Another reason this may be preferable is that it would be easier to make portable between BSD and Linux, as all you'd need to do is change the key instead of the path name and regex.