Registered User m (Rename eth0 to end0) Tag: 2017 source edit |
Registered User mNo edit summary Tag: 2017 source edit |
||
Line 1: | Line 1: | ||
{{ApplicableFor | <noinclude>{{ApplicableFor | ||
|MPUs list=STM32MP13x, STM32MP15x, STM32MP25x | |MPUs list=STM32MP13x, STM32MP15x, STM32MP25x | ||
|MPUs checklist=STM32MP13x, STM32MP15x, STM32MP25x | |MPUs checklist=STM32MP13x, STM32MP15x, STM32MP25x | ||
}} | }}</noinclude> | ||
==Article purpose== | ==Article purpose== | ||
This article provides the basic information needed to start using the Linux tool: '''netstat''' <ref name=netstatmanpage/>. | This article provides the basic information needed to start using the Linux tool: '''netstat''' <ref name=netstatmanpage/>. | ||
Line 14: | Line 14: | ||
| style="text-align:left;" | '''netstat'''<ref name=netstatmanpage>https://linux.die.net/man/8/netstat</ref> prints network connections, routing tables, interface statistics, masquerade connections, and multicast membership information. | | style="text-align:left;" | '''netstat'''<ref name=netstatmanpage>https://linux.die.net/man/8/netstat</ref> prints network connections, routing tables, interface statistics, masquerade connections, and multicast membership information. | ||
|| {{Y}} || {{Y}} || {{Y}} | || {{Y}} || {{Y}} || {{Y}} | ||
|| {{Y}} || {{ | || {{Y}} || {{N}} || {{Y}} | ||
|- | |- | ||
</onlyinclude> | </onlyinclude> | ||
Line 92: | Line 92: | ||
{{ PublicationRequestId | 9039 | 08Oct'18 }} | {{ PublicationRequestId | 9039 | 08Oct'18 }} | ||
[[Category:Linux monitoring tools]] | [[Category:Linux monitoring tools]] | ||
[[Category:Android]] | |||
</noinclude> | </noinclude> |
Latest revision as of 14:21, 17 July 2024
1. Article purpose[edit | edit source]
This article provides the basic information needed to start using the Linux tool: netstat [1].
2. Introduction[edit | edit source]
The following table provides a brief description of the tool, as well as its availability depending on the software packages:
: this tool is either present (ready to use or to be activated), or can be integrated and activated on the software package.
: this tool is not present and cannot be integrated, or it is present but cannot be activated on the software package.
Tool | STM32MPU Embedded Software distribution | STM32MPU Embedded Software distribution for Android™ | ||||||
---|---|---|---|---|---|---|---|---|
Name | Category | Purpose | Starter Package | Developer Package | Distribution Package | Starter Package | Developer Package | Distribution Package |
netstat | Monitoring tools | netstat[1] prints network connections, routing tables, interface statistics, masquerade connections, and multicast membership information. | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
3. Installing the trace and debug tool on your target board[edit | edit source]
3.1. Using the STM32MPU Embedded Software distribution[edit | edit source]
netstat is installed by default and ready to be used with all STM32MPU Embedded Software Packages.
It comes through the busybox:
which netstat | xargs ls -la
/bin/netstat -> /bin/busybox.nosuid
3.2. Using the STM32MPU Embedded Software distribution for Android™[edit | edit source]
netstat is installed by default and ready to be used with all STM32MPU Embedded Software Packages for Android™.
It comes with the toybox:
which netstat | xargs ls -la
/system/bin/netstat -> toybox
4. Getting started[edit | edit source]
Here are basic commands to start with netstat:
- Display kernel routing information
netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.99.3.254 0.0.0.0 UG 0 0 0 end0
10.99.0.0 0.0.0.0 255.255.252.0 U 0 0 0 end0
10.99.3.254 0.0.0.0 255.255.255.255 UH 0 0 0 end0
- List out listening-only connections
netstat -tnl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:19999 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5355 0.0.0.0:* LISTEN
tcp 0 0 10.99.1.237:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:1534 0.0.0.0:* LISTEN
tcp 0 0 :::19999 :::* LISTEN
tcp 0 0 :::5355 :::* LISTEN
tcp 0 0 :::53 :::* LISTEN
tcp 0 0 :::22 :::* LISTEN
5. To go further[edit | edit source]
Additional documentation is available on Internet about netstat. See References.
Refer to Linux® man page[1] for more details on command options.
6. References[edit | edit source]
- Useful external links
Document link | Document Type | Description |
---|---|---|
netstat (wikipedia.org) | Standard | wikipedia.org |
netstat examples | User Guide | binarytides.com |
netstat main commands | User Guide | geekflare.com |