#!/usr/bin/perl -w use strict; use Dataparksearch; print "Content-type: text/html\n\n"; print < Stats EOF # EDIT - ME my $DBAddr = "pgsql://user:passwd\@localhost/search/?dbmode=cache"; # my $search = new Dataparksearch('DBAddr' => $DBAddr); my $stats = $search->GetStatistics(); foreach my $line ( @$stats ){ if ( $line->[0] ne 'Total' ){ printf(" \n", $line->[0], $line->[1], $line->[3], $line->[5]) } else { printf(" \n", 'Total', $line->[1], $line->[3]) } } print < EOF # Free allocations $search->Free(); exit;
Database statistics
StatusExpiredTotal 
\%d\%d\%d\%s
\%s\%d\%d