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...
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 ...)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!
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.
It's a mess and I've not used it for a while (haven't setup a new computer lately) but gets the point across.
whif less so, that just doesn't seem to smell right.
> The whence command is a Korn Shell feature that tells how a name would be interpreted by the shell: it detects commands and aliases, and searches your path.
It took me a few tries before figuring it out. What worked was "Install cargo MacOS" and it was hard to tell if the results are not a scam to make me install some spyware.
For a router I'd also put ntopng on.
In the rare case you might hit something that was removed/modified because of a security exploit, but those are very very rare.
Chrome has no other export functionality. And firefox copied that lack-of-feature without even realizing the motivations.
So now one have to copy them one by one.
Firefox, maybe, haven't looked into it and just the process of evaluating it isn't worth it. Mozilla doesn't have the track record that I want to blindly trust them with that either.
There is no way to export them to an xml/whatever file (pretty sure you could at least in firefox before, but I guess it was too hard to maintain...).
It took about a year to get stuff figured out.
Speaking for myself, I don't know in which exact version of Rust the features that I use was first introduced, and I don't think anyone else knows that either if they use a lot of different Rust language features.
So if I were to add a minimum required version to Cargo.toml for the crates that I put out, I would for sure end up putting the current stable version that I am using myself.
In practice I think that is probably fine, but also a bit unfortunate in a way, that anyone using an older version of Rust, such as those using distro packaged Rust will see Cargo tell them they can't build and run my crate, because I set minimum version to say 1.40.0, and they are using 1.37.0, but actually I might happen to not be using any features beyond what was available in 1.35.0 or whatever in some random crate of mine, but I don't know that and I don't wish to test every change I make to my crates in a bunch of older versions of Rust also because that would slow me down considerably.
On the other hand, if the Rust Team had the resources for it, could the crates.io service be made to detect minimum version of Rust needed based on the features used? Probably a lot of work I would guess. Doubly so when considering different feature flags and other cfg switches.
Again, I don't know the plans you have for how to do it so maybe you are already planning to do it that way but, you guys sometimes run builds on basically all of the crates on crates.io, don't you? Would it be feasible that the crates.io service runs a background service that builds each crate with a few different versions of Rust and records the build results and possibly test results into the meta data for the crates on crates.io? I think that would probably require a lot of server time, and therefore likely cost too much to be possible but it would have been really cool if it was doable.
Part of that is due to the fact that iOS is now my primary consumption platform, and finding bookmarks in a complex structure is much more awkward than it should be.
Part of it is just laziness: trying to manage a complex bookmark folder is more work than I care to do when search engines give me 99% of what I need.
It'd be great if every time I went back to a website, all the pages on the site that I already bookmarked would pop in a sidebar...
I found this with Instapaper. What was a bookmark and what was a read-later?