deleted>Frq07399 mNo edit summary |
Registered User mNo edit summary Tag: 2017 source edit |
||
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude>{{ApplicableFor | ||
{{ | |MPUs list=STM32MP13x, STM32MP15x, STM32MP21x, STM32MP23x, STM32MP25x | ||
|MPUs checklist=STM32MP13x, STM32MP15x, STM32MP21x, STM32MP23x, STM32MP25x | |||
}}</noinclude> | |||
</noinclude> | |||
==Article purpose== | ==Article purpose== | ||
Line 18: | 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}} || {{N}} || {{Y}} | ||
|- | |- | ||
</onlyinclude> | </onlyinclude> | ||
Line 28: | Line 24: | ||
It comes through the '''busybox''': | It comes through the '''busybox''': | ||
{{Board$}} which netstat | xargs ls -la | {{Board$}}which netstat | xargs ls -la | ||
/bin/netstat -> /bin/busybox.nosuid | /bin/netstat -> /bin/busybox.nosuid | ||
=== Using the STM32MPU Embedded Software distribution for Android™ === | === Using the STM32MPU Embedded Software distribution for Android™ === | ||
{{ | '''netstat''' is installed by default and ready to be used with all STM32MPU Embedded Software Packages for Android™. | ||
It comes with the '''toybox''': | |||
{{Board$}}which netstat | xargs ls -la | |||
/system/bin/netstat -> toybox | |||
==Getting started== | ==Getting started== | ||
Line 38: | Line 38: | ||
* Display kernel routing information | * Display kernel routing information | ||
{{Board$}} netstat -rn | {{Board$}}netstat -rn | ||
Kernel IP routing table | Kernel IP routing table | ||
Destination Gateway Genmask Flags MSS Window irtt Iface | Destination Gateway Genmask Flags MSS Window irtt Iface | ||
0.0.0.0 10.99.3.254 0.0.0.0 UG 0 0 0 | 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 | 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 | 10.99.3.254 0.0.0.0 255.255.255.255 UH 0 0 0 end0 | ||
* List out listening-only connections | * List out listening-only connections | ||
{{Board$}} netstat -tnl | {{Board$}}netstat -tnl | ||
Active Internet connections (only servers) | Active Internet connections (only servers) | ||
Proto Recv-Q Send-Q Local Address Foreign Address State | Proto Recv-Q Send-Q Local Address Foreign Address State | ||
Line 63: | Line 63: | ||
Additional documentation is available on Internet about '''netstat'''. See [[#References|References]]. | Additional documentation is available on Internet about '''netstat'''. See [[#References|References]]. | ||
Refer to Linux | Refer to Linux<sup>®</sup> man page<ref name=netstatmanpage/> for more details on command options. | ||
== References == | == References == | ||
Line 87: | Line 87: | ||
| geekflare.com | | geekflare.com | ||
|} | |} | ||
<noinclude> | |||
{{ ArticleBasedOnModel | Trace and debug tools article model }} | |||
{{ PublicationRequestId | 9039 | 08Oct'18 }} | |||
[[Category:Linux monitoring tools]] | |||
[[Category:Android]] | |||
</noinclude> |
Latest revision as of 14:37, 23 June 2025
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:
Template:Y: this tool is either present (ready to use or to be activated), or can be integrated and activated on the software package.
Template:N: 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. | Template:Y | Template:Y | Template:Y | Template:Y | Template:N | Template:Y |
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:
Template:Board$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:
Template:Board$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
Template:Board$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
Template:Board$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 |