1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to discover downtime cause in Linux server?

Discussion in 'Site & Server Administration' started by postcd, Aug 1, 2015.

  1. #1
    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
     
    postcd, Aug 1, 2015 IP
  2. DigitalThirdCoast

    DigitalThirdCoast Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    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.
     
    DigitalThirdCoast, Aug 11, 2015 IP
  3. Andy-Jones

    Andy-Jones Member

    Messages:
    134
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #3
    You can add a server monitoring tool for your server, Nagios is a good server monitoring tool.
     
    Andy-Jones, Aug 11, 2015 IP
  4. lastminutehosti

    lastminutehosti Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #4
    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?
     
    lastminutehosti, Aug 11, 2015 IP
  5. postcd

    postcd Well-Known Member

    Messages:
    1,037
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    190
    #5
    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.
     
    postcd, Aug 11, 2015 IP
  6. billzo

    billzo Well-Known Member

    Messages:
    961
    Likes Received:
    278
    Best Answers:
    15
    Trophy Points:
    113
    #6
    You are using Apache? If so, what is your setting for KeepAliveTimeout? And how much RAM do you have?
     
    billzo, Aug 12, 2015 IP
  7. postcd

    postcd Well-Known Member

    Messages:
    1,037
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    190
    #7
    Yes, Apache and KeepAliveTimeout is 6 and there is around 14gb of free RAM
     
    postcd, Aug 12, 2015 IP