projects
/
gnt-info
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
deec60c
)
use gnt-node to get list of nodes
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 28 Jan 2015 19:23:19 +0000
(20:23 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 28 Jan 2015 19:23:19 +0000
(20:23 +0100)
gnt-i
patch
|
blob
|
history
diff --git
a/gnt-i
b/gnt-i
index
19beadc
..
918ee48
100755
(executable)
--- a/
gnt-i
+++ b/
gnt-i
@@
-15,10
+15,14
@@
my $stat;
my $mac_to_name;
my $lines;
-next_argv:
+my @nodes = @ARGV;
+
+@nodes = map { chomp ; $_ } `gnt-node list -o name --no-header` unless @nodes;
+
+next_node:
my $ssh = '';
-if ( @
ARGV
) {
- $hostname = shift @
ARGV
;
+if ( @
nodes
) {
+ $hostname = shift @
nodes
;
$ssh = "ssh $hostname ";
}
@@
-99,7
+103,7
@@
while(<$ip>) {
}
}
-goto next_
argv if @ARGV
;
+goto next_
node if @nodes
;
warn "# stat ", Dumper( $stat ) if $DEBUG;
XXX( @ps_cols );