Home![]() ![]() Network ![]() ![]() Graphics ![]() ![]() ![]() Programming ![]() ![]() ![]() Misc ![]() System ![]() ![]() ![]() ![]() Help out Distributions specific ![]() ![]() contact interesting sites ![]() manpages tools FAQ Sitemap Imprint poll results Last additions: using iotop to find disk usage hogs using iotop to find disk usage hogs words:887 views:201019 userrating:average rating: 1.7 (102 votes) (1=very good 6=terrible) May 25th. 2007: Words why adblockers are bad486 Views253318 Workaround and fixes for the current Core Dump Handling vulnerability affected kernels Workaround and fixes for the current Core Dump Handling vulnerability affected kernels words:161 views:142441 userrating:average rating: 1.4 (42 votes) (1=very good 6=terrible) April, 26th. 2006: Words New subdomain: toolsntoys.linuxhowtos.org38 Views102264 How to force a check of the file systems How to force a check of the file systems words:179 views:34113 userrating:average rating: 1.4 (62 votes) (1=very good 6=terrible) Oct, 18th. 2005: Words New features online: interactive search function34 Views56414 Sep, 5th. 2005: Words New website design online51 Views44374 Aug, 27th 2005: Words Existing articles can be edited by anyone now.134 Views11901 | Using netstatJust typing netstat should display a long list of information that's usually more than you want to go through at any given time. For example, if you only want to see TCP connections, use netstat --tcp. Note: To speed things up you can use the --numeric option to avoid having to do name resolution on addresses and display the IP only. Code Listing 1: netstat --tcp % netstat --tcp --numeric If you want to see what (TCP) ports your machine is listening on, use netstat --tcp --listening. Code Listing 2: netstat --tcp --listening --programs # sudo netstat --tcp --listening --programs Note: Using --all displays both connections and listening ports. The next example uses netstat --route to display the routing table. For most people, this will show one IP and and the gateway address but if you have more than one interface or have multiple IPs assigned to an interface, this command can help troubleshoot network routing problems. Code Listing 3: netstat --route % netstat --route The last example of netstat uses the --statistics flag to display networking statistics. Using this flag by itself displays all IP, TCP, UDP, and ICMP connection statistics. Code Listing 4: netstat --statistics --route % netstat --statistics --raw Note: For verbosity, the long names for the various flags were given. Most can be abbreviated to avoid excessive typing (e.g. netstat -tn, netstat -tlp, netstat -r, and netstat -sw). While netstat is a common utility, hopefully this has demonstrated some different ways to make use of the command. For more information see man 8 netstat. From http://www.gentoo.org/news/en/gwn/20030929-newsletter.xml rate this article: current rating: average rating: 1.1 (2994 votes) (1=very good 6=terrible) Your rating: back |