When we need to restart zmc, we may need to restart zma due to not enough space in /dev/shm.

This commit is contained in:
Isaac Connor 2018-01-11 15:00:05 -05:00
parent 666005fb5d
commit b86d32c005
1 changed files with 4 additions and 0 deletions

View File

@ -131,6 +131,9 @@ while( 1 ) {
}
if ( $restart ) {
# Because zma depends on zmc, and zma can hold the shm in place, preventing zmc from using the space in /dev/shm,
# we need to stop zma before restarting zmc.
runCommand( "zmdc.pl stop zma -m $$monitor{Id}" ) if $monitor->{Function} ne 'Monitor';
my $command;
if ( $monitor->{Type} eq 'Local' ) {
$command = "zmdc.pl restart zmc -d $monitor->{Device}";
@ -138,6 +141,7 @@ while( 1 ) {
$command = "zmdc.pl restart zmc -m $monitor->{Id}";
}
runCommand( $command );
runCommand( "zmdc.pl start zma -m $$monitor{Id}" ) if $monitor->{Function} ne 'Monitor';
} elsif ( $monitor->{Function} ne 'Monitor' ) {
# Now check analysis daemon
$restart = 0;