NAME
Linux::MCELog - Perl extensions to extract memory failure information from MCELog UNIX domain socket on Linux.
SYNOPSIS
use Data::Dumper;
use Linux::MCELog qw(ping dump_all);
# test if MCELog UNIX domain socket is pingable
print "OK\n" if (ping() == 1);
# print memory failures
print Dumper(dump_all());
DESCRIPTION
Linux::MCELog is a module to extract memory failure information from MCELog (Machine Check Exception) UNIX domain socket on Linux.
EXPORT
Nothing is exported by default. You can ask for specific subroutines (described below) or ask for all subroutines at once:
use Linux::MCELog qw(ping dump_all);
# or
use Linux::MCELog qw(:all);
SUBROUTINES
ping
Return a scalar to indicate if the MCELog UNIX domain socket is pingable (answerable). This function uses /var/run/mcelog-client
as the default MCELog UNIX domain socket path. However, user can still pass different UNIX domain socket path in the function like ping('/diff/socket/path')
.
There are 3 possible return values in function.
1
: MCELog UNIX domain socket is pingable. If the ping()
function does not return 1, user needs to check if the MCELog is functional before running any other functions.
socket_error
: Cannot access the MCELog UNIX domain socket.
timeout
: Cannot read the ping response message after 30 seconds.
dump_all
Return a hash reference about the memory failures. This reference would have the corrected and uncorrected figures by SOCKET
/ CHANNEL
/ DIMM
. This function uses /var/run/mcelog-client
as the default MCELog UNIX domain socket path. However, user can still pass different UNIX domain socket path in the function like ping('/diff/socket/path')
.
It is possible the returned hash reference is empty. MCELog data will be available only when there's an event triggered.
There are 2 possible return values in the {'error'}
key if error occurs.
socket_error
: Cannot access the MCELog UNIX domain socket.
timeout
: Cannot read the dump all
response message after 30 seconds.
SEE ALSO
You can find documentation for this module with the perldoc command.
perldoc Linux::MCELog
Source Code: https://github.com/meow-watermelon/Linux-MCELog
MCELog Official Website: https://mcelog.org
AUTHOR
Hui Li, <herdingcat@yahoo.com>
COPYRIGHT AND LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.