in reply to get system info using perl

2. Are there any perl modules which are using XS to get these queries done faster without opening a shell?

There's no need to open shell to read /proc/loadavg. Just read it from perl:

while(1) { open my $la, '<', '/proc/loadavg'; print <$la>; close $la; sleep 1; }

Upd: script fixed