$ perl -MSimple::HostStat -MEncode -e 'my $m=Simple::HostStat->new; while (1) { encode("ascii", substr("test",1)); if ( int(rand(350000)) == 1 ){printf "# %s\n", $_ for ( $m->toConsole ) }}' # However I think the original (something like this) and a command like top will also due fine $ perl -MEncode -e 'while (1) { encode("ascii", substr("test",1)) }'