Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When i checked my server in today morning,i found server was hang.
How can i find whether it is hang or not?
Where can i find the log from which i can find the exact time?
If the server freezes... there's not much you can do about that. Check application logs for the last timestamped entry to guestimate when it went down - and perhaps why too.
That's why it's nice to have another system monitoring so you can get a timeline of it's state.. memory usage, cpu usage, disk usage, etc
go back further in /var/log/messages and grab the log entries. We need to see what message was repeating so skip back until you see something other than "last message repeated..."
Ah. ok then... well the evidence, if any, might be in another application log. Get a list of services/daemons together that are running on that machine (ssh, iptables, etc) and start going through their logs for the time that the primary service went down. If you get a list of those services, I can help you lookup where they typically store their own log files.
Also, I'd still be curious about what those repeated messages were.
You can install Webmin. It has a function to notify you if your Apache, Postfix, MySQL, etc, goes down. My setup sends a message to my cell phone via email.
I love webmin and that's an OK solution for monitoring local services, but it won't help if the server goes down hard. In this case, it needs to be monitored by a separate server and monitoring service that is immune to any volatile states the watched server/service is currently experiencing.
But if that's all you got, it's better than nothing! 8D
Last edited by JulianTosh; 09-04-2009 at 04:36 PM.
Reason: clarification.
I love webmin and that's an OK solution for monitoring local services, but it won't help if the server goes down hard. In this case, it needs to be monitored by a separate server and monitoring service that is immune to any volatile states the watched server/service is currently experiencing.
But if that's all you got, it's better than nothing! 8D
Munin imo is also a nice monitoring tool.
Handy to see when something dies off via the graphs
(that said, I don't know webmin, but'll check it out)
You need two things: a monitoring system, and a syslog server. One tells you when there's a problem, the other is used to diagnose the problem.
The monitoring system could be really simple, like putting a script in crontab that pings each server and email a list of which don't reply.
or
The monitoring system could be insanely complex and feature rich like Zenoss or Hypernic or something.
Now you need a syslog server! Syslog servers are really easy to setup, just google for setting up a syslog server in your favorite distro. What you want is for every server in your environment to log to that one syslog server. This is important so all the logs are in one place _outside_ of the server that's having problems. Then you can review the logs while the dead server is being rebuilt, or kept offline for security reasons.
When that's setup, what will happen is: your server logs what it's doing to your syslog server; something goes wrong, it writes it to syslog; the monitoring system alerts you that there was a problem; you go into your syslog server and read the logs to figure out what happened.
It's what I do here at work.
I've got a pretty large environment that I take care of (dev), and a more important, but smaller environment (production). Right now I'm monitoring both of them with zenoss, which is pretty cool, but honestly, for what I _really_ need, a pinging script would do fine. Dev and production each have their own syslog server, and prettymuch everything logs to one server or the other. When something goes wrong, Zenoss sends me an email. At that point I hop on syslog and see if it can tell me what happened (most of the time, it can).
Sidenote: All HP jetdirect cards can all do syslog! If you point a JD card to your syslog server, you have an easy way of knowing when something is going wrong with your printers. For instance, if I see more than a handful of paper-late jams on one printer in a day, I can be pretty sure the fuser is going.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.