Template:ArticleBasedOnModel Template:ArticleMainWriter
Template:ArticleApprovedVersion
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:UnderConstruction |
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]
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 eth0 10.99.0.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0 10.99.3.254 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
- 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 LinuxTemplate:Sup 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 |