11 ms·
Linux server monitoring tools
Four tools to get an overview and interact with what is going on with your Linux machine.
- shocks 13y agoAnother good one is dstat[1] 1: http://dag.wiee.rs/home-made/dstat/ http://dag.wiee.rs/home-made/dstat/
- ithinkso 13y agoThis makes me curiouser and curiouser every day - are you guys typing this citation brackets by hand or there is something I'm missing?
- shocks 13y agoTyping them by hand. :)
- _delirium 13y agoIt'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.
- SunboX 13y agoIf 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
- ursul_fram 13y agoyet another ignorant ubuntu user!
- nwh 13y agoiftop 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 13y agoCheck out bwm-ng
- lelandbatey 13y agoMy 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.
- Cieplak 13y agoIf 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.
- adionditsak 13y agoYes New Relic is pretty awesome. Lot of information you can monitor there, with a very easy installation. You can get a free account in there aswell, just to test it. I just made one, and i really like the simple UI: http://i.imgur.com/oGGfTrp.png http://i.imgur.com/oGGfTrp.png
- troels 13y agoNew Relic is really great. Especially if you use Ruby, as it has instrumentation deep into the application run level. Unmatched for finding bottlenecks really.
- jafaku 13y agoIsn't it the same with PHP? And probably other languages too.
- adionditsak 13y agoI think it is the same :-) As far as i can see these are definitely supported: Ruby, PHP, Java .NET, Pythom, Node.js.
- michaelmior 13y agoI've run a lot of Python apps on New Relic and definitely some great detailed monitoring there too.
- edwinnathaniel 13y agoAppneta does this for Python/ruby/java/.net/php. We recently open source our Ruby instrumentation: https://www.appneta.com/blog/open-sourcing-ruby/ https://www.appneta.com/blog/open-sourcing-ruby/
- cyphax 13y agoAn 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.
- bearbin 13y agoI also find this very useful :) It shows you where your space has got to in a simple and easy to use manner.
- rschmitty 13y agoThat's great, thanks! I've been doing the du -sh * tree crawl for far too long
- jlgaddis 13y agoI 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}'\''
- louwrentius 13y agoVery neat, thanks for the tip.
- purephase 13y agoThis is awesome. Thanks for sharing it.
- blognews 13y agoEveryone 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?
- tonylampada 13y agoComment sent to bottom, that says it all, haha.
- adionditsak 13y agoYes, 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_ 13y agoIt'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 13y agoAll 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.
- mamadou 13y agoI didn't know about apachetop and glances. I was actually trying to install an app like zabbix before I stumbled on this thread. If these tools can help me monitor the servers, that's even better! Thanks @adionditsak for sharing.
- birdsoffish 13y ago
- neals 13y agoAnybody here now of a ApacheTop-like tool for nginx?
- adionditsak 13y agohttps://github.com/ClockworkNet/wtop https://github.com/ClockworkNet/wtop might be a option
- mgz 13y agoapachetop works fine with nginx logs too.
- adionditsak 13y agoThat is nice mgz. Not tried this yet. Should give it a try soon then :-)
- jlgaddis 13y agoThe default value for "log_format" is "combined" -- identical to the Apache "combined" log format -- so apachetop can read nginx log files without any needed changes.
- inurl 13y agoGoAccess is awesome, free and open source console based. It may output an HTML, JSON, CSV report too. http://goaccess.prosoftcorp.com/ http://goaccess.prosoftcorp.com/
- tostitos1979 13y agoA very lightweight tool I've found useful is nmon.
- kbeaty 13y agoThe 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.html http://sebastien.godard.pagesperso-orange.fr/documentation.h...
- talloaktrees 13y agoI 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.
- zorlem 13y agoIn 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
- adionditsak 13y agoI 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 13y agohttps://news.ycombinator.com/item?id=7180300 https://news.ycombinator.com/item?id=7180300 - The follow up post is made :-)
- replax 13y agoActually, bwm-ng is a nicer alternative to iftop. more information an nicer presented (I think)! try it :)
- gautamsomani 13y agobwm-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 13y agoYeap. bwm-ng > iftop for most uses. If there's a performance problem, iperf is the old standby and even works with 10gbe links.
- afaqurk 13y agoThis 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.
- dredmorbius 13y agoEnable 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.
- eplumlee 13y agoOne 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`
- stiff 13y agoIs 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 13y ago"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).
- blueblob 13y agoAn answer somewhat stolen from stackoverflow says "ps -o rss $(pgrep executablename)" but I guess that assumes that you only have one process running, maybe it would be easier to put it in a script and use "ps -o rss $!" http://stackoverflow.com/questions/7278326/how-to-monitor-a-processes-memory-usage-over-time-ubuntu http://stackoverflow.com/questions/7278326/how-to-monitor-a-...
- midas007 13y agosysstat (sar), slabtop, free
- Erwin 13y agoI'd like to recommend this book to get a current overview of monitoring tools: http://www.amazon.com/Systems-Performance-Enterprise-Brendan-Gregg-ebook/dp/B00FLYU9T2 http://www.amazon.com/Systems-Performance-Enterprise-Brendan... 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.
- ch215 13y agoI 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
- profquail 13y agoThese 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 13y agoI 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 13y agoI'm curious how you got all that from what sounds like a small task: getting something to compile on FreeBSD.
- leephillips 13y agoI 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.
- idoescompooters 13y agohttps://github.com/afaqurk/linux-dash https://github.com/afaqurk/linux-dash
- laichzeit0 13y agoStrange 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.
- donniezazen 13y agoCould anyone please explain why top shows one instance of Chrome while htop shows numerous stances of it?
- deleted 13y ago[deleted]
- adionditsak 13y agohttps://news.ycombinator.com/item?id=7180300 https://news.ycombinator.com/item?id=7180300 - The follow-up post is made :-)