Module: fathom/system

fathom.system.* namespace. Methods for obtaining various system and browser information and for running system commands such as nslookup, ping or iperf.
Source:

Methods

(static) doIperf(callback, host, opt, incrementaloutput)

This function runs system iperf (client mode) to the given destination and, upon completion, returns the results as JSON.
Parameters:
Name Type Description
callback function The callback Fathom invokes once the call completes. On error contains "error" member.
host string The host (name or IPv4 address) of the server.
opt object Optional parameters (proto, bandwidth, time, num, port, len, window).
incrementaloutput boolean Send incremental output.
Source:

(static) doPing(callback, host, opt, incrementaloutput)

This function runs an ICMP ping to the given destination and, upon completion, returns the results as JSON.
Parameters:
Name Type Description
callback function The callback Fathom invokes once the call completes. On error contains "error" member.
host string The host (name or IPv4/IPv6 address) to ping.
opt object Optional parameters (count, iface, interval, bcast).
incrementaloutput boolean Send incremental output (optional - default false).
Source:

(static) doPingToHop(callback, hop, opt, dst, incrementaloutput)

This function runs an ICMP ping to a host at given number of hops away and, upon completion, returns the results as JSON. The implementation uses a ping with TTL=hop to figure out the IP address to ping. May fail if the host does not reply with 'time to live exceeded'. If hop=0, pings the loopback interface.
Parameters:
Name Type Description
callback function The callback Fathom invokes once the call completes. On error contains "error" member.
hop string The hop (0 == localhost, 1 == default gateway, etc) to ping.
opt object Optional parameters (count, iface, interval, bcast).
dst string The destination towards which the route is resolved (optional).
incrementaloutput boolean Send incremental output (optional - default false).
Source:

(static) doPingTr(callback, host, opt, incrementaloutput)

This function emulates traceroute using ping (for platforms that do not have traceroute or when UDP is blocked).
Parameters:
Name Type Description
callback function The callback Fathom invokes once the call completes. On error contains "error" member.
host string The host (name or IP/IPv6 address) to run a ping traceroute to.
opt object Optional parameters (count, iface, interval, timeout).
incrementaloutput boolean Send incremental output (optional - default false).
Source:

(static) doTraceroute(callback, host, opt, incrementaloutput)

This function runs a traceroute to the given destination and, upon completion, returns the results as JSON.
Parameters:
Name Type Description
callback function The callback Fathom invokes once the call completes. On error contains "error" member.
host string The host (name or IP/IPv6 address) to run a traceroute to.
opt object Optional parameters (count, iface, waittime).
incrementaloutput boolean Incremental output (optional - default false).
Source:

(static) getActiveInterfaces(callback)

This function retrieves the list of active network interfaces and their configuration. An interface is considered active if the OS has explicitely flagged it as active or if the interface has a configured IP address.
Parameters:
Name Type Description
callback function The callback Fathom invokes once the call completes. On error contains "error" member.
Source:

(static) getBrowserMemoryUsage(callback)

Get the browser's memory use using XPCOM APIs (see MDN for more info). Currently disabled on OS X due to a bug #1122322 that causes the browser to crash erratically.
Parameters:
Name Type Description
callback function The callback Fathom invokes once the call completes. On error contains "error" member.
Source:

(static) getCertificateChain(callback, uri)

Get the certificate chain information for the specified uri using XPCOM APIs (see MDN for more info).
Parameters:
Name Type Description
callback function The return callback. Returns the response or an object with error field in case of failure.
uri string The complete uri for which the certificate chain should be resolved.
Source:

(static) getHostname(callback)

Get the hostname.
Parameters:
Name Type Description
callback function The callback Fathom invokes once the call completes. On error contains "error" member.
Source:

(static) getIfaceStats(callback)

This function retrieves interface performance counters (bytes, packets, errors, etc).
Parameters:
Name Type Description
callback function The callback Fathom invokes once the call completes. On error contains "error" member.
Source:

(static) getInterfaces(callback)

This function retrieves the list of all available network interfaces and their configuration.
Parameters:
Name Type Description
callback function The callback Fathom invokes once the call completes. On error contains "error" member.
Source:

(static) getLoad(callback)

This function retrieves the client's current system load using "top". Not available on windows platform.
Parameters:
Name Type Description
callback function The callback Fathom invokes once the call completes. On error contains "error" member.
Source:

(static) getMemInfo(callback)

This function retrieves the client's current memory use. Not available on darwin platform.
Parameters:
Name Type Description
callback function The callback Fathom invokes once the call completes. On error contains "error" member.
Source:

(static) getNameservers(callback)

This function retrieves information about the DNS resolver configuration.
Parameters:
Name Type Description
callback function The callback Fathom invokes once the call completes. On error contains "error" member.
Source:

(static) getOS() → {string}

This function returns the client OS name.
Source:
Returns:
OS name.
Type
string

(static) getProxyInfo(callback, url) → {dictionary}

Get the browser's proxy configuration for a particular URL using XPCOM APIs (see MDN for more info).
Parameters:
Name Type Description
callback function The callback Fathom invokes once the call completes. On error contains "error" member.
url string The URL for which the function looks up the applicable proxy configuration.
Source:
Returns:
The result describes the proxy. For explanation of the dictionary keys, see MDN.
Type
dictionary

(static) getRoutingTable(callback)

This function retrieves the client's current routing table and the default gateway.
Parameters:
Name Type Description
callback function The callback Fathom invokes once the call completes. On error contains "error" member.
Source:

(static) getWifiInterface(callback)

This function retrieves the wireless network interface and its configuration (if available).
Parameters:
Name Type Description
callback function The callback Fathom invokes once the call completes. On error contains "error" member.
Source:

(static) getWifiNetworks(callback, timeout)

This function gets the list of nearby wireless access points.
Parameters:
Name Type Description
callback function The callback Fathom invokes once the call completes. On error contains "error" member.
timeout integer The delay in milliseconds between scan start and second call to fetch the results. Default 5000ms (5 sec).
Source:

(static) getWifiSignal(callback)

This function retrieves link quality parameters for WiFi interfaces.
Parameters:
Name Type Description
callback function The callback Fathom invokes once the call completes. On error contains "error" member.
Source:

(static) nslookup(callback, arg)

Call nslookup to resolve host names.
Parameters:
Name Type Description
callback function The callback Fathom invokes once the call completes. On error contains "error" member.
arg string The name to lookup.
Source:

(static) resolveHostname(callback, url)

This function uses XPCOM APIs to resolve the IP address of the hostname (see MDN for more info).
Parameters:
Name Type Description
callback function Fathom invokes this callback upon arrival of the DNS response. If successful, the callback receives a dictionary whose members convey the DNS response.
url string URL containing the name to look up.
Source:

(static) resolveUrl(callback, url)

This function uses XPCOM APIs to resolve the IP address of the URL's hostname (see MDN for more info).
Parameters:
Name Type Description
callback function Fathom invokes this callback upon arrival of the DNS response. If successful, the callback receives a dictionary whose members convey the DNS response.
url string URL containing the name to look up.
Source: