#!/usr/bin/perl
use strict;

# This will just be a filter script.  Parses STDIN, writes to STDOUT.

while ( my $line = <STDIN> ) {
    chomp $line;

    # All I want is the time and the 1 minute load avg.
    if ( $line =~ /^ (\d+:\d+:\d+).*average: (\d+\.\d+)/ ) {
        my $time = $1;
        my $load = $2;
        print "$time\t$load\n";
    }

    # 08:00:01 up 35 days, 17:45,  1 user,  load average: 0.22, 0.24, 0.22
}
