![]() If you are interested in learning more about nettop, please refer to the man page – on the command line type man nettop. If you want to see the routing table 6 instead of the sockets, on the command line type nettop -m route. In this case, on the command line type nettop -m tcp. Pressing c collapses the display, showing only the network apps (and not their sockets), while pressing e expands the display to show sockets. While nettop is running, pressing p renders the traffic numbers as bytes or in human-readable formats ( KiB for kilobytes and MiB for megabytes). In the final part of this how-to, we will look briefly at formatting options. ![]() While nettop shows more columns than these, these columns cover the basics. Returning to our example network app, Google Chrome, nettop might display something like this:īytes in and bytes out for a socket shows how much traffic has come in and gone out for that socket, while bytes in and bytes out for the network app shows the total traffic for all the sockets belonging to that app. The next columns in entries for the network apps and their sockets show bytes in and bytes out ( since the app was launched). The wildcards for the remote_host means the ntp server on the localhost is listening for any address on any port. In this socket the localhost has an IPv4 address with a port number 123, which is the port number for NTP, or network time protocol, which is used to synchronize computers on the Internet. The last example of nettop entries I'd like to consider is this one: (Without an open socket ready to receive incoming data, incoming data would have to trigger the creation of a socket and that causes delay.) The operating system creates these open sockets as placeholders of sorts, so that it can respond faster to incoming data. The fields for localhost:port and remote_host:port have asterisks in them. You probably noticed many socket entries that looked like these: udp4 just sends data without a confirmation of its receipt. tcp4 guarantees that both ends of a transmission are aware of one another. Like tcp4, udp4 transmits datagrams, but the connection is one-way. You might also notice many lines that use the Transport Protocol identifier udp4. 3, 4That is followed by the localhost’s IP address port number remote host’s IP address port number 5, the network interface (which in the example is en1), and a connection state of Established. tcp4 means “Transmission Control Protocol/Internet Protocol version 4”. Line three shows one network socket listed for the application. Line two begins with the name of the network application (Google Chrome), separated by a period from the process ID (which in the example is 7523). state refers to the state of the connection between sockets (the state of a server waiting for a connection on a port is LISTEN, the state of a connection recently closed is TimeWait and in this sample entry, Established means the connection is active). in this case, the network interface is a WiFi transciever. interface refers to the network interface ( lo0 means loopback interface, en0 means wired physical network connection, en1 means wireless and fw0 means firewire). ![]() In line one of the sample entry are nettop's column headings. If you have Google Chrome open, nettop will show you columnated information similar to the lines below (here we’re presenting just the first few columns): Now, let’s look closer at one of the entries. If you do this while your computer is connected to the network, Terminal will fill with information about your network sockets. After Terminal opens, type nettop on the command line and hit return. From the Finder menu, choose Go -> Utilities -> Terminal. In this article we will cover how to run nettop, how to read its output, and how to format that output for readability. Running the command is easy however, reading the output needs a little more in-depth explanation. The article covers the command-line program nettop, which displays updated information about network traffic. The reader can be at a beginning or intermediate level of computer knowledge and skills. This article is intended for the Mac user who wants to learn more about which applications are accessing the network, what state the network traffic is in, and the amount of consumed resources. In this article we will cover how to run nettop, how to read its output, and how to format that output. Nettop is a command-line program that displays updated information about network traffic. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |