
Show HN: Real-time server monitoring in your browser - acl
http://scoutapp.github.io/scout_realtime/
======
jakejake
They said they use it on their own production servers so of course I couldn't
resist... [http://scoutapp.com:5555/](http://scoutapp.com:5555/)

Really nice looking monitoring, though. I think it's fun to see the stats
scrolling by.

~~~
acl
Ha yeah - we opened up a port in iptables for this so we don't have to ssh
tunnel in to see stats. Obviously, if you're concerned about exposing numbers,
you can view via an ssh tunnel instead of opening a port.

~~~
cmbaus
I see you are using SVG to render the charts. What are your thoughts on SVG vs
Canvas for these types of apps?

~~~
angersock
Not these guys, but doing realtime viz of signals.

We've switched over to a minimalist canvas renderer--if you don't need
interactivity or styling, and instead just "draw me as much as you can as fast
as you can, damnit.", we hope it's the way to go.

~~~
cmbaus
I've been playing around ([http://yield.io](http://yield.io)) with Flot, which
uses canvas and rendering speed seems pretty good, but resizing gets a bit
wonky when there are multiple canvas elements on a page.

~~~
angersock
Yeah, we started with Flotr2...too many graphs on a page (with thousands of
datapoints per graph) brings Chrome to its knees, even with auto margins and
whatnot turned off.

EDIT: Very clean site! I like your style. :)

