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.