Loading ...
Sorry, an error occurred while loading the content.

High CPU Monitor/Alert

Expand Messages
  • Mike Dillinger
    I am looking for an app or a daemon that runs and it can perform an action (email, page, reboot, whatever) when the CPU usage reaches a certain threshold (and
    Message 1 of 8 , Jun 1, 2006
    View Source
    • 0 Attachment
      I am looking for an app or a daemon that runs and it can perform an action (email, page, reboot, whatever) when the CPU usage reaches a certain threshold (and perhaps RAM goes low as well). I have looked around and don't see anything like this. Does such a thing exist, or do I have to write one?

      Thanks,
      -MikeD
    • ed
      On Thu, 1 Jun 2006 08:32:08 -0700 ... You will most certainly have to make that yourself. It is a security hole. The /proc filesystem is your friend. --
      Message 2 of 8 , Jun 1, 2006
      View Source
      • 0 Attachment
        On Thu, 1 Jun 2006 08:32:08 -0700
        Mike Dillinger <miked@...> wrote:

        > I am looking for an app or a daemon that runs and it can perform an
        > action (email, page, reboot, whatever) when the CPU usage reaches a
        > certain threshold (and perhaps RAM goes low as well). I have looked
        > around and don't see anything like this. Does such a thing exist, or
        > do I have to write one?

        You will most certainly have to make that yourself. It is a security
        hole. The /proc filesystem is your friend.

        --
        Regards, Ed :: http://www.bsdwarez.net
        proud c++ hacker
        :%s/Open Source/Free Software/g :: Free DNS available
      • Rivera, Angel R
        ... From: linux@yahoogroups.com [mailto:linux@yahoogroups.com] On Behalf Of ed Sent: Thursday, June 01, 2006 12:32 PM To: linux@yahoogroups.com Subject: Re:
        Message 3 of 8 , Jun 1, 2006
        View Source
        • 0 Attachment
          -----Original Message-----
          From: linux@yahoogroups.com [mailto:linux@yahoogroups.com] On Behalf Of
          ed
          Sent: Thursday, June 01, 2006 12:32 PM
          To: linux@yahoogroups.com
          Subject: Re: [linux] High CPU Monitor/Alert


          On Thu, 1 Jun 2006 08:32:08 -0700
          Mike Dillinger <miked@...> wrote:

          > I am looking for an app or a daemon that runs and it can perform an
          > action (email, page, reboot, whatever) when the CPU usage reaches a
          > certain threshold (and perhaps RAM goes low as well). I have looked
          > around and don't see anything like this. Does such a thing exist, or
          > do I have to write one?

          You will most certainly have to make that yourself. It is a security
          hole. The /proc filesystem is your friend.


          ARR>> SNMP can help you with that. Look at wulfstat. We have also
          written daemon to monitor those things.
        • ed
          On Thu, 1 Jun 2006 13:13:16 -0500 ... But rebooting when the CPU level rises is not a good idea on internet service boxes, since it s obvious to a DOS attack.
          Message 4 of 8 , Jun 1, 2006
          View Source
          • 0 Attachment
            On Thu, 1 Jun 2006 13:13:16 -0500
            "Rivera, Angel R" <Angel.R.Rivera@...> wrote:

            > ARR>> SNMP can help you with that. Look at wulfstat. We have also
            > written daemon to monitor those things.

            But rebooting when the CPU level rises is not a good idea on internet
            service boxes, since it's obvious to a DOS attack.

            Rather than reboot it's better to identify tasks that can become locked
            and kill those off. Putting those tasks in inittab can often help
            processes like Apache if a user has got a runaway CGI program and you
            want to kill Apache when it's consumed > 50% CPU for the 5th minute in
            a row.

            C'mon this is linux! I have boxes that run with very high CPU load
            virus scanning for > 450 days, on an unstable kernel.

            --
            Regards, Ed :: http://www.gnunix.net
            just another linux hacker
            :%s/Open Source/Free Software/g :: Free DNS available
          • Ajay Gautam
            ... We use a commercial product for this called Big Brother: http://bb4.com/ Ajay [Non-text portions of this message have been removed]
            Message 5 of 8 , Jun 1, 2006
            View Source
            • 0 Attachment
              On 6/1/06, Mike Dillinger <miked@...> wrote:
              >
              > I am looking for an app or a daemon that runs and it can perform an action
              > (email, page, reboot, whatever) when the CPU usage reaches a certain
              > threshold (and perhaps RAM goes low as well). I have looked around and
              > don't see anything like this. Does such a thing exist, or do I have to
              > write one?
              >
              > Thanks,
              > -MikeD


              We use a commercial product for this called Big Brother: http://bb4.com/

              Ajay


              [Non-text portions of this message have been removed]
            • ed
              On Thu, 1 Jun 2006 16:19:21 -0400 ... big sister/zabbix/nagios are available also, freely -- Regards, Ed :: http://www.linuxwarez.co.uk
              Message 6 of 8 , Jun 1, 2006
              View Source
              • 0 Attachment
                On Thu, 1 Jun 2006 16:19:21 -0400
                "Ajay Gautam" <ajay610@...> wrote:

                > We use a commercial product for this called Big Brother:
                > http://bb4.com/

                big sister/zabbix/nagios are available also, freely

                --
                Regards, Ed :: http://www.linuxwarez.co.uk
                just another unix hacker
                :%s/Open Source/Free Software/g :: Free DNS available
              • Mike Dillinger
                ... From: Ed Sent: Thursday, June 01, 2006, at 01:08PM PDT (GMT -0700) e On Thu, 1 Jun 2006 13:13:16 -0500 ... e But rebooting when the CPU
                Message 7 of 8 , Jun 1, 2006
                View Source
                • 0 Attachment
                  --- Original Message
                  From: Ed <ed@...>
                  Sent: Thursday, June 01, 2006, at 01:08PM PDT (GMT -0700)

                  e> On Thu, 1 Jun 2006 13:13:16 -0500
                  e> "Rivera, Angel R" <Angel.R.Rivera@...> wrote:

                  >> ARR>> SNMP can help you with that. Look at wulfstat. We have also
                  >> written daemon to monitor those things.

                  e> But rebooting when the CPU level rises is not a good idea on internet
                  e> service boxes, since it's obvious to a DOS attack.

                  Rebooting isn't mandatory, but an option. If the CPU reaches 10 or more for a 5 minute period, I think I'd want to reboot. I definitely want to be notified by e-mail and paged, however.

                  Thanks everyone for the info!
                  -MikeD
                • ed
                  On Thu, 1 Jun 2006 13:46:46 -0700 ... The output of `uptime` is not accurate for CPU load. Uptime just makes an average for the number of processes waiting .
                  Message 8 of 8 , Jun 1, 2006
                  View Source
                  • 0 Attachment
                    On Thu, 1 Jun 2006 13:46:46 -0700
                    Mike Dillinger <miked@...> wrote:

                    > Rebooting isn't mandatory, but an option. If the CPU reaches 10 or
                    > more for a 5 minute period, I think I'd want to reboot. I definitely
                    > want to be notified by e-mail and paged, however.
                    >
                    > Thanks everyone for the info!

                    The output of `uptime` is not accurate for CPU load. Uptime just
                    makes an average for the number of processes 'waiting'. The load is
                    better obtained from /proc/stat I believe. At least the better method
                    can be obtained from strace of top.

                    You can have a bunch of processes all 'waiting' and this would bump up
                    the load output of uptime, but the CPU may not be doing any physical
                    work. Generally speaking rebooting based on this could be a false
                    positive.

                    If you allow the box to be rebooted when this happens you may never
                    know the true cause of the problem. Also be careful about mail leaving,
                    a truely laden box will not be able to spawn sendmail.

                    HTTP response timings could be a useful value, if you're providing
                    internet services as this is probably the most important connectivity
                    value.

                    --
                    Regards, Ed :: http://www.bsdwarez.net
                    proud linux person
                    :%s/Open Source/Free Software/g :: Free DNS available
                  Your message has been successfully submitted and would be delivered to recipients shortly.