Hardware
banshee/hardware-collection/hardware/ibm/ssh/hmc/
serviceable-events
The open serviceable events of an IBM HMC, the hardware problems of its servers waiting for service, by SSH.
by banshee0 installations1 version
Published on October 27, 2026. First version.
// The open serviceable events of a Hardware Management Console (HMC): the hardware problems of the IBM Power
// servers it manages that wait for service. By SSH, on the HMC's command line, since its REST API does not
// serve them. Runs lssvcevents -t hardware --filter "status=open" -F problem_num:status, which only lists.
need('protocol:ssh');
output('open', 'number', array('label' => 'Open serviceable events'));
output('problems', 'text', array('label' => 'Problem numbers'));
watch.above('open-events', 'Serviceable events open', 'open', array(
'help' => 'Raises while the HMC holds a hardware problem waiting for service; the HMC tells which in its Serviceable Events Manager.',
'warning' => 0,
));
// One line per open event, its problem number and its status separated by ":": "1234:open". A line of any
// other form stops the collector: an output it does not understand never reads as "no event".
$events = ssh.run('lssvcevents -t hardware --filter "status=open" -F problem_num:status');
if ($events['exit'] != 0) {
fail('misconfigured', 'lssvcevents fails, exit ' . $events['exit'], text.trim($events['errors'] . ' ' . $events['output']));
}
$problems = array();
foreach (text.lines($events['output']) as $line) {
$m = text.match($line, '^([0-9]+):open$');
if (list.count($m) == 0) {
fail('misconfigured', 'lssvcevents answers a line the collector does not read', $line);
}
$problems = list.add($problems, $m[1]);
}
value('open', list.count($problems));
value('problems', text.join($problems, ', '));