Hacker News new | comments | show | ask | jobs | submit login
Show HN: /usr/bin/htop (0xfee1dead.top)
219 points by theden on Nov 1, 2017 | hide | past | web | favorite | 59 comments



A no-installation version: `htop | nc seashells.io 1337`


"A no-installation version: `htop | nc seashells.io 1337`"

I'm confused ... you are running the command 'htop' locally (and piping it) so how is that not installed locally ?

Is htop a local, (n)curses based app that you run in a console or is it something else that I am missing ?


Perhaps he means a no installation way to show htop on a web-page?

Assuming you have 'htop' installed, you can pipe it's output to seashells.io via `nc` (netcat) and it will give you back a URL where you can see the output.


Indeed, anything can be piped in, i.e.

while true;do date;sleep 1; done | nc seashells.io 1337


FYI, you can make it shorter by using sleep in while's condition, no need for while true. It does delay the first output though.

while sleep 1; do date; done | ...


Doesn't the difference lie in whether you want to run the command then sleep, or sleep first and then run the command?


> "It does delay the first output though"


Could also do `while date;do sleep 1;done`


Yes, I was on about the reason for the delay.


that's clever, i've never thought of it, interesting considering how many while true;do ...;sleep X;done loops i've done


thanks for the tip, old habits die hard :)


If you want short

while :...


> Perhaps he means a no installation way to show htop on a web-page?

Yup, exactly!


You're not installing any additional software onto your machine (like a web server etc)


Wow, this is awesome! I wish the data I want to send here wasn't so sensitive. How can I run this on-premises?


Seashells isn't currently open-source (the goal was to have a hosted version to make it easy for people to pipe non-sensitive data). In the next version, I'm planning on adding end-to-end password-based encryption.

Also, there are similar things out there that you can self-host, e.g. https://rtail.org/


> Seashells isn't currently open-source (the goal was to have a hosted version to make it easy for people to pipe non-sensitive data). In the next version, I'm planning on adding end-to-end password-based encryption.

Obviously it's your decision, but any particular reason it's not open source? I can't imagine it being commercially viable.


Haven't had time yet. Also, I haven't decided whether I want to extend it and try to turn it into a commercial side project.


Check out gotty https://github.com/yudai/gotty maybe that's what you want.


That's so cool. This is the best link in these comments IMHO.


Woah, seashells is awesome! Especially cool (and useful) how you can `cat` and it shows up as you type.


With `nc` you can also just start typing and it'll show up on the other end after you hit enter. `nc` works across any two computers on the same network.

To receive messages with nc do

nc -l 3333

To send messages do

nc 192.168.1.XX 3333

with the IP or hostname of the receiving server. No encryption though.


looks like termbin's clone (termbin.com)


termbin seems to be a classical pastebin. it only gives you a URL after it received all input. seashells gives URL immediately, and streams the terminal in real-time.


Hi, very useful stuff, thanks!

A tiny nitpick: if you have a little description in the page title it's easier to find it when searching the bookmarks. It's easy to append a bit more information when bookmarking on desktop, but when bookmarking on mobile it's harder, and as usually you don't see the bookmark's details after bookmarking, it can become unfindable.


Good idea! I'll add a description in a bit.


well this must be one of the most useful comments I've ever seen. not sure how to use it yet but it must be useful one day!


agreed, that's lovely for simple things that I can't quite think of right now but know I'll need in the future (and likely forget this exists)


Saw this was cool and was a bit sad that it wasn't yet open source. I decided to make something extremely more simple than this (doesn't require any database management, just a single go app).

The source is available here: https://gist.github.com/antoniomika/2f56cd2d62145d10e10423fb...

Seriously this is pretty hacky, especially since I put it together in less than an hour and took some bad shortcuts. It works well though, and should technically support multiple clients but it can definitely be made better. Open to any questions/comments.


If the terminal window is bigger than your browser this shows junk as the lines start wrapping, does anyone know a workaround?

EDIT: Zooming out does the trick


Whoa, this is awesome. This is the sort of thing I wish I'd come up with.


Just tried that on Android termux and it worked. Cool.


Cannot open /proc/stat for me.


Reminds me of this submission from a while ago that explained how to have a kinda-live version of the current htop status as the background image of your website as a fun hack:

https://news.ycombinator.com/item?id=10323226

The site is now down but here's a snapshot:

https://web.archive.org/web/20160304133820/http://drunken-se...


Your memory is really good.


GoTTY does that for every console app: https://github.com/yudai/gotty


gotty is such a useful tool - especially with interactive mode turned on and you can ssh from the browser


I just typed a `q` out of impulse.


Hah, me too


https://github.com/theden/0xfee1dead.top

Incase the url is blocked for anyone else.


Your pm2 install is outdated, man.


Check out glances in webserver mode:

https://nicolargo.github.io/glances/


I couldn't renice (F7) my uploaded pwn-rootkit process, please fix.


A fake HTOP is running on this website: https://system76.com/servers/starling

Pretty Awesome, does anyone knows if it is an Open Source library?


You made me press Ctrl-C .. well done


i pressed q


whats new since the Show HN of 99 days ago?


DoA it only got one vote! (It didn't scale well, sockets weren't closed on disconnection, so that was fixed). At least now everyone can watch the server's load average increase real time.


Uptime is nice, that's new.


In Firefox on Linux, I'm seeing a lot of U+000F boxes scattered around, messing up the layout.


Speaking of which, why does "top" always truncate user names at 8 characters?


Looks like the magic is done by https://github.com/theZiz/aha (by looking at the process tree under `htopgen.sh`)


I don't understand what am I looking at. Somebody runs htop command and serves output as an html? How did that end up in HN top? Should be maximum a high school project.


> Should be maximum a high school project.

Snarky dismissals are not allowed on HN, especially not allowed in response to new work. That's like trampling someone's garden when new plants are sprouting. From the Show HN guidelines:

Instead of "you're doing it wrong", suggest alternatives. When someone is learning, help them learn more. When something isn't good, you needn't pretend that it is. But don't be gratuitously negative.

Would you please read https://news.ycombinator.com/newsguidelines.html and https://news.ycombinator.com/showhn.html and follow them when commenting here? We'd appreciate it.


I don't think there's an education level prereq for Show HN. It could probably be based on interestingness + utility. Ultimately, upvotes determine a "Show HN"'s success.


Well you’re right in that you have no idea what you’re looking at.

Ever tried to render an interactive cli gui as a website in a browser? It’s atrivial.

It’s a neat project that has the added twist of rendering it’s own status. You’re seeing the htop output of the server rendering its own htop output.


> Ever tried to render an interactive cli gui as a website in a browser? It’s atrivial.

Which part of it is interactive?

The cli gui part is also suspect. For all we know it could be handcrafted, which would make GP correct, although in an unintended way.


> I don't understand what am I looking at.

...

> Should be maximum a high school project.

umm..


Do the F keys function ?

Edit: looks like there isn't much in the way of interaction ...




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: