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
This commit is contained in:
parent
500eb3cc87
commit
8adbaaa6a2
@ -9,8 +9,10 @@ use strict;
|
||||
my %output;
|
||||
|
||||
my $option;
|
||||
my $printcount;
|
||||
|
||||
GetOptions("n"=>\$option);
|
||||
GetOptions("n"=>\$option,
|
||||
"c"=>\$printcount);
|
||||
|
||||
while (<STDIN>) {
|
||||
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";
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ B<xcoll> - Formats and consolidates the output of the B<psh>, B<rinv> commands.
|
||||
|
||||
=head1 B<SYNOPSIS>
|
||||
|
||||
B<xcoll> [B<-n>]
|
||||
B<xcoll> [B<-n>] [B<-c>]
|
||||
|
||||
=head1 B<DESCRIPTION>
|
||||
|
||||
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user