Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

µC/TCP-IP maintains run-time statistics on interfaces and most µC/TCP-IP object pools. If desired, an application can thus query µC/TCP-IP to find out how many frames have been processed on a particular interface, transmit and /receive performance metrics, buffer utilization and more. An application can also reset the statistic pools back to their initialization initial values via appropriate API.

...

The data structure is shown below:

Code Block
languagecpp
themeConfluence
firstline1
titleObject pool statistics data structure
linenumberstrue
typedef struct net_stat_pool {
    NET_TYPE           Type;
    NET_STAT_POOL_QTY  EntriesInit;
    NET_STAT_POOL_QTY  EntriesTotal;
    NET_STAT_POOL_QTY  EntriesAvail;
    NET_STAT_POOL_QTY  EntriesUsed;
    NET_STAT_POOL_QTY  EntriesUsedMax;
    NET_STAT_POOL_QTY  EntriesLostCur;
    NET_STAT_POOL_QTY  EntriesLostTotal;
    CPU_INT32U         EntriesAllocatedCtr;
    CPU_INT32U         EntriesDeallocatedCtr;
} NET_STAT_POOL;


NET_STAT_POOL_QTY  is a data type currently set to  CPU_INT16U  and thus contains a maximum count of 65535.

Access to buffer statistics is obtained via interface functions that the application can call (described in the next sections). Most likely, only the following variables in NET_STAT_POOL need to be examined, because the .Type member is configured at initialization time as NET_STAT_TYPE_POOL :

.EntriesAvail

This variable indicates how many buffers are available in the pool.

...

This variable indicates the total number of times buffers were returned back to the buffer pool. 

In order to enable run-time statistics, must be enabled, see Network Counters Configuration.

...