status — Plugin for monitoring various aspects of a host

class Status

A plugin for geting the status of various items and operations on your host.

Firewall()
Render the firewall status page
ListeningServices()
Render the listening services page
SystemMonitors(**data)
Render the system monitors page
bandwidth(**options)
Return the current system load average in a json format flot understands. Note: Only returns interfaces with counters greater than 0.
cpu_load(**options)
Return the current CPU utilization stats in a json format flot understands.
filter_table_tab()
Render the (Firewall) filter table status page
get_firewall_spreadsheet(table=None, chain=None)
Exports the user permissions table as a spreadsheet
iptables_json(table=None, chain=None, rows=None, sidx=None, _search=None, searchField=None, searchOper=None, searchString=None, page=None, sord=None, nd=None)
Returns the specified chain from the specified table from the host’s iptables (firewall) rules in a json format that’s compatible with jqGrid.
load_average(**options)
Return the current system load average in a json format flot understands.
mangle_table_tab()
Render the (Firewall) mangle table status page
meminfo(totalmem=None, **options)
Return the current memory utilization in a json format flot understands.
nat_table_tab()
Render the (Firewall) nat table status page
netstat_json(rows=None, sidx=None, _search=None, searchField=None, searchOper=None, searchString=None, page=None, sord=None, nd=None)
Returns the output of ‘netstat -pln’ in a json format that’s compatible with jqGrid.
raw_table_tab()
Render the (Firewall) raw table status page
cpu_utilization(cpu='cpu ', interval=1)

Returns a dict representing each respective field for ‘cpu’ in /proc/stat. Must run twice to return valid results. Note: To get results on all CPUs we need to pass ‘cpu ‘ (note the space).

This is the default. For other CPUs you can specify the number, ‘cpu1’

@cpu: The start of the line in /proc/stat that corresponds with the cpu you want to monitor @interval: That amount of time to wait between checks to calculate the utilization.

get_bandwidth()
Grabs packet data from /proc/net/dev and returns it as a dict
get_netstat()
Returns the result of ‘netstat -pln’ as a list of lists (suitable for use in jqGrid) Each list (in the list) uses the following format: [‘Proto’, ‘Recv-Q’, ‘Send-Q’, ‘Local Address’, ‘Foreign Address’, ‘State’, ‘PID/Program name’]
getloadavg()
Emulates os.getloadavg() since the version of Python on OpenWRT doesn’t have it. ...which is bizarre.
list_chain(iptables_obj, table_name, chain_name, sortname=None, sortorder=None)

Returns the given chain from the given table in list format. Sorted by ‘sortname’ in ‘sortorder’ order (either ‘desc’ or ‘asc’).

Note: ‘table_name’ should be one of ‘filter’, ‘nat’, ‘mangle’, or ‘raw’.

memory_status()
Returns a dict representing the status of memory allocation on this system