MOON
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
System: Linux csr818.wilogic.com 2.6.18-419.el5xen #1 SMP Fri Feb 24 22:50:37 UTC 2017 x86_64
User: digitals (531)
PHP: 5.4.45
Disabled: NONE
Upload Files
File: //proc/self/root/proc/self/root/scripts.20110531.215904.25158/oopscheck
#!/usr/bin/perl
# cpanel - oopscheck                              Copyright(c) 2010 cPanel, Inc.
#                                                           All rights Reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

BEGIN { unshift @INC, '/usr/local/cpanel'; }

use Cpanel::iContact qw( );

chomp($hostname = `hostname`);

$inoops=0;
@DMESG=split(/\n/,`dmesg`);
foreach $_ (@DMESG) {
    s/\n|\r//g;
    if ( /^EIP/ || ((/invalid operand: /i || /Unable to handle/i) && !/^PCI/)) {
        $inoops = 1;
    }
    if ($inoops) {
        $oops .= $_ . "\n";
    }
    if (/^code:/i) {
        $inoops = 0;
    }
}
if ($oops ne "") {
    $subject = "[oopscheck] KERNEL Oops on ${hostname} !!!";

    $msg .= "IMPORTANT: Do not ignore this email.\n";
    $msg .= "Your kernel had an Oops!\n\n";
    $msg .= "This is the result of bad hardware or a kernel bug.\n";
    $msg .= "Your system may continue to function as normal, however\n";
    $msg .= "there is a good chance bad things are happening right now.\n";
    $msg .= "\tBad things include: files disappearing, daemons crashing,\n";
    $msg .= "\tcomplete server crashs, disk corruption and many others.\n\n";
    $msg .= "You might want to check your RAM with memtest86 as this is\n";
    $msg .= "usually the cause of the problem.\n";
    $msg .= "\thttp://www.memtest86.com/\n\n";
    $msg .= "The Oops is below:\n";
    $msg .= "$oops\n";

    Cpanel::iContact::icontact('application' => 'oopscheck',
                                 'level'   => 1,
                                 'subject' => $subject,
                                 'message' => $msg,
                                 'msgtype' => '');
    print "Oops detected .. sent email\n";
}