TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

What: A terminal tool to check what is taking up your bandwidth

863 pointsby PleaseHelpMeover 5 years ago

31 comments

imsnifover 5 years ago
Hey,<p>I am the author of &quot;what&quot; and am very happy to hear people like this tool I made. :)<p>&quot;what&quot; was my first real attempt at rust, and I love the project very much.<p>That said, it is a hobby project - and so I will likely be a few days responding to all issues and contributions that came from this thread.<p>&quot;what&quot; has already received some great contributions that are major parts of the code base. I would be very happy for more (in the form of features, bug fixes, issues and packaging).<p>A note to those having issues installing: as mentioned in this thread, packaging for all the various linux distributions and mac is a great effort. I apologize that at the moment the installation is a little bumpy (especially for those not very familiar with rust).<p>A good first step for if &quot;cargo install what&quot; isn&#x27;t working is to try to `rustup update` so you get the latest version of rust and cargo.<p>Other than that, I hope to support your setup in the future, and&#x2F;or hear from you in the issues of the repo. Debug help for OSes I do not have access to would be greatly appreciated. :)<p>Thank you all!
评论 #21916004 未加载
评论 #21913584 未加载
评论 #21918890 未加载
评论 #21913761 未加载
评论 #21914898 未加载
lazyjonesover 5 years ago
Bad naming..<p><pre><code> WHAT(1) BSD General Commands Manual WHAT(1) NAME what -- show what versions of object modules were used to construct a file </code></pre> (MacOS ...)
评论 #21912325 未加载
评论 #21912311 未加载
评论 #21913413 未加载
评论 #21917392 未加载
评论 #21915557 未加载
评论 #21912849 未加载
评论 #21916027 未加载
评论 #21912265 未加载
评论 #21913150 未加载
imsnifover 5 years ago
Name has changed to &quot;bandwhich&quot; as suggested here: <a href="https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;rust&#x2F;comments&#x2F;ehl68y&#x2F;what_a_terminal_tool_to_check_what_is_taking_up&#x2F;fckesmm&#x2F;" rel="nofollow">https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;rust&#x2F;comments&#x2F;ehl68y&#x2F;what_a_termina...</a>
评论 #21921007 未加载
plmuover 5 years ago
Installation with yay&#x2F;crate can be slow. This small tool took 4 minutes of compile time, the Rust crates seem to be very fine granular (like node.js vor example) and require much compile time. 204 crates needed to be compiled.<p>I found that, using yay or another aur helper on arch linux, having a few rust utilities installed that have regular updates, significantly slows down the average system upgrade time. I tend to avoid Rust programs for that reason.
评论 #21912171 未加载
评论 #21912328 未加载
评论 #21915803 未加载
评论 #21915901 未加载
gluegadgetover 5 years ago
A bit unrelated but I wrote <a href="https:&#x2F;&#x2F;github.com&#x2F;amir&#x2F;hepccn" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;amir&#x2F;hepccn</a> to list TCP connections by domains rather than just IPs. It filters connections to port 443 and 8443, downloads the peer certificate and then extracts the subject name (pretty sure I learned this trick from an article on Julia Evans&#x27; website but can&#x27;t find it now). I wanted to add more functionalities to it but I stumbled upon an issue and that&#x27;s for when SNI is enabled. I guess there&#x27;s no way for me to recover the hostname the client has sent at the start of the handshaking process without introducing MITM, right?
评论 #21912453 未加载
评论 #21914330 未加载
hnarnover 5 years ago
What are the main differences to something like nethogs or iftop?
评论 #21912023 未加载
评论 #21913058 未加载
评论 #21911982 未加载
评论 #21912011 未加载
评论 #21912202 未加载
pmontraover 5 years ago
I find the --raw output more useful than the interactive one. it scrolls away but I have time to read what&#x27;s going on. The other one just disappears and is replaced by something else, which could be ok except sometimes there are seconds of useless black screen when nothing is going on. I suggest to never have blank screens. A suggestion for the raw output: add a timestamp at the beginning of the line. Probably HHMMSS is enough but YYYYmmdd would be handy for logging in background.
评论 #21919406 未加载
DINKDINKover 5 years ago
What&#x27;s the difference between what and nettop?<p>Other similar tools:<p><pre><code> nettop iptraf iftop nethogs</code></pre>
评论 #21918053 未加载
cheezover 5 years ago
Getting an error:<p><pre><code> .cargo&#x2F;registry&#x2F;src&#x2F;github.com-1ecc6299db9ec823&#x2F;bytes-0.5.3&#x2F;src&#x2F;bytes.rs:121:18 | 121 | len: bytes.len(), | ^^^^^^^^^^^ error: aborting due to previous error error: Could not compile `bytes`. warning: build failed, waiting for other jobs to finish...</code></pre>
评论 #21917380 未加载
评论 #21917052 未加载
评论 #21916853 未加载
deftover 5 years ago
Thank you this is amazing. I have a bunch of virtual interfaces on my server and I have no idea what&#x27;s using them or if they&#x27;re even still in use what created them. This solved my problem instantly.
jl6over 5 years ago
Looks awesome but the name makes it seem designed to be difficult to find in a search engine!
Dowwieover 5 years ago
top of HN front page and without mentioning that it is written in Rust
评论 #21913628 未加载
评论 #21919939 未加载
acrossthepond10over 5 years ago
Error: Failed to listen on network interface: No such file or directory (os error 2)<p>on macOS. Anyone else getting this error?
评论 #21913306 未加载
评论 #21913758 未加载
评论 #21912942 未加载
strictfpover 5 years ago
I&#x27;ll take this moment to plug the tool &#x27;origin&#x27;, which plows through aliases and symlinks to find the executable behind a command: <a href="https:&#x2F;&#x2F;github.com&#x2F;atorstling&#x2F;origin" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;atorstling&#x2F;origin</a>
评论 #21914391 未加载
unnouinceputover 5 years ago
On Windows I find TCPView from good old Sysinternals to be perfect for this job.
afinlaysonover 5 years ago
Why do I need cargo to install on mac? (It would be nice to have a link to install)<p><i>Updated</i> To install run: curl <a href="https:&#x2F;&#x2F;sh.rustup.rs" rel="nofollow">https:&#x2F;&#x2F;sh.rustup.rs</a> -sSf | sh
评论 #21912121 未加载
评论 #21912230 未加载
评论 #21912098 未加载
评论 #21913022 未加载
MacKayover 5 years ago
&#x27;bandwhich&#x27; I like the new name a lot!
ryanmjacobsover 5 years ago
Thank god for the name change! I saw this project this morning and it looked super interesting. I tried googling around for it to install it, but nothing worked haha &quot;bandwith monitor what&quot;, &quot;github rust what&quot;, etc. And this is coming from a hypocrite who&#x27;s most popular project is named &#x27;c&#x27;.<p>Bandwhich is a clever and easy to find name!
ExtraServingsover 5 years ago
Running Catalina, with sudo I&#x27;m able to get the screen up and running, but at first data I get a panic:<p>thread &#x27;display_handler&#x27; panicked at &#x27;overflow when subtracting durations&#x27;, src&#x2F;libcore&#x2F;option.rs:1185:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
评论 #21915574 未加载
highhedgehogover 5 years ago
Plot twist. It&#x27;s the tool
评论 #21912913 未加载
btownover 5 years ago
Looking at how it does reverse DNS lookups to try and map backwards... is there such thing as a crowdsourced database that resolves the most common domain name(s) that <i>resulted</i> in a given IP address? Seems like this would be tremendously useful for any sort of network tooling, but I can’t find any references from a quick search.
评论 #21913743 未加载
评论 #21914304 未加载
avoroover 5 years ago
What can be a reason if on MacOS it does not capture traffic? I see empty panels. Tried to run with and without `sudo`.
评论 #21912675 未加载
评论 #21912806 未加载
评论 #21912263 未加载
评论 #21912981 未加载
评论 #21914782 未加载
anderspitmanover 5 years ago
Very nice. I dream of the day our networking instrumentation is good enough that when I click on a link and my browser hangs doing nothing, I can switch to my monitor app and have it tell me exactly where the route is failing.
nieveover 5 years ago
For some reason (possibly security limitations) it doesn&#x27;t seem to be able to monitor connections over a WireGuard connection&#x27;s tunX interface.
评论 #21927330 未加载
newman8rover 5 years ago
Will give this a spin, but anyone who enjoys this might like to take a look at the etherape package, I really like its visualizations.
proverbialbunnyover 5 years ago
Is sudo required? I get<p><pre><code> Error: Failed to listen on network interface: Operation not permitted (os error 1)</code></pre>
评论 #21919395 未加载
SuperSandro2000over 5 years ago
Can I now trash iftop and nethogs?
ngcc_hkover 5 years ago
Topnet might be a better name.
jslakroover 5 years ago
I need this for windows.
评论 #21915849 未加载
评论 #21912203 未加载
评论 #21912111 未加载
评论 #21912125 未加载
评论 #21914667 未加载
评论 #21912211 未加载
nutbuttercrackover 5 years ago
Maybe you should call it iWhat? Anyway, great program!
makachover 5 years ago
Is this the future? I am setting this up on my macOS, and before I could &#x27;cargo add&#x27; anything I had to &#x27;brew install rust&#x27;. Now it is downloading and compiling lots and lots of dependencies.
评论 #21912715 未加载