Live data from Hacker News

Htop explained

peteris.rocks

41–50 of 105 posts

Re: Htop explained

#41

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…

A little nitpick, dtrace is not an alternative to strace. DTrace is far more powerful.

Alternative to strace would be dtruss, which is implemented through dtrace.

Re: Htop explained

#42
post #15

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…

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…

Another recommendation for macports. You'll find htop and all your other linux friends in there.

eg for htop: `sudo port install htop`

Re: Htop explained

#43
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.

Re: Htop explained

#44

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.

Re: Htop explained

#45

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.

Use https://github.com/yaronn/blessed-contrib or something similar

Re: Htop explained

#46
post #33
post #14

"You'll probably want to keep cron. But if you don't, then you should stop and disable the service. Because otherwise when trying to remove it with apt remove cron it will try to install postfix!" ...wat? Is that actually a thing?

Dependencies in debian systems which rely on "virtual" functionality can often have surprising results. At a guess removing cron removes things which depend on it - perhaps one of those is Exim. Something else "requires" an MTA, so it installs postfix instead to fill the gap.

This would be apt. Apt requires an MTA because maintainer messages / change-lists are sent as mail to the root user.

Re: Htop explained

#47
post #3

Thank you! Great writeup! I applaud the way you approached it - figuring out every single thing about a tool. Also, I didn't know about 'od' command. Thanks again!

please do explain in 2 words the od command. I was looking on the page and there is only one od command and it is not explained. thank you

Similar to "cat". But it shows the contents of a file in octal. try...

echo hello | od

echo hello | od -c

Useful when you want to figure out the real contents of a file.

Re: Htop explained

#48
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…

Another recommendation for macports. You'll find htop and all your other linux friends in there. eg for htop: `sudo port install htop`

(also in brew; `brew install htop`, vim, tmux, wget, lynx, etc.)

Re: Htop explained

#49
post #40

I like the investigation into various cruft that Ubuntu installs (and runs) that can safely be turned off. Goodbye polkit!

Uh, wait. Can't really get rid of policykit-1 on Ubuntu desktop, I think. Maybe server.

Pretty OT, but does anyone know if that's true (or worthwhile?)?

Re: Htop explained

#50
post #16

"[explanation of acpid] But I'm on a virtual server that I don't intend to suspend/resume. I am going to remove it for fun and see what happens. ... I was able to successfully reboot the droplet but after halt Digital Ocean thought it was still on so I had to Power Off using the web interface. So I should probably keep this." Science! :D I love the approach of systematically going through and prodding everything to s…

I don't think acpid would help much for the halt command. However, it would enable to halt the machine from the web console.
Post reply on HN