User Tools

Site Tools


uphp:functions:netstat

netstat

WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0

Get Ethernet information

Description

array netstat ( )

This function returns an array containing information about the state of the network interface

Parameters

None

Return Values

Array containing the following keys and values:

KEYTYPEVALUE
max_http_connectionsintThe number of HTTP connections allowed
max_connectionsintThe total number of TCP connections allowed
internet_connectedintReturns 1 if Internet is connected (only available in fw x.1203+)
interfaceintReturns 0 for Ethernet, 1 for Cellular, 2 for WiFi (only available in fw x.1203+)
connX_socket1)intSocket number for connection X
connX_stageintSocket status for connection X
connX_infostringInformation about the connection if any. For connection info string details, see the sample below.
connX_remotestringRemote host IP address

Sample Connection Value

Open:0|Aborted:0|Process:0|Path:\app\|Fn:devcalib_ajax.cgi|Type:3|Time:0|Fstage:7|Context:0|Sockstate:4

Example

<?
  $arr=netstat();
  print("Total connections available: ".$arr['max_connections']);
?>

See Also

setusbpower() - Enable or disable USB power

net_enable3g() - Enable 3G support for the dongle

net_disable3g() - Disable 3G support for the dongle

getethstat() - Get Ethernet connection status information

1)
Zero-based connection number, up to max_connections-1
uphp/functions/netstat.txt · Last modified: 2021/12/10 09:18 by admin