git.annexia.org
/
virt-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f3691aa
)
virt-ping
master
author
Richard Jones
<rjones@trick.home.annexia.org>
Tue, 29 Sep 2009 18:18:53 +0000
(19:18 +0100)
committer
Richard Jones
<rjones@trick.home.annexia.org>
Tue, 29 Sep 2009 18:18:53 +0000
(19:18 +0100)
tools/virt-uname.pl
patch
|
blob
|
history
diff --git
a/tools/virt-uname.pl
b/tools/virt-uname.pl
index
3ff8d4c
..
a0a5935
100755
(executable)
--- a/
tools/virt-uname.pl
+++ b/
tools/virt-uname.pl
@@
-229,7
+229,7
@@
virt-tools is available and working inside the guest.
sub title_ping
{
- print_row (__"Guest");
+ print_row (__"Guest"
, __"Status"
);
}
sub do_ping
@@
-238,8
+238,13
@@
sub do_ping
my $key = shift;
my $transport = shift;
-
-
+ my $session = get_snmp_session ($key, $transport);
+ my $sysUpTime = "1.3.6.1.2.1.1.3.0";
+ my $r = $session->get_request (-varbindlist => [$sysUpTime])
+ or die __x("SNMP error: {e}", $session->error);
+ print STDERR "ping: sysUpTime = $r->{$sysUpTime}\n" if $verbose;
+ print_row ($domname, "ok");
+ $session->close;
}
=head1 virt-uname