samples/net/stats/README.html · samples/net/stats/README.rst 공식 원문 ↗

Zephyr 3.7.0 · Samples · Networking · Statistics

Network statistics

QEMU 또는 native_sim에서 protocol별 수신·송신·drop·error counter를 주기적으로 확인합니다.

Official pathsamples/net/stats/README.html
Source filesamples/net/stats/README.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

공식 19줄 statistics snapshot을 항목과 수치까지 그대로 보존합니다.

Protocols

IPv4 · IPv6 · TCP

Counters

RX · TX · Drop

Targets

QEMU · native_sim

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 1CB7345BA02295D4961B8B6322BC9573F336A57FCBFEF657A5FF6B47731C4C60
.. zephyr:code-sample:: net-stats
   :name: Network statistics
   :relevant-api: net_stats

   Query and display network statistics from a user application.

Overview
********

This sample shows how to query (and display) network statistics from a user
application.

The source code for this sample application can be found at:
:zephyr_file:`samples/net/stats`.

Requirements
************

- :ref:`networking_with_host`

Building and Running
********************

A good way to run this sample application is with QEMU or native_sim board
as described in :ref:`networking_with_host`.

Follow these steps to build the network statistics sample application:

.. zephyr-app-commands::
   :zephyr-app: samples/net/stats
   :board: <board to use>
   :conf: prj.conf
   :goals: build
   :compact:

If everything is configured correctly, the application will periodically print
current network statistics to the console.

.. code-block:: console

    Global network statistics
    IPv6 recv      27	sent	8	drop	0	forwarded	0
    IPv6 ND recv   2	sent	5	drop	2
    IPv6 MLD recv  0	sent	3	drop	0
    IPv4 recv      20	sent	0	drop	20	forwarded	0
    IP vhlerr      0	hblener	0	lblener	0
    IP fragerr     0	chkerr	0	protoer	0
    ICMP recv      15	sent	3	drop	13
    ICMP typeer    0	chkerr	0
    UDP recv       0	sent	0	drop	30
    UDP chkerr     0
    TCP bytes recv 0	sent	0
    TCP seg recv   0	sent	0	drop	0
    TCP seg resent 0	chkerr	0	ackerr	0
    TCP seg rsterr 0	rst	0	re-xmit	0
    TCP conn drop  0	connrst	0
    Bytes received 7056
    Bytes sent     564
    Processing err 1

Part 3

한국어 전문 번역

개요

이 sample은 user application에서 network statistics를 query하고 표시하는 방법을 보여 줍니다.

이 sample application의 source code는 samples/net/stats에서 찾을 수 있습니다.

요구 사항

빌드 및 실행

이 sample application은 Host system과 networking에서 설명하는 방식으로 QEMU 또는 native_sim board에서 실행하는 것이 좋습니다.

Network statistics sample application을 build하려면 다음 단계를 따릅니다.

west build -b <board to use> samples/net/stats -- -DCONF_FILE=prj.conf

모든 설정이 올바르면 application이 현재 network statistics를 주기적으로 console에 출력합니다.

Global network statistics
IPv6 recv      27   sent    8       drop    0       forwarded       0
IPv6 ND recv   2    sent    5       drop    2
IPv6 MLD recv  0    sent    3       drop    0
IPv4 recv      20   sent    0       drop    20      forwarded       0
IP vhlerr      0    hblener 0       lblener 0
IP fragerr     0    chkerr  0       protoer 0
ICMP recv      15   sent    3       drop    13
ICMP typeer    0    chkerr  0
UDP recv       0    sent    0       drop    30
UDP chkerr     0
TCP bytes recv 0    sent    0
TCP seg recv   0    sent    0       drop    0
TCP seg resent 0    chkerr  0       ackerr  0
TCP seg rsterr 0    rst     0       re-xmit 0
TCP conn drop  0    connrst 0
Bytes received 7056
Bytes sent     564
Processing err 1

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.