pyfarm.agent.sysinfo.network module

Network

Returns information about the network including ip address, dns, data sent/received, and some error information.

const IP_PRIVATE:
 

set of private class A, B, and C network ranges

See also

RFC 1918

const IP_NONNETWORK:
 

set of non-network address ranges including all of the above constants except the IP_PRIVATE

pyfarm.agent.sysinfo.network.mac_addresses(long_addresses=False, as_integers=False)[source]

Returns a tuple of all mac addresses on the system.

Parameters:
  • long_addresses (bool) – Some adapters will specify a mac address which is longer than the standard value of six pairs. Setting this value to True will allow these to be displayed.
  • as_integers (bool) – When True convert all mac addresses to integers.
pyfarm.agent.sysinfo.network.hostname(trust_name_from_ips=True)[source]

Returns the hostname which the agent should send to the master.

Parameters:trust_resolved_name (bool) – If True and all addresses provided by addresses() resolve to a single hostname then just return that name as it’s the most likely hostname to be accessible by the rest of the network.
pyfarm.agent.sysinfo.network.addresses(private_only=True)[source]

Returns a tuple of all non-local ip addresses.

pyfarm.agent.sysinfo.network.interfaces()[source]

Returns the names of all valid network interface names