Live data from Hacker News

Linux server monitoring tools

aarvik.dk

51–60 of 83 posts

Re: Linux server monitoring tools

#51
post #45

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.

An 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-...

Re: Linux server monitoring tools

#52
post #45

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.

Real simple way: Cron job to dump "top" to a file. It will tell you all processes and their memory/CPU usage every x minutes. Once you need data on a specific process, you can just grep its pid.

Re: Linux server monitoring tools

#53
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

Re: Linux server monitoring tools

#55
These tools aren't limited to Linux; if you're running FreeBSD:

* http://www.freshports.org/sysutils/htop/

* http://www.freshports.org/sysutils/py-glances/

* 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/bwm-ng/

* http://www.freshports.org/sysutils/xsysstats/

* 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

Re: Linux server monitoring tools

#56
post #49
post #45

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.

"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 l…

pidstat from the sysstat package seems to be excellent for what I was looking to do. Thanks a lot, both tools are keepers!

Re: Linux server monitoring tools

#57
post #39

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 Demo here: http://afaq.dreamhosters.com/linux-dash/ Easily extensible if anyone wants to use it.

looks awesome... will try this out

Re: Linux server monitoring tools

#58
post #45

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.

Scalyr [1] can do this. (Disclaimer: I am the founder of Scalyr, and it's a commercial product.) We aim to be a one-stop-shopping monitoring tool: collect everything you might want to collect, and let you analyze it in any way you want. To your question, we can collect CPU, memory, I/O, and other stats for specified processes [2], and give you graphs, rolled-up dashboards, and alerts on that data.

We're always looking for feedback, and we're happy to give out discounted or free accounts to startups. Drop me a line -- steve@[company domain] -- if you're interested.

[1]: https://www.scalyr.com [2]: https://www.scalyr.com/appDashboard

Re: Linux server monitoring tools

#59
post #45

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.

  $ man sar

Re: Linux server monitoring tools

#60
post #11

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

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

I have this aliased as duf:

  $ du -sk * | sort -n | perl -ne '\''($s,$f)=split(m(\t));for (qw(K M G)) {if($s
Post reply on HN