Fathom v0.2

component fathom.system

This component provides functions for invoking specific commands on the host and retrieveing configuration and status information.
This entire module needs a fair bit of work, both in terms of error checking as well as normalizing the returned output to abstract platform idiosyncrasies. Ideally, for functions that involve incremental results (such as ping or traceroute), it would also invoke the callbacks repeatedly, conveying enough context to allow the caller to piece together the results.

Methods

Methods Returns Description
doPing( callback, host, count ) void static This function runs an ICMP ping to the given destination and, upon completion, returns the textual results.

Parameters:

  • callback <function> The callback Fathom invokes once the call completes. If successful, the result is a dictionary with three members: "exitstatus" (the numeric exit status of the invocation), "stdout" (data rendered to standard output), and "stderr" (data rendered to standard error).
  • host <string> The host (name or IP address) to ping.
  • count <integer> The number of pings to attempt.
doTraceroute( callback, host ) void static This function runs a traceroute to the given destination and, upon completion, returns the textual results.

Parameters:

  • callback <function> The callback Fathom invokes once the call completes. If successful, the result is a dictionary with three members: "exitstatus" (the numeric exit status of the invocation), "stdout" (data rendered to standard output), and "stderr" (data rendered to standard error).
  • host <string> The host (name or IP address) to run a traceroute to.
getActiveInterfaces( callback ) void static This function retrieves the current status of the clients' network interfaces.

Parameters:

  • callback <function> The callback Fathom invokes once the call completes. If successful, the result is a dictionary with three members: "exitstatus" (the numeric exit status of the invocation), "stdout" (data rendered to standard output), and "stderr" (data rendered to standard error).
getArpCache( callback ) void static This function retrieves the current contents of the ARP cache.

Parameters:

  • callback <function> The callback Fathom invokes once the call completes. If successful, the result is a dictionary with three members: "exitstatus" (the numeric exit status of the invocation), "stdout" (data rendered to standard output), and "stderr" (data rendered to standard error).
getIfaceStats( callback ) void static This function retrieves interface performance counters (bytes, packets, errors, etc).

Parameters:

  • callback <function> The callback Fathom invokes once the call completes. If successful, the result is a dictionary with three members: "exitstatus" (the numeric exit status of the invocation), "stdout" (data rendered to standard output), and "stderr" (data rendered to standard error).
getLoad( callback ) void static This function retrieves the client's current system load via "top".
Windows is currently not supported.

Parameters:

  • callback <function> The callback Fathom invokes once the call completes. If successful, the result is a dictionary with three members: "exitstatus" (the numeric exit status of the invocation), "stdout" (data rendered to standard output), and "stderr" (data rendered to standard error).
getMemInfo( callback ) void static This function retrieves the client's current memory load via "proc".
Windows is currently not supported.

Parameters:

  • callback <function> The callback Fathom invokes once the call completes. If successful, the result is a dictionary with three members: "exitstatus" (the numeric exit status of the invocation), "stdout" (data rendered to standard output), and "stderr" (data rendered to standard error).
getNameservers( callback ) void static This function retrieves information about the client's DNS resolver configuration.

Parameters:

  • callback <function> The callback Fathom invokes once the call completes. If successful, the result is a dictionary with three members: "exitstatus" (the numeric exit status of the invocation), "stdout" (data rendered to standard output), and "stderr" (data rendered to standard error).
getProxyInfo( url ) dictionary static This function retrieves the client's current system load via "top".
(1) Windows is currently not supported. (2) If no proxy applies, the result could be null or some such, not a dictionary with null members, for convenience. (3) The results are quite Firefox-specific.

Parameters:

  • url <string> The URL for which the function looks up the applicable proxy configuration.
    • Returns:

      • <dictionary> The result describes the proxy. For explanation of the dictionary keys, see MDN.
getRoutingTable( callback ) void static This function retrieves the client's current routing table.

Parameters:

  • callback <function> The callback Fathom invokes once the call completes. If successful, the result is a dictionary with three members: "exitstatus" (the numeric exit status of the invocation), "stdout" (data rendered to standard output), and "stderr" (data rendered to standard error).
getWifiInfo( callback ) void static This function retrieves status information from the wireless interfaces on the system and, upon completion, returns the textual results.

Parameters:

  • callback <function> The callback Fathom invokes once the call completes. If successful, the result is a dictionary with three members: "exitstatus" (the numeric exit status of the invocation), "stdout" (data rendered to standard output), and "stderr" (data rendered to standard error).
getWifiStats( callback ) void static This function retrieves link quality parameters for WiFi interfaces.

Parameters:

  • callback <function> The callback Fathom invokes once the call completes. If successful, the result is a dictionary with three members: "exitstatus" (the numeric exit status of the invocation), "stdout" (data rendered to standard output), and "stderr" (data rendered to standard error).