mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-25 22:55:15 +02:00
enh(linux/local): mode systemd-sc-status - manage new output (#3319)
This commit is contained in:
parent
e985d872ab
commit
d33c3c1f88
@ -117,7 +117,7 @@ sub manage_selection {
|
|||||||
|
|
||||||
my ($stdout) = $options{custom}->execute_command(
|
my ($stdout) = $options{custom}->execute_command(
|
||||||
command => 'systemctl',
|
command => 'systemctl',
|
||||||
command_options => '-a --no-pager --no-legend'
|
command_options => '-a --no-pager --no-legend --plain'
|
||||||
);
|
);
|
||||||
|
|
||||||
$self->{global} = { running => 0, exited => 0, failed => 0, dead => 0, total => 0 };
|
$self->{global} = { running => 0, exited => 0, failed => 0, dead => 0, total => 0 };
|
||||||
@ -145,12 +145,15 @@ sub manage_selection {
|
|||||||
|
|
||||||
($stdout) = $options{custom}->execute_command(
|
($stdout) = $options{custom}->execute_command(
|
||||||
command => 'systemctl',
|
command => 'systemctl',
|
||||||
command_options => 'list-unit-files --no-pager --no-legend'
|
command_options => 'list-unit-files --no-pager --no-legend --plain'
|
||||||
);
|
);
|
||||||
#runlevel4.target enabled
|
# vendor preset is a new column
|
||||||
#runlevel5.target static
|
#UNIT FILE STATE VENDOR PRESET
|
||||||
#runlevel6.target disabled
|
#runlevel4.target enabled
|
||||||
while ($stdout =~ /^(.*?)\s+(\S+)\s*$/msig) {
|
#runlevel5.target static
|
||||||
|
#runlevel6.target disabled
|
||||||
|
#irqbalance.service enabled enabled
|
||||||
|
while ($stdout =~ /^(.*?)\s+(\S+)\s*/msig) {
|
||||||
my ($name, $boot) = ($1, $2);
|
my ($name, $boot) = ($1, $2);
|
||||||
next if (!defined($self->{sc}->{$name}));
|
next if (!defined($self->{sc}->{$name}));
|
||||||
$self->{sc}->{$name}->{boot} = $boot;
|
$self->{sc}->{$name}->{boot} = $boot;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user