DB2 10.5 for Linux, UNIX, and Windows

ENV_GET_NETWORK_RESOURCES table function - Return network information

The ENV_GET_NETWORK_RESOURCES table function returns information for all active network adaptors on the host machines running DB2®.

Authorization

One of the following authorizations is required:
  • EXECUTE privilege on the table function
  • DATAACCESS authority
  • DBADM authority
  • SQLADM authority

The schema is SYSPROC.

Default PUBLIC privilege

None

Example

SELECT varchar(adapter_name, 20) as name, 
       packets_received, 
       packets_sent,
       total_bytes_received,
       total_bytes_sent
FROM TABLE(ENV_GET_NETWORK_RESOURCES())
The query returns the following input:
NAME                             PACKETS_RECEIVED PACKETS_SENT TOTAL_BYTES_RECEIVED
-------------------------------- ---------------- ------------ --------------------
lo                                      467182039    467182039         528451011980
eth0                                    426287355    431398744         351656704796
eth1                                            0            0                    0

 TOTAL_BYTES_SENT
 ----------------
     528451011980
     272061746005
                0

Information returned

Table 1. Information returned by the ENV_GET_NETWORK_RESOURCES table function
Column name Data type Description
MEMBER SMALLINT member - Database member monitor element
HOST_NAME VARCHAR(255) host_name - Host name monitor element
ADAPTER_NAME VARCHAR(255) adapter_name - Adapter name monitor element
PACKETS_RECEIVED BIGINT packets_received - Packets received monitor element
PACKETS_SENT BIGINT packets_sent - Packets sent monitor element
PACKET_RECEIVE_ERRORS BIGINT packet_receive_errors - Packet receive errors monitor element
PACKET_SEND_ERRORS BIGINT packet_send_errors - Packet send errors monitor element
TOTAL_BYTES_RECEIVED BIGINT total_bytes_received - Total bytes received monitor element
TOTAL_BYTES_SENT BIGINT total_bytes_sent - Total bytes sent monitor element