• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

src/11-Mar-2024-196154

CMakeLists.txtD11-Mar-2024245 116

KconfigD11-Mar-2024387 1812

README.rstD11-Mar-20241.5 KiB5945

prj.confD11-Mar-20241,008 4729

sample.yamlD11-Mar-2024266 1413

README.rst

1.. _net_stats-sample:
2
3Network Statistics Sample Application
4#####################################
5
6Overview
7********
8
9This sample shows how to query (and display) network statistics from a user
10application.
11
12The source code for this sample application can be found at:
13:zephyr_file:`samples/net/stats`.
14
15Requirements
16************
17
18- :ref:`networking_with_host`
19
20Building and Running
21********************
22
23A good way to run this sample application is with QEMU or native_posix board
24as described in :ref:`networking_with_host`.
25
26Follow these steps to build the network statistics sample application:
27
28.. zephyr-app-commands::
29   :zephyr-app: samples/net/stats
30   :board: <board to use>
31   :conf: prj.conf
32   :goals: build
33   :compact:
34
35If everything is configured correctly, the application will periodically print
36current network statistics to the console.
37
38.. code-block:: console
39
40    Global network statistics
41    IPv6 recv      27	sent	8	drop	0	forwarded	0
42    IPv6 ND recv   2	sent	5	drop	2
43    IPv6 MLD recv  0	sent	3	drop	0
44    IPv4 recv      20	sent	0	drop	20	forwarded	0
45    IP vhlerr      0	hblener	0	lblener	0
46    IP fragerr     0	chkerr	0	protoer	0
47    ICMP recv      15	sent	3	drop	13
48    ICMP typeer    0	chkerr	0
49    UDP recv       0	sent	0	drop	30
50    UDP chkerr     0
51    TCP bytes recv 0	sent	0
52    TCP seg recv   0	sent	0	drop	0
53    TCP seg resent 0	chkerr	0	ackerr	0
54    TCP seg rsterr 0	rst	0	re-xmit	0
55    TCP conn drop  0	connrst	0
56    Bytes received 7056
57    Bytes sent     564
58    Processing err 1
59