From 8adbaaa6a202bf976d1d900991ae6fbe3d324a5f Mon Sep 17 00:00:00 2001 From: mellor Date: Thu, 19 May 2011 20:38:12 +0000 Subject: [PATCH] add -c flag to xcoll to print total nodecount for each set of output git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9639 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/xcoll | 8 +++++++- xCAT-client/pods/man1/xcoll.1.pod | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/xCAT-client/bin/xcoll b/xCAT-client/bin/xcoll index 70b9f2922..ef5a47a90 100755 --- a/xCAT-client/bin/xcoll +++ b/xCAT-client/bin/xcoll @@ -9,8 +9,10 @@ use strict; my %output; my $option; +my $printcount; -GetOptions("n"=>\$option); +GetOptions("n"=>\$option, + "c"=>\$printcount); while () { my $node; @@ -48,6 +50,10 @@ foreach my $output (keys %collated) { print "====================================\n"; print "$nodes\n"; print "====================================\n"; + if ($printcount) { + print "Node count = ".scalar( keys %{$collated{$output}})." \n"; + print "====================================\n"; + } print $output; print "\n"; } diff --git a/xCAT-client/pods/man1/xcoll.1.pod b/xCAT-client/pods/man1/xcoll.1.pod index 239c30160..0d373b10e 100644 --- a/xCAT-client/pods/man1/xcoll.1.pod +++ b/xCAT-client/pods/man1/xcoll.1.pod @@ -4,7 +4,7 @@ B - Formats and consolidates the output of the B, B commands. =head1 B -B [B<-n>] +B [B<-n>] [B<-c>] =head1 B @@ -48,6 +48,10 @@ is identical: =over 3 +=item B<-c> + +Display a total nodecount for each set of output. + =item B<-n> Display output as nodenames instead of groupnames.