From afb6b727fbe4bfa4df1b68ea3160798634696c2c Mon Sep 17 00:00:00 2001 From: Heikki Levanto Date: Thu, 17 Mar 2011 13:05:30 +0100 Subject: [PATCH] Also total package instances --- aptcheck/aptcheck.pl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/aptcheck/aptcheck.pl b/aptcheck/aptcheck.pl index ac4893f..9bac028 100755 --- a/aptcheck/aptcheck.pl +++ b/aptcheck/aptcheck.pl @@ -31,6 +31,9 @@ my %normhosts; my %normpkgs; my %okhosts; my %skiphosts; +my $sectot = 0; +my $owntot = 0; +my $normtot = 0; my $table = "\n"; @@ -67,16 +70,19 @@ for $hline ( split("\n",$hostlist) ) { $sechosts{$H}=1; $secpkgs{$pkg}=1; $secs++; + $sectot++; } elsif ( $src =~ /Indexdata/ ) { $det .= "$pkg"; $key = "$pkg"; $ownhosts{$H}=1; $ownpkgs{$pkg}=1; $own++; + $owntot++; } else { $det .= "$pkg"; $normhosts{$H}=1; $normpkgs{$pkg}=1; + $normtot++; } if ( !$summary{$key} ) { $summary{$key} = ""; @@ -121,11 +127,11 @@ print F "

Apt package status

\n"; print F "
\n"; print F "" ; print F "\n" ; + " / " . scalar(keys(%secpkgs)) . " / $sectot \n" ; print F "\n" ; + " / " . scalar(keys(%ownpkgs)) . " / $owntot \n" ; print F "" . "\n"; + " / " . scalar(keys(%normpkgs)) . " / $normtot " . "\n"; print F "\n"; -- 1.7.10.4
 Security: " . scalar(keys(%sechosts)) . - " / " . scalar(keys(%secpkgs)) . " Indexdata: " . scalar(keys(%ownhosts)) . - " / " . scalar(keys(%ownpkgs)) . " Normal: " . scalar(keys(%normhosts)) . - " / " . scalar(keys(%normpkgs)) . "
Hosts