I recently had an ubuntu server slow to its knees, and when trying to figure out why I realized it didn't have iostat installed. The system was stressed out to the point where I couldn't install the package, making me realize that I need to pre-install whatever diagnostic tools I think I might need.

So I turn to you, dear wise community. What diagnostic tools should I ensure are installed on my Ubuntu Precise server before it goes awry, in case I need them?

closed as not constructive by Zoredache, mdpc, Scott Pack, HopelessN00b, Ward Dec 15 '12 at 4:50

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Magic SysRq setting enabled? – Deer Hunter Dec 14 '12 at 17:39
  • 1
    It is an interesting question, but not the type of question that is generally permitted here. We generally do not permit poll the audience style questions. Questions are expected to have a single valid answer. Questions like this are chatty, and open ended. – Zoredache Dec 14 '12 at 18:08

You should have a load of tools installed by default. The more common ones to use on servers would be the following;

uptime, top, mpstat, vmstat.
Installing the sysstat package gives you iostat and also sar.
Install strace for stack tracing and gdb for generating core dumps.
If you have a MySQL server running on the box you can also install MyTop to watch what MySQL is doing.

You can also install nmon which shows what the system is doing with with cpu, memory, disk, network, and show running processes. I believe this is included in the lucid ubuntu package which in itself is another performance monitoring tool.

Then there are always the log files which sometimes (not always) provide useful information.

I'm sure I'm missing some, but these should be enough to help diagnose/trace a lot of issues.

  • Base installs vary greatly. Server images sometimes start with as little installed as possible. – Leopd Dec 14 '12 at 18:38
  • This is very true, however i have yet to come across a base install that doesn't have top :p – LloydOliver Dec 14 '12 at 18:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.