0

Before this, my server running but webmin are not accessible and website very slow. i dont know what happened and I simply restart.

But I think better if I know whats the problem and fix it without restart

(I use Centos, Lighttpd, MySQL, PHP, and Webmin)

So, do you know what command to use to check if everything running fine via SSH?

Thanks

  • 5
    If there wast just a single command to "check if everything" was "running fine" then I think there'd be a lot less of a need for a site like Server Fault. – Evan Anderson Jan 20 '10 at 23:37
  • I need the command, not comment.. since I have no idea about Webmin dependencies –  Jan 20 '10 at 23:50
  • 2
    Evan's point is that you're asking for years of admin experience to be summed up in a single answer. There is no way to do what you're asking with a single command. I would start with the logs. Look through and see if you can find any errors. – einstiien Jan 21 '10 at 00:01
  • Systems administration is a lot like programming which is, after all, just typing... http://www.codinghorror.com/blog/archives/001188.html – Evan Anderson Jan 21 '10 at 00:09

4 Answers4

2

To check if everything is running fine first you must have a baseline. Without knowing what is normal you will find it very difficult to figure out what is out of the ordinary.

You should login to your system occasionally and run commands like below. Examine the output, and take time to learn about the commands and learn what is normal for your system.

  • top (displays information about tasks)
  • vmstat (report virtual memory statistics)
  • free (display amount of free and used memory in the system)
  • sar (system activity report)
  • df -h (disk usage in blocks)
  • df -hi - (disk usage in inodes)
  • iotop - (top-like I/O monitor)
  • tcpdump -qn - (dump network traffic)

Periodically examine your log files in /var/log. Doing this necessary so you will know what to ignore when are having problems.

Ideally you should setup a network monitoring system to gather data the above tools normally collect.

Check out some of the other questions about troubleshooting. There are a few good general questions that should help you get started.

Zoredache
  • 130,897
  • 41
  • 276
  • 420
0

I usually just start with a 'top' command to see what's going on with the various processes currently running and what kind of resources they're using.

It's what I use in *nix, as opposed to Task Manager in Windows land.

0

This command should tell you all the running services, make sure everything you expect to be running, is.

service --status-all | less

If you see a service that isnt running, or you want to just try restarting a service you can use,

chkconfig httpd off
chkconfig httpd on

You can also use these 2 commands to check the top Mem and CPU hogs respectively

ps -auxf | sort -nr -k 4 | head -10
ps -auxf | sort -nr -k 3 | head -10

You may also want to try running strace against some of your programs and see if you can gleam any information from the logs.

Justin S
  • 350
  • 3
  • 15
0

I normally follow

uptime

service --status-all | less

Rajat
  • 3,349
  • 22
  • 29