Hello, server was down some minutes and ping was like 10 failed, 1 OK SSH unconnectable I want to ask how to discover cause or any way to setup some script whiich can monitor server and log the cause of downtime? These are only logs updated during downtime: cron maillog lastlog wtmp secure cat maillog.... Aug 1 15:3**** stat=Deferred: Connection refused by my.fqdn.hostname. Aug 1 15:38:49 SC-D7150 sendmail[380549]: t71FcnXw380549: localhost [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA The Linux dist. is CentOS.. thank You
Are you doing any sort of monitoring? Perhaps try some thing like OSSEC to see if it helps. Your monitor may not point to the exact cause right away, but usually you'll be able to identify it pretty easily when you're able to see the errors first start occuring. For some redundancy, I also recommend PRTG and Observium.
I would recommend getting a off server uptime solution because monitoring a down server will not show anything. Also check your logs and what are your load averages?
You all appears to be wrong so far. I do not need monitoring of an uptime. I rather need some shell script to monitor what is going on and what caused downtime on my server.
You are using Apache? If so, what is your setting for KeepAliveTimeout? And how much RAM do you have?