Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network socket info using objcore #63339

Merged
merged 2 commits into from Oct 24, 2023

Conversation

jukkar
Copy link
Member

@jukkar jukkar commented Sep 30, 2023

Experimenting with object core API to get information about network sockets and show the info in net-shell.

@peter-mitsis
Copy link
Collaborator

This looks great so far!

subsys/net/lib/sockets/sockets.c Outdated Show resolved Hide resolved
subsys/net/lib/sockets/sockets.c Outdated Show resolved Hide resolved
subsys/net/lib/sockets/sockets.c Outdated Show resolved Hide resolved
subsys/net/lib/sockets/sockets.c Outdated Show resolved Hide resolved
Use the generic object core support to track network sockets
and their statistics.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The new "net sockets" command will utilize the object core
support to track and show information about BSD sockets that
are created in the system. This command is able to show info
for all network sockets (native, offloaded etc) in the system.

Example of the output of the new command:

uart:~$ net sockets
 Creator  Name       Flags  FD   Lifetime (ms) Sent  Received

    main  af_inet46  6ST    0    3260          819   498
    main  af_inet46  4ST    1    2110          469   142
    main  af_inet46  6DU    2    2110          9941  9941
    main  af_inet46  4DU    3    2110          1375  621

4 active sockets found.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Copy link
Contributor

@rlubos rlubos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@carlescufi carlescufi merged commit 8a58104 into zephyrproject-rtos:main Oct 24, 2023
19 checks passed
@jukkar jukkar deleted the obj-core-for-sockets branch October 24, 2023 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants