All Projects → Emanem → Nettop

Emanem / Nettop

Licence: gpl-3.0
Utility to show network traffic (both TCP and UDP v4 and v6) split by process and remote host

Programming Languages

cpp
1120 projects

Projects that are alternatives of or similar to Nettop

Wifi Password
Quickly fetch your WiFi password and if needed, generate a QR code of your WiFi to allow phones to easily connect
Stars: ✭ 2,325 (+1335.19%)
Mutual labels:  network
Ccna60d
60天通过思科认证的网络工程师考试
Stars: ✭ 155 (-4.32%)
Mutual labels:  network
Java Notes
☕️ Java 基础 👫 面向对象思想✏️ 算法 📝 操作系统 ☁️ 网络 💾 数据库 🙊 Spring 💡 系统架构🐘大数据
Stars: ✭ 160 (-1.23%)
Mutual labels:  network
Multimaster fkie
ROS stack with FKIE packages for multi-robot (discovering, synchronizing and management GUI)
Stars: ✭ 150 (-7.41%)
Mutual labels:  network
Curlsharp
CurlSharp - .Net binding and object-oriented wrapper for libcurl.
Stars: ✭ 153 (-5.56%)
Mutual labels:  network
Sriov Network Device Plugin
SRIOV network device plugin for Kubernetes
Stars: ✭ 157 (-3.09%)
Mutual labels:  network
K8s Testsuite
Test suite for Kubernetes
Stars: ✭ 149 (-8.02%)
Mutual labels:  network
React Native Network Logger
An HTTP network request monitor for React Native with in-app interface for iOS and Android with no native code
Stars: ✭ 161 (-0.62%)
Mutual labels:  network
Kalm.js
The socket manager
Stars: ✭ 155 (-4.32%)
Mutual labels:  network
Dublin Traceroute
Dublin Traceroute is a NAT-aware multipath tracerouting tool
Stars: ✭ 159 (-1.85%)
Mutual labels:  network
Ecs
ECS for Unity with full game state automatic rollbacks
Stars: ✭ 151 (-6.79%)
Mutual labels:  network
Ebooks
A repository for ebooks, including C, C plus plus, Linux Kernel, Compiler, OS, Algorithm, Security, Database, Network, ML and DL
Stars: ✭ 151 (-6.79%)
Mutual labels:  network
Wormholy
iOS network debugging, like a wizard 🧙‍♂️
Stars: ✭ 2,010 (+1140.74%)
Mutual labels:  network
Keras Serving
bring keras-models to production with tensorflow-serving and nodejs + docker 🍕
Stars: ✭ 150 (-7.41%)
Mutual labels:  network
Joincap
Merge multiple pcap files together, gracefully.
Stars: ✭ 159 (-1.85%)
Mutual labels:  network
Dotzu
📱👀 In-App iOS Debugging Tool With Enhanced Logging, Networking Info, Crash reporting And More.
Stars: ✭ 1,802 (+1012.35%)
Mutual labels:  network
Ofxgpio
Library C++ for raspberrypi and orangepi, GPIO interfaces compatible with openframeworks.
Stars: ✭ 155 (-4.32%)
Mutual labels:  network
Zxrequestblock
基于NSURLProtocol一句话实现iOS应用底层所有网络请求拦截(含网页ajax请求拦截【不支持WKWebView】)、一句话实现防抓包(使Thor,Charles,Burp等代理抓包方式全部失效,且即使开启了代理,也不影响App内部的正常请求)。包含http-dns解决方法,有效防止DNS劫持。用于分析http,https请求等
Stars: ✭ 160 (-1.23%)
Mutual labels:  network
Libae
redis's async event loop library
Stars: ✭ 160 (-1.23%)
Mutual labels:  network
Potatso
Potatso is an iOS client that implements Shadowsocks proxy with the leverage of NetworkExtension framework. ***This project is unmaintained, try taking a look at this fork https://github.com/shadowcoel/shadowcoel instead.
Stars: ✭ 1,925 (+1088.27%)
Mutual labels:  network

nettop

Utility to show network traffic (both TCP and UDP v4 and v6) split by process and remote host. You can find more info (albeit slightly outdated) here.

nettop in action

Building

Download the repository and invoke make (make release for optimized build - reccomended when you want to use it properly and not degbugging/experimenting with it). Please note you need to have some dependencies satisfied (see following).

libpcap

nettop relies on libpacap to intercept all packets and deliver a copy to the application. On Ubuntu and Debian derivatives you should install the -dev version (i.e. sudo apt install libpcap-dev).

ncurses

nettop relies on ncurses to facilitate the UI drawing on console; on Ubuntu-like systems please install libncurses5-dev or more recent to allow compiling.

Running

All commands

Usage: ./nettop [options]
Executes nettop 0.5

-r, --refresh s			sets the refresh rate in 's' seconds (default 3)
-c, --capture (a|s|r)		Capture mode for 'a'll, 's'end and 'r'ecv only (default 'a')
-o, --order (a|d)		Ordering of results, 'a'scending, 'd'escending (default 'd')
    --filter-zero		Set to filter all zero results (default not set)
    --tcp-udp-split		Displays split of TCP and UDP traffic in % (default not set)
-n, --no-resolve		Do not resolve addresses, leave IPs to be displayed
-a, --async-log-file (file)	Sets an output file where to store the packets attribued to the 'kernel' (default not set)
-l, --limit-hosts-rows		Limits maximum number of hosts rows per pid (default no limit)
    --help			prints this help and exit

Press 'q' or 'ESC' inside nettop to quit, 'SPACE' or 'p' to pause nettop

Sample usage

sudo ./nettop --tcp-udp-split --limit-hosts-rows 20

This will start nettop and split between TCP and UDP usage, limiting how many hosts to display by the topmost 20.

sudo requirements

Please note nettop needs to have root privileges to intercept all packets incoming and outgoing from current computer. Without root access it's unlikely to run.

F.A.Q.

Why did you build this?

I wanted to have a simple utility to monitor the network usage of all my processes, especially trying to understand where my data was coming from and going to. I couldn't find anything which would just do this out of the box, so I wrote a utility.

Is it safe to run as root?

I would think so - anyhow, look at the sources. If you don't trust what I'm doing, download the repo, inspect the code, compile, play around and let me know!

what are the 5 numbers between brackets on top left?

They do represent the following:

  • Total packets intercepted by libpcap (not only TCP and UDP, but potentially other IP types and non IP - rare these days)
  • Total packets which were not processed by nettop (i.e. all the non TCP nor UDP packets)
  • Undetermined packets - i.e. packets sent from and to the local computer (i.e. not touching the network cards), or also when packets have got both remote sources and destinations (i.e. applications spoofing IP address?)
  • Total unmapped received packets: nettop could not attribute these packets to any current PID, hence it will assing them to PID 0. This might be due to the fact that for current interval we took a snapshot of running processes after parsing the packets, hence we could not link the PIDs - or also, when you use APIs such as gethostbyname, the kernel will resolve and use the network for you, hence PID 0.
  • Total unmapped sent packets; as above but for sent packets

Credits

Thanks to Linux for being open source and to:

  • libpcap For providing this awesome tool to intercept packets host wide
  • ncurses Without whom I wouldn't be able to draw a single element on the screen without pain and agony!
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].