------
nodesocket
For all my fellow CentOS/RHEL users here is a quick bash script for getting it
running (assumes you don't have ruby 1.9 installed).

    
    
        # Install RVM and Ruby 1.9.3
        curl -sSL https://get.rvm.io | bash -s stable
        source /etc/profile.d/rvm.sh
        rvm install 1.9.3
    
        # Install JSON gem
        gem install json
    
        # Install Scout realtime
        gem install scout_realtime
    
        # Start Scout realtime
        scout_realtime
    
        # Punch a hole in iptables on port 5555 for Scout realtime
        iptables -A INPUT -p tcp --dport 5555 -j ACCEPT
        service iptables save
        service iptables restart

~~~
byroot
You don't need to install json on 1.9.3, it's already in the stdlib
[http://ruby-doc.org/stdlib-1.9.3/libdoc/json/rdoc/index.html](http://ruby-
doc.org/stdlib-1.9.3/libdoc/json/rdoc/index.html)

------
wahnfrieden
Sorry to be the one posting a tangent (looks like a nice tool!), but please
rewrite "for the modern man" to something more gender neutral.

~~~
wcchandler
I can't tell if you're trolling or not...

The use of man in this context is androgynous. It's merely an abbreviated use
of "mankind," which is an abbreviated use of "humankind." I'm sorry if you're
upset by this wording, but it's not inappropriate.

~~~
yahelc
"for the modern man" is a very gendered idiomatic phrase unrelated to mankind.

[https://www.google.com/search?q="for+the+modern+man"](https://www.google.com/search?q="for+the+modern+man")

Note how all of the results are all about men and manliness, which is fine for
gendered products and clothing, but doesn't really make sense for a piece of
server monitoring software.

~~~
zobzu
i think whats interesting is that people who use sentences such as "for the
modern man" don't think about man as male at all and don't intend to offend
anybody.

It's only picked out by the ones who feel oppressed by gender issues (which
are often males defending females - in fact, genetics also makes us behave
that way, ironically.)

~~~
pron
Of course they don't think about, and obviously they don't want to offend, and
that is why some good people point this out, so that people think about it and
pay attention. Sometimes biases are so entrenched that we don't feel them.
They feel natural, and therefore neutral. But, if you want to make a change,
than it's precisely those seemingly natural things that you need to change.

You can keep using "man" or not, but I think it's helpful to pay attention.

~~~
zobzu
Frankly, i think some people just like to complain about gender issues when
there isn't much going on.

In some languages (ex: french), everything defaults to male-centric. Nobody
cares or feels offended by it, and females have exactly the same rights as
males.

~~~
pron
Feminism isn't just about not offending people or giving women the same
"rights" as men. You can make the (true) claim that blacks in America have the
same rights as whites. But does that mean that there's no more racism? And
even without the judgmental word "racism", does that mean blacks have the same
opportunities as whites? I don't think so.

Feminism is about making sure women have the same opportunities as men not
only by virtue of the law, but "on the ground"; that society doesn't gently
(or not so gently) steer them in directions where they end up with less power
than men; that they're no longer objectified and that female politicians are
not called by their first names.

I'm not saying language can fix all that, or that it even matters all that
much. It certainly matters less in cultures where feminism has had greater
success. But it is a good place to point out how, perhaps inadvertently, we
keep falling into the same gender traps. If you start thinking about your
choice of words, language becomes less natural, so you stop treating it, and
the culture it articulates, as "nature", and start treating it as the
malleable social construct that it actually is.

------
atmosx
Can you guys add a if/else clause in sinatra and add a FreeBSD logo?[1]

I see tux in my FreeBSD server and feels weird.

[1]
[https://github.com/scoutapp/scout_realtime/blob/master/lib/s...](https://github.com/scoutapp/scout_realtime/blob/master/lib/scout_realtime/web/images/linux.png)

ps. My photo-editing skills suck bigtime otherwise I'd do it.

EDIT: Doesn't seem to work properly under FreeBSD-10. No data is displayed.
Apparently (as expected) uses Linux ProcFS structure to get data. So FreeBSD
for now is not supported, keep the icon for later :-)

~~~
stock_toaster
I wonder if it can use the linproc compat stuff like htop does on FreeBSD.

------
sdesol
This is cool. It looks like the developers are reading the comments so I'll
add a quick suggestion. Something that I found to be insanely helpful with my
own product development was being able to track memory swapping.

I went to great lengths to tune my Java Virtual Machines so that they would
work well in a minimum RAM environment. And being able to track swapping was
critical for my decision making. Now I can run my product on a 512MB system
with 1GB of swap space with no problem. Below is how I'm tracking swapping in
real-time.

[http://screenshots.gitsense.com/track-
swapping.html](http://screenshots.gitsense.com/track-swapping.html)

Since your solution is focused on capturing a period of time, you'll be able
to provide a better view than I am.

With SSD becoming more common for cloud hosting, using swap space in lieu of
getting more RAM will probably become more common. And before anybody points
out that SSD is still significantly slower than RAM, I know. Depending on your
product, using swap on SSD may be practical. I know using swap on amazon's
infrastructure wasn't.

~~~
itsderek23
Part of the scout_realtime team here...swap is important. Displaying it the
future is possible.

In fact, fire up the console on the project homepage and type
"metrics.memory". We're capturing it, just not displaying it yet on the
screen.

~~~
sdesol
"We're capturing it,"

This is good to hear. Not sure what would be the best way to display that
information though.

------
steve02
Nice, but it requires ruby :S

I been using this
[https://github.com/abimaelmartell/system_monitor](https://github.com/abimaelmartell/system_monitor),
easy to install and dont eat too much ram :P

------
abimaelmartell
[2014-03-10 15:04:45] ERROR TypeError: nil can't be coerced into Fixnum
server_metrics-1.2.0/lib/server_metrics/collectors/memory.rb:81:in `+'

Getting this error under OSX

~~~
ceejayoz
Here as well, running with Ruby 2.0.0.

~~~
itsderek23
Sorry - mind sharing the output of "top -l1 -n0 -u"? Looks like an issue
parsing out the memory stats on OSX.

~~~
anfedorov
Error:

    
    
      [2014-03-10 15:38:12] ERROR TypeError: nil can't be coerced into Fixnum
    	/usr/local/Cellar/ruby/2.1.1/lib/ruby/gems/2.1.0/gems/server_metrics-1.2.0/lib/server_metrics/collectors/memory.rb:81:in `+'
    

Here's the output:

    
    
      [~] top -l1 -n0 -u
      Processes: 268 total, 3 running, 5 stuck, 260 sleeping, 2070 threads
      2014/03/10 15:36:26
      Load Avg: 1.92, 2.05, 2.08
      CPU usage: 4.46% user, 12.50% sys, 83.3% idle
      SharedLibs: 60M resident, 0B data, 4156K linkedit.
      MemRegions: 73352 total, 3529M resident, 83M private, 892M shared.
      PhysMem: 6726M used (1812M wired), 199M unused.
      VM: 570G vsize, 1312M framework vsize, 1570984(0) swapins, 1861805(0) swapouts.
      Networks: packets: 2441317/1583M in, 1428870/324M out.
      Disks: 3446592/122G read, 1578215/101G written.

~~~
itsderek23
Thanks - I can reproduce with that output. Opened an issue on github - we'll
fix:

[https://github.com/scoutapp/server_metrics/issues/9](https://github.com/scoutapp/server_metrics/issues/9)

~~~
itsderek23
Thanks again for reporting - we've released version 1.0.1 to fix the issue:

gem install scout_realtime

Note that OSX support is limited as there is no "/proc" support.

------
qq66
Nice. The play/pause should be one button that changes icon -- the current
setup is a little confusing.

~~~
acl
ah - thanks for the feedback, makes sense.

~~~
dmdavis
I will add that if you keep it as two buttons, the colors should be switched.
Right now, the active button is black and the other is gray. But gray buttons
say to me that they are disabled, so it looks like I can only hit the play
button when it's already playing.

~~~
ireflect
This was my interpretation too. Had to click it a few times to figure out what
was going on.

------
flexd
I like it, but why not use something like htop? [1]

Perhaps it's not entirely comparable, but you do not need to open any extra
ports or run any extra processes.

It looks really nice though! [1]
[https://en.wikipedia.org/wiki/Htop](https://en.wikipedia.org/wiki/Htop)

~~~
acl
I love htop too, but the great thing about scout_realtime is the couple
minutes of context provided the charts.

Sometimes, nothing beats seeing a chart to quickly see what's going on.

~~~
artursapek
I've found MenuMeters really useful (only available on Mac though)

[http://www.ragingmenace.com/software/menumeters/index.html](http://www.ragingmenace.com/software/menumeters/index.html)

It's always instantly clear when something like iTunes or a Chrome helper
starts eating up 105% CPU, and provides quick access to force quitting it. :)

Screenshot: [http://i.imgur.com/sEtkR9p.png](http://i.imgur.com/sEtkR9p.png)

------
jahaja
I've recently released a similar tool for Python. Definitely not as pretty but
with a focus on providing a lot of details:
[https://github.com/Jahaja/psdash](https://github.com/Jahaja/psdash)

The more the merrier! :)

------
benjamincburns
Did you roll your own SVG chart lib for this? If not, mind sharing which one
you're using? It's very nice.

If you were to make it so I can open a socket or websocket to it (perhaps on a
second, internal port) and publish whatever data I want, that'd be all kinds
of nifty. That is, make it so I can just start spraying numbers at
ws://myhost:5556/Really%20Awesome%20Data and with that a nice auto-scaled
chart magically appears in the dashboard.

Edit: Oh, I see a github ribbon. Maybe you'll see a pull request sometime
soon...

Edit 2: Anyone wondering about my original question - the charts are built
using the D3 project.

[http://d3js.org/](http://d3js.org/)

~~~
vpanyam
I just built this yesterday: [http://blog.vivekpanyam.com/plotter-plot-
anything/](http://blog.vivekpanyam.com/plotter-plot-anything/). Inspired by
Tasseo and Scout Realtime

~~~
benjamincburns
Cheers! If this were a "Show HN" I'd be happy to upvote! Edit: I see now that
it kinda/sorta was, and I missed the opportunity.

------
telot
Noob to Ruby here...any thoughts on why gem_original_require is screwing me
up? Thanks for the cool looking tool!

/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require': no such file to load -- json (LoadError) from
/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require' from
/var/lib/gems/1.8/gems/scout_realtime-1.0.1/lib/scout_realtime.rb:23 from
/var/lib/gems/1.8/gems/scout_realtime-1.0.1/bin/scout_realtime:4:in `load'
from /var/lib/gems/1.8/gems/scout_realtime-1.0.1/bin/scout_realtime:4 from
/usr/local/bin/scout_realtime:19:in `load' from
/usr/local/bin/scout_realtime:19

~~~
_kushagra
$ gem install json

$ scout_realtime

You're welcome.

------
stock_toaster
Looks nice, but it slowly turns my laptop into a fireball and pegs an entire
core (older laptop).

~~~
itsderek23
Sorry. Just FYI, we've clocked the CPU usage of the scout_realtime daemon at
1% on an Intel Xeon 2.40GHz CPU.

~~~
ibejoeb
I think we're talking about the browser side of things. I haven't investigated
why, but it pegs the cpu on my macbook pro in Chrome, Safari, and Firefox.

It seems pretty light on the server side.

~~~
itsderek23
Ah thanks - I haven't seen this yet my laptop. We'll keep an eye on it.

------
keimoon
It is burning my CPU (browser side, not server side)
[http://i.imgur.com/NgXi4LG.png](http://i.imgur.com/NgXi4LG.png) The author
should provide configuration so it does not get data from stats.json every
second.

------
primo44
And I should add that this thing is awesome! It wouldn't install for me unless
I was root, but that might be a ruby configuration thing, since this is also
the first ruby app that I've ever touched. It would be nice to have an option
to have scout_realtime only listen on 127.0.0.1, so (as someone else already
mentioned) we could just proxy to it with another web server and then wrap
controls around that.

With my 10 minutes of poking around in the scout_realtime source and a bit of
googling, I think the option would go here, in main.rb:

    
    
       server = WEBrick::HTTPServer.new(:Port => 5555, :AccessLog => [])

------
tijs
I just tried out the main product and while it's easy to setup i ran into
snags with the plugins right away. Both redis and postgres (the first two i
tried) failed to install and it took a bit of searching to figure out they had
their own dependencies. When trying to install those dependencies i ran into
issues with compatibility for a fresh ruby install.

Maybe you should concentrate on fixing your own dependency issues before you
start pounding on Nagios
([https://scoutapp.com/info/nagios_alternative](https://scoutapp.com/info/nagios_alternative))
about the exact same issue.

------
rootuid
Looks bloody nice, got it up and running
[http://www.coldfusion10.com/installing-scout-realtime-on-
cen...](http://www.coldfusion10.com/installing-scout-realtime-on-
centos-6-4-64bit/)

------
k3oni
This looks nice but that /s refresh it might cause issues, maybe add a setting
so refresh can be set by user?

Shameless plug - If anyone is looking for a python/django alternative with
refresh settings and remote access to the output data as json take a look at
pyDash : [https://github.com/k3oni/pydash](https://github.com/k3oni/pydash) .

Posted about it a while ago
[https://news.ycombinator.com/item?id=7224710](https://news.ycombinator.com/item?id=7224710)
.

------
mrcozz
I'm working on a similar project, called dtop, check it out at
[https://github.com/ddierickx/dtop](https://github.com/ddierickx/dtop)!

~~~
ireflect
This is wonderful: No runtime required, minimal footprint, and almost no
overhead when UI is idle.

------
lcfg
Cool idea! The interface is a tad heavy (for me) though, the fans of my laptop
spun up.

I noticed that by looking at the memory usage of the ssh daemon, one can
determine how many people are connected with ssh. Every open connection (even
if you're just idling at the login phase) adds around three to five mb to
memory use. I wonder what other information might be unintentionally relayed
through these metrics.

------
garthk
I'm glad to see the sparklines. I'm worried that the CPU sparklines in
particular are likely to mislead due to the lack of a common vertical axis
scale. I suspect Tufte might advise two graphs: one with a fixed 0…100 axis
scale, one "zoomed". The former would help you compare CPU history between
apps, and sport a shaded background region to indicate the range of the
latter.

~~~
itsderek23
Good points. Thanks!

------
primo44
Regarding "What operating systems are supported?" and the answer of
"scout_realtime relies heavily on the proc file system to fetch metrics.
procfs is supported on most Linux-based distributions with the exception of
OSX and Debian."

procfs is available on my Debian 7 servers, so scout_realtime just installed
and runs fine on the few that I've tried it on.

~~~
wazoox
And OS X is hardly a "linux distribution" :)

------
wazoox
The web page makes firefox gobbles more and more RAM until it crashes. You've
found a firefox bug :) (FF 27.1 Linux).

------
Therac20
Any way of enforcing HTTPS and login/password auth? I would love to be able to
use this on a set of public servers...

~~~
davidradcliffe
A simple proxy through nginx should do the trick.

------
72deluxe
Looks good. If you want to monitor network throughput on the CLI, use nload.
It's great.

------
jonahx
Does this solve the same problem that new relic does? If not, what is the
difference?

------
hartator
Anyone with a link to a live demo?

~~~
ehPReth
[http://scoutapp.com:5555/](http://scoutapp.com:5555/)

------
hnriot
kills the cpu on my mac with Chrome Version 34.0.1847.11 beta

------
executive
how to view multiple servers on one screen?

