Linux::MCELog - Perl extensions to extract memory failure information from MCELog UNIX domain socket on Linux.
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());
Linux::MCELog is a module to extract memory failure information from MCELog (Machine Check Exception) UNIX domain socket on Linux.
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);
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').
/var/run/mcelog-client
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.
1
ping()
socket_error: Cannot access the MCELog UNIX domain socket.
socket_error
timeout: Cannot read the ping response message after 30 seconds.
timeout
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').
SOCKET
CHANNEL
DIMM
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.
{'error'}
timeout: Cannot read the dump all response message after 30 seconds.
dump all
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
Hui Li, <herdingcat@yahoo.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Linux::MCELog, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Linux::MCELog
CPAN shell
perl -MCPAN -e shell install Linux::MCELog
For more information on module installation, please visit the detailed CPAN module installation guide.