

Linux server monitoring tools - adionditsak
http://aarvik.dk/four-linux-server-monitoring-and-management-tools/
Four tools to get an overview and interact with what is going on with your Linux machine.
======
profquail
These tools aren't limited to Linux; if you're running FreeBSD:

* [http://www.freshports.org/sysutils/htop/](http://www.freshports.org/sysutils/htop/)

* [http://www.freshports.org/sysutils/py-glances/](http://www.freshports.org/sysutils/py-glances/)

* [http://www.freshports.org/sysutils/apachetop/](http://www.freshports.org/sysutils/apachetop/)

Some others mentioned in the comments:

* [http://www.freshports.org/net-mgmt/iftop/](http://www.freshports.org/net-mgmt/iftop/)

* [http://www.freshports.org/net-mgmt/bwm-ng/](http://www.freshports.org/net-mgmt/bwm-ng/)

* [http://www.freshports.org/sysutils/xsysstats/](http://www.freshports.org/sysutils/xsysstats/)

* [http://www.freshports.org/sysutils/atop/](http://www.freshports.org/sysutils/atop/)

If you're running OS X / FreeBSD / Solaris, there are many useful DTrace
scripts for system monitoring and profiling:

[http://www.brendangregg.com/dtrace.html](http://www.brendangregg.com/dtrace.html)

~~~
tbrock
I recently had to test compilation of a project for work on FreeBSD and feel
like my eyes were opened.

I went into the task thinking "the BSDs are OLD" yet there must be something
great about this operating system. It's beloved in certain communities and
used at popular successful startups such as Netflix. There must be something
I've been missing that those who cherish it have come to understand.

What I found was the perfect blend of modern and old school. It's not old
feeling at all!

It had all of the newest GNU software (and otherwise) that I've come to know
and love on other operating systems but also a sense of stability about the
core that you don't get with Linux. There was a sense of underlying structure
that had actually been planned out instead of discovered over time and it made
the whole process of learning about how it worked a pleasure.

In addition, the FreeBSD manual was actually helpful and gave me a sense of
completeness rather than "the text in this wiki is just scratching the surface
of a complex wrapper for x that used to be y".

It's simple yet powerful, up to date but solid and I'd highly recommend
FreeBSD as a result of the experience.

~~~
abraininavat
I'm curious how you got all that from what sounds like a small task: getting
something to compile on FreeBSD.

~~~
tbrock
You have to install some things, poke around the system, do some general
management, etc... I'm not claiming to be an expert but I really liked what I
saw especially in the documentation (it looks outdated but the content is
absolutely on point)

~~~
jethro_tell
>it looks outdated but on point

Which is it? It would be difficult for documentation to be both complete and
incomplete.

~~~
profquail
I think he/she meant that the FreeBSD documentation is complete, although the
styling of the site is somewhat dated.

------
zorlem
In addition (or even instead of) to _htop_ I strongly recommend _atop_ [0].
This tool has been of an invaluable help to me during a lot of diagnostic
sessions.

It can collect detailed memory usage profile of processes and when combined
with some smart scripting it has a nice leak detection functionality [1]. Very
useful when you run out of memory and want to find which daemon has used all
of it.

[0] [http://www.atoptool.nl/](http://www.atoptool.nl/)

[1]
[http://www.atoptool.nl/download/case_leakage.pdf](http://www.atoptool.nl/download/case_leakage.pdf)

 _edit: formatting_

------
cyphax
An ncurses disk usage analyzer:
[http://dev.yorhel.nl/ncdu](http://dev.yorhel.nl/ncdu) I find this an
extremely handy alternative to du, it's somewhat similar to TreeView on
Windows.

~~~
rschmitty
That's great, thanks! I've been doing the du -sh * tree crawl for far too long

~~~
jlgaddis
I have this aliased as _duf_ :

    
    
      $ du -sk * | sort -n | perl -ne '\''($s,$f)=split(m(\t));for (qw(K M G)) {if($s<1024) {printf("%.1f",$s);print "$_\t$f";last};$s=$s/1024}'\''

------
Erwin
I'd like to recommend this book to get a current overview of monitoring tools:
[http://www.amazon.com/Systems-Performance-Enterprise-
Brendan...](http://www.amazon.com/Systems-Performance-Enterprise-Brendan-
Gregg-ebook/dp/B00FLYU9T2)

While most sysadm books are years out of date, this one covers all the hot
recent stuff like Dtrace and its equivalents on Linux, pidstat etc. Solid
coverage and the author (from Joyent) knows his stuff. Available on Safari
too.

------
Cieplak
If you have multiple nodes, I recommend new relic. It's a bit pricey, but if
an issue arises in your stack, new relic can help you immediately pinpoint
where and what the issue is.

ps. I can view new relic on my phone, so if I get a pagerduty, I can still see
what's up if I'm at the beach.

~~~
bowlofpetunias
New Relic is great for application monitoring, but the systems monitoring is
kind of meh.

And I've been getting way too may false positives on the systems alerts.

If you only want systems monitoring and not deep application performance
insight, New Relic is way too pricey and not really that good.

~~~
Cieplak
Sounds like Munin would suffice for you. Also, it's free.

munin-monitoring.org

> not really that good

New relic has such rich functionality that it is easy to overlook some of its
utility. It took us a while to get it tuned to our needs, but now that we have
it configured, I couldn't imagine running a high availabilty web service with
anything else. Suppose I get a pagerduty for high memory usage on a server. I
would then go look at that server in new relic, see what processes are using
the memory, see what the memory usage for that process has been like for the
last 6 months, perhaps notice a slow steady increase in memory consumption,
realize there's a memory leak, etc.

------
stiff
Is there a tool that would allow collecting historical data on memory and CPU
usage patterns of individual processes? In troubleshooting you are frequently
dealing with the situation that some process is "exploding" in memory or/and
CPU usage and either you are not there at the moment to run htop or you might
not even be able to easily log in on the server to do checks.

~~~
Erwin
"atop" can do it to some degree. When you run atop interactively, it uses the
process accounting facility to find out not what is running exactly when it
takes a snapshot of the system, but also what processes started and exited
since the last refresh interval.

Installing atop will also (depending on your distro etc.) set it up to
snapshot the system state every 600 seconds. If you run "atop -r" you can
review that legacy old data from today or an older day, and switch between the
10-minute snapshot with t and T.

Personally i like "sar" for quick text only overview (sysstat package). Once
enabled you have a 10 minute snapshot of a huge amount of performance metrics
(e.g. sar -r for memory, sar -b for disk). Of course, it's even better if you
use something to collect them centrally (I signed up for DataDog which takes
very little effort to integrate compared to rolling your own stuff).

~~~
rodgerd
I was really surprised not to see atop in his list. Very handy interactive
monitor, and the history mode, as you not, puts it well ahead.

------
shocks
Another good one is dstat[1]

1: [http://dag.wiee.rs/home-made/dstat/](http://dag.wiee.rs/home-made/dstat/)

~~~
ithinkso
This makes me curiouser and curiouser every day - are you guys typing this
citation brackets by hand or there is something I'm missing?

~~~
_delirium
It's a fairly old convention for adding links or references in plaintext. Used
on mailing lists also. The alternative is to move to hypertext (not supported
in some contexts, not preferred in other contexts), or to add the link or
other citation information inline in parentheses, which can make text look
cluttered.

------
afaqurk
This is a bit off topic but I created a tool a little while back for my
specific (very basic) needs: [https://github.com/afaqurk/linux-
dash](https://github.com/afaqurk/linux-dash)

Demo here: [http://afaq.dreamhosters.com/linux-
dash/](http://afaq.dreamhosters.com/linux-dash/)

Easily extensible if anyone wants to use it.

~~~
Ecio78
really nice!. PS you have a typo in the title, dashboad instead of dashboard
:)

------
lelandbatey
My personal list of tools that I use all the time:

    
    
        iftop
        nload
        htop
        goaccess
        ...I'll add more as I remember them, currently gotta sleep.

------
SunboX
If you want to monitor all log files for security purpose, I can recommend
OSSEC: [http://www.ossec.net/](http://www.ossec.net/)

And OSSEC Web User Interface (ossec wui): [https://scottlinux.com/wp-
content/gallery/site/ossec_web.png](https://scottlinux.com/wp-
content/gallery/site/ossec_web.png)

------
kbeaty
The sysstat suite [1] is quite handy for single nodes. Includes utilities to
monitor system performance and activity over time.

[1]: [http://sebastien.godard.pagesperso-
orange.fr/documentation.h...](http://sebastien.godard.pagesperso-
orange.fr/documentation.html)

------
nwh
_iftop_ is also a very good one, gives nice graphs of the network utilisation
sorted by host or port— [http://www.ex-parrot.com/pdw/iftop/](http://www.ex-
parrot.com/pdw/iftop/)

~~~
midas007
Check out bwm-ng

------
talloaktrees
I am a contributor to glances, very pleased to see it mentioned. Glances can
also run as a server, which can then allow glances clients to connect, or even
the android app Android Glances.

------
ch215
I don't think PowerTop's been mentioned. Maybe because it's more useful for a
laptop than a server. Once calibrated, it can output a HTML report on a
machine's consumption, which includes a handy list of tunable power saving
options. It was written by Intel so it may, or may not, work that well on
other processors. [https://01.org/powertop](https://01.org/powertop)

------
dredmorbius
Enable sysstat and install one of the sysstat graphing tools (or roll your own
with your preferred scripting tool).

Noting when things go titsup.com can be particularly useful.

------
neals
Anybody here now of a ApacheTop-like tool for nginx?

~~~
mgz
apachetop works fine with nginx logs too.

~~~
adionditsak
That is nice mgz. Not tried this yet. Should give it a try soon then :-)

------
laichzeit0
Strange definition of a "monitoring" tool. It essentially requires a human
being to run the tool, look at the graph, and make a decision on the data.
There isn't even a baseline to compare the data to. This isn't really
monitoring, it's equivalent to typing df and looking at how many bytes on disk
is being used, and doing this every 5 minutes.

------
leephillips
I could never get apachetop to work on Debian or Ubuntu. It displays the data
all right, but doesn't respond to most of my keypresses, and it segfaults.
Maybe related to its not having been updated since 2005 or so? It's too bad,
because it promises to do exactly what I want.

------
adionditsak
I think it is amazing with all the great suggestions everyone here support
this post with. Much appreciated - thank you :-) I will add them to the post
later, as a list with an URL to their website.

~~~
adionditsak
[https://news.ycombinator.com/item?id=7180300](https://news.ycombinator.com/item?id=7180300)
\- The follow up post is made :-)

------
eplumlee
One of 7 Buzzfeed-headline-style pages for system administrators you won't
believe!

Seriously, glances is nice, but I generally use tmux with a bunch of panels,
showing stuff like `watch -c df -h +nr`

------
adionditsak
[https://news.ycombinator.com/item?id=7180300](https://news.ycombinator.com/item?id=7180300)
\- The follow-up post is made :-)

------
tostitos1979
A very lightweight tool I've found useful is nmon.

------
idoescompooters
[https://github.com/afaqurk/linux-dash](https://github.com/afaqurk/linux-dash)

------
replax
Actually, bwm-ng is a nicer alternative to iftop. more information an nicer
presented (I think)! try it :)

~~~
gautamsomani
bwm-ng really has a neat and to the point interface, but it doesn't gives
break up of individual established network sessions. Some times the individual
details are needed too. That's where iftop comes in handy.

~~~
midas007
Yeap. bwm-ng > iftop for most uses. If there's a performance problem, iperf is
the old standby and even works with 10gbe links.

------
donniezazen
Could anyone please explain why top shows one instance of Chrome while htop
shows numerous stances of it?

------
midas007
sysstat (sar), slabtop, free

------
blognews
Everyone who deals with *nix in any way has known of all these applications by
default.

Couldn't come up with anything else to promote your useless blog?

~~~
adionditsak
Yes, most people know of them :-) I just felt like presenting them to people
who might not know of them and their strengths. Why not present tools,
although many know of them already? I think it is important to talk freely
about any software, as there is always someone who might not know them. I
appreciate this myself, and i am actually also new with *nix systems. If
everyone had the same approach to information as you, i would not be a part of
it.

~~~
voltagex_
It's probably worth adding to this article as you find new utilities or new
ways to use them - look at all the great suggestions in this comment page!

~~~
adionditsak
All the suggestions here is amazing. I will take a look at this later. At
least make an edit with a list of the suggested software. Did not see this
coming :-) Thank you everyone.

