/[pxelator]/lib/PXElator/ping.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/PXElator/ping.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 481 by dpavlin, Sun Aug 30 17:24:19 2009 UTC revision 482 by dpavlin, Sat Jan 23 18:31:14 2010 UTC
# Line 7  use Net::Ping; Line 7  use Net::Ping;
7  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
8  use Time::HiRes;  use Time::HiRes;
9  use client;  use client;
10  use CouchDB;  use store;
11    
12  sub host {  sub host {
13          my $ip = shift;          my $ip = shift;
# Line 37  sub fping { Line 37  sub fping {
37                  $rtt *= 1000; # ms                  $rtt *= 1000; # ms
38                  client::conf( $ip => 'hostname', default => $host ) if $host ne $ip;                  client::conf( $ip => 'hostname', default => $host ) if $host ne $ip;
39                  $status->{$host} = { host => $host, rtt => $rtt, ip => $ip };                  $status->{$host} = { host => $host, rtt => $rtt, ip => $ip };
40                  CouchDB::audit( $ip, $status->{$host});                  store::audit( $ip, $status->{$host});
41          }          }
42    
43          warn "# fping ",dump($status);          warn "# fping ",dump($status);

Legend:
Removed from v.481  
changed lines
  Added in v.482

  ViewVC Help
Powered by ViewVC 1.1.26