I am the author of "what" and am very happy to hear people like this tool I made. :)
"what" was my first real attempt at rust, and I love the project very much.
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.
"what" 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).
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).
A good first step for if "cargo install what" isn't working is to try to `rustup update` so you get the latest version of rust and cargo.
Other than that, I hope to support your setup in the future, and/or hear from you in the issues of the repo. Debug help for OSes I do not have access to would be greatly appreciated. :)
Thank you all!
I've been planning to learn Rust but haven't made the leap yet because I expect a big time commitment due to the learning curve. I poked around your source code and it was inspiring. Your code looks simple and straightforward compared to some of the other Rust projects I've examined.
My major language in recent years has been javascript (and years before that perl). Rust was a breath of fresh air for me as I did not previously have "access" to system-level functionality.
I very much love the ease with which I can rely on other people's code (feels like home coming from node.js) - even though as mentioned in this thread it does have its downsides (eg. longer compiler times).
The learning curve is indeed challenging, but the tooling is amazing, the compiler has better error messages than I could even have imagined, and the community is incredibly friendly and welcoming. All in all, I'd say it's worth the effort. :)
wget -qO- https://github.com/imsnif/what/releases/download/${WHAT_VERSION}/what-v${WHAT_VERSION}-x86_64-unknown-linux-musl.tar.gz | tar xvz -C ~/bin/Got it now but there's an error. Anyway, I've always wanted a tool like this, so I'm looking forward to its development. Thank you!
WHAT(1) BSD General Commands Manual WHAT(1)
NAME
what -- show what versions of object modules were used to construct a file
(MacOS ...)A good name could probably be bwtop, or tcptop or iftop.
Actually I searched for these, and turns out iftop exists! (https://linux.die.net/man/8/iftop)
¹ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V...
² https://pubs.opengroup.org/onlinepubs/9699919799/idx/utiliti...
The closest (but not perfect) answer I know of is the open source project name checker (http://ivantomic.com/projects/ospnc/).
Repology (https://repology.org/projects/?search=what) can also help a bit, but it's less of a direct answer.
@imsnif 2 questions:
1. Any chance you'd be willing to rename the package? I get it if not, but that would be so dope. 2. Would you consider putting this up as a cask on Brew? Brew is essentially the most popular package manager for Mac that I know of. This isn't as big of a deal for me honestly, but thought I'd ask.
or "wiccapig/wicpig" (whichhog) ;-)
Package `trust-dns-proto v0.18.0` does not have these features: `tokio-compat`
(MacOS 10.15.2)I've had situations where I'm either not on the latest version of rust, or I'm on too current a version of rust, which deprecated/removed some feature needed for a dependency. I'm not sure if devs can define their min/max versions, but that kinda check should probably be done before cargo starts building packages.
Anyway, this tool should probably upgrade to the current 0.18 release now that it’s out, if possible.
Marketers were forced into this by trademarks, but it shouldn't take the threat of a trademark lawsuit to convince you that stepping too close to something else's toes is annoying for everyone.
(And don't be afraid to go with words that have negative meanings: Aside from git, MUMPS has been a successful medical records database environment for decades.)
I haven't heard that word used like that, but I've only heard it to refer to the vcs.
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.
Of course, you can always package your favourite utility for your favourite distribution. I'm sure the author would be thrilled to endorse your package in the Readme.
Note also that Rust can compile to portable static binaries. This tool is available as such from the releases page on GH (it's in the readme)
Networking: pnet, ipnetwork, trust-dns-resolver,
UI: tui, termion, structopt (CLI is UI)
Utility: signal-hook, failure, chrono, regex, lazy_static,
Async: tokio, async-trait
None of those seem egregious.
By default, iftop will tell you "this network interface on your machine is talking a lot to ycombinator.com". But you don't necessarily know which processes are doing the most talking collectively.
This will tell you "Firefox process 4567 is talking a lot ycombinator.com" and you'll know whether 4567 is also one of the chattiest talkers right now.
But that's what nethogs does.
Other similar tools:
nettop
iptraf
iftop
nethogshttps://www.binarytides.com/linux-commands-monitor-network/
There's already a ton of tools that do this. It's a nice show-off project but I doubt OP is in for the long haul.
.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.3/src/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...I don't understand how rust/cargo work so just giving up at this point.
on macOS. Anyone else getting this error?
"Sandbox: lsof System Policy: deny(1)"
Otherwise, really nice idea and work!
Updated To install run: curl https://sh.rustup.rs -sSf | sh
I figured it out.
It can be found here: https://doc.rust-lang.org/cargo/getting-started/installation...
You can install it easily by running this: curl https://sh.rustup.rs -sSf | sh
https://binx.io/blog/2018/11/27/learning-cargo/
You're getting snark because your own snarky comment is the equivalent of saying "Why do I need Make to run it on the MacOS?" If you had asked instead, "What is cargo, and how do I install it?" you would get more helpful responses. Snark is met with snark.
Bandwhich is a clever and easy to find name!
thread 'display_handler' panicked at 'overflow when subtracting durations', src/libcore/option.rs:1185:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
Woah, that's a huge step backward. How do they expect anyone to write half-decent C for their operating system without valgrind?
~/.cargo/bin/what
or sudo ~/.cargo/bin/what sudo setcap cap_net_raw,cap_net_admin=eip <path_to_what_binary>Would you be willing to open an issue in the github repo? I am not aware of this bug and would be very happy to address it.
I would especially be interested if this happens to be the same bug as: https://github.com/imsnif/bandwhich/issues/51
Thanks!
Error: Failed to listen on network interface: Operation not permitted (os error 1)Now I use NetLimiter 4: https://www.netlimiter.com/
Among other features like process blocking, it has a process list not very different than this utility as well has bandwidth graphing over a period in time which is very useful in tracking down bandwidth hogs on a monthly capped DSL line. https://www.netlimiter.com/docs/netlimiter-overview/features...