Package Products :: Package ZenStatus :: Package nmap :: Module PingResult :: Class PingResult
[hide private]
[frames] | no frames]

Class PingResult

source code

object --+
         |
        PingResult

Model of an nmap ping/traceroute result.

Instance Methods [hide private]
 
__init__(self, address, timestamp=None, isUp=False, rtt=_NAN, stddev=_NAN, trace=_NO_TRACE) source code
 
_parseTimestamp(self, hostTree)
Extract timestamp if it exists.
source code
 
_parseTimes(self, hostTree)
Extract round trip time from the hostTree.
source code
 
_parseAddress(self, hostTree)
Extract the address (ip) from the hostTree.
source code
 
_parseState(self, hostTree)
Extract the host status from hostTree: return True if up, False if down.
source code
 
_parseTraceroute(self, hostTree)
Extract the traceroute hops from hostTree in to a list that preserves the hop order and saves the hop rtt.
source code
 
timestamp(self)
Timestamp of when ping was returned (seconds since epoch).
source code
 
address(self)
Address of the host
source code
 
trace(self)
traceroute of the host
source code
 
getStatusString(self)
status string: up or down
source code
 
__repr__(self) source code
 
isUp(self)
true if host is up, false if host is down
source code
 
rtt(self)
round trip time aka ping time aka rtt; nan if host was down
source code
 
variance(self)
variance of the rtt; nan if host was down
source code
 
stddev(self)
standard deviation of the rtt; nan if host was down
source code
Static Methods [hide private]
 
createNmapResult(hostTree)
Contruct an PingResult from an XML parse tree for a host entry.
source code
Method Details [hide private]

__init__(self, address, timestamp=None, isUp=False, rtt=_NAN, stddev=_NAN, trace=_NO_TRACE)
(Constructor)

source code 
Overrides: object.__init__
(inherited documentation)

timestamp(self)

source code 

Timestamp of when ping was returned (seconds since epoch).

Decorators:
  • @property

address(self)

source code 

Address of the host

Decorators:
  • @property

trace(self)

source code 

traceroute of the host

Decorators:
  • @property

__repr__(self)
(Representation operator)

source code 
Overrides: object.__repr__
(inherited documentation)

isUp(self)

source code 

true if host is up, false if host is down

Decorators:
  • @property

rtt(self)

source code 

round trip time aka ping time aka rtt; nan if host was down

Decorators:
  • @property

variance(self)

source code 

variance of the rtt; nan if host was down

Decorators:
  • @property

stddev(self)

source code 

standard deviation of the rtt; nan if host was down

Decorators:
  • @property