Live data from Hacker News

Htop explained

peteris.rocks

61–70 of 105 posts

Re: Htop explained

#61
post #51

Earlier quoted context omitted.

One of the things that I really dislike about homebrew is its refusal to run via sudo plus the requirement that you own /usr/local. This means: 1) It is a security hole; any application can now modify system-wide applications at any time. 2) You can't have multiple users able to use homebrew. I was expecting homebrew to be something similar to apt/yum/etc, but this makes it pretty fundamentally different. How does Ma…

Re 2) I'm running a multi user homebrew setup for years. I have my users (personal and various work accounts) live under the "Local" Group and do ``` sudo chmod -R 770 /usr/local/ sudo chmod -R +a "group:Local allow delete,readattr,writeattr,readextattr,writeextattr,list,search,add_file,add_subdirectory,delete_child,file_inherit,directory_inherit" /usr/local/ ``` I remember sometimes running into permissions issues b…

It's a bit of a smell that Homebrew doesn't do this itself.

Re: Htop explained

#62
post #51
post #15

Earlier quoted context omitted.

You should give Macports a try if you haven't already! I run it on my macbook, and it's made a world of difference. 99% of everything I use in Linux can be found in Macports, and it "just works" for the most part. You can't get kernel-specific things like strace, but they do have just about everything else. The big sell for me was being able to install the GNU versions of everything. Macports keeps everything in /opt…

One of the things that I really dislike about homebrew is its refusal to run via sudo plus the requirement that you own /usr/local. This means: 1) It is a security hole; any application can now modify system-wide applications at any time. 2) You can't have multiple users able to use homebrew. I was expecting homebrew to be something similar to apt/yum/etc, but this makes it pretty fundamentally different. How does Ma…

There's no requirement that Homebrew be in /usr/local. Some individual (poorly-written) packages may assume that, but I've been running Homebrew in $HOME/.brew for multiple years on multiple machines with no issues at all.

Re: Htop explained

#63

I switched to macOS from Linux two weeks ago and I am starting to regret that decision. Most — if not all — the commands that I thought I had mastered after years working on Linux environments stopped working because their BSD counterparts have slightly differences that completely break everything I try to do. It is even more frustrating when I realize that I have to deactivate security features built-in the new Appl…

Isn't dtrace a completely different (and broader) tool than strace ?

Re: Htop explained

#64
post #39

Slightly related utility I discovered to my great delight today: ncdu - "htop for disk space usage" https://dev.yorhel.nl/ncdu

ncdu has an option to store the scanned fs and display it again without walking the FS; useful if you're dealing with deep mess and slow, remote or else data.

Re: Htop explained

#65
post #32

Earlier quoted context omitted.

Homebrew has packages prefixed with `g`, standing for GNU, that you can install to avoid some of the BSDisms on macOS. Example: `gsed` actually parses whitespace the way I think it will; the builtin `sed` does not.

> to avoid some of the BSDisms on macOS to be fair, you should probably call the GNU behaviour "GNUisms". The BSD behaviour is the historical POSIX behaviour. The GNU behaviour is, in a twisted sense, the result of embrace, extend and extinguish by the GNU people :-)

With a couple of small exceptions[1], the GNU behavior is also the historical POSIX behavior; the differences that will be jarring are where both BSD and GNU implement things that aren't in POSIX. Yes, the GNU behavior is GNUisms, but the BSD behavior is also BSDisms.

[1]: The most notable thing is that GNU generally allows flags to come before or after non-flag arguments, where POSIX requires them to come before.

Re: Htop explained

#66

I switched to macOS from Linux two weeks ago and I am starting to regret that decision. Most — if not all — the commands that I thought I had mastered after years working on Linux environments stopped working because their BSD counterparts have slightly differences that completely break everything I try to do. It is even more frustrating when I realize that I have to deactivate security features built-in the new Appl…

What made you switch to MacOS?

Re: Htop explained

#67

Earlier quoted context omitted.

You probably also want to chmod +s htop, or it won't actually show you CPU/memory stats.

and if you want to use `sed` not `gsed`, do `brew install --default-names coreutils` to supercede the OS provided utilities.

Or you can add it to your PATH:

    PATH=/usr/local/opt/coreutils/libexec/gnubin:$PATH
"gnubin" contains the all utilities with the original names.

Re: Htop explained

#68
post #51
post #15

Earlier quoted context omitted.

You should give Macports a try if you haven't already! I run it on my macbook, and it's made a world of difference. 99% of everything I use in Linux can be found in Macports, and it "just works" for the most part. You can't get kernel-specific things like strace, but they do have just about everything else. The big sell for me was being able to install the GNU versions of everything. Macports keeps everything in /opt…

One of the things that I really dislike about homebrew is its refusal to run via sudo plus the requirement that you own /usr/local. This means: 1) It is a security hole; any application can now modify system-wide applications at any time. 2) You can't have multiple users able to use homebrew. I was expecting homebrew to be something similar to apt/yum/etc, but this makes it pretty fundamentally different. How does Ma…

no, this is not required anymore... https://github.com/Homebrew/brew/commit/a2f19f0a675f7cb384b4...

> You can't have multiple users able to use homebrew

what i did is i run Homebrew as a user i called Admin and when logged in as another user i simply do a 'su - admin' to run the brew commands..

Re: Htop explained

#70

Is there a resource out there on how to write these beautiful terminal HUDs? I'd really like to step up my game for GUI monitoring apps without having to choose between either terminal log spam, PyQT, or a web server. Ideally I'd have something like htop/wavemon/power top that I could stream compactly via ssh.

I think you're just looking for a book on (n)curses.

For another fun ncurses tool (on a similar wavelength) I have become fond of glances[1] - it breaks out docker containers nicely, along with the good top-like overview of all procs.

1: https://github.com/nicolargo/glances

Post reply on HN