From b86d32c0053b93817b8a320363ca5d3be5e08fed Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 11 Jan 2018 15:00:05 -0500 Subject: [PATCH] When we need to restart zmc, we may need to restart zma due to not enough space in /dev/shm. --- scripts/zmwatch.pl.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/zmwatch.pl.in b/scripts/zmwatch.pl.in index 80d66e5a8..2dc920dd5 100644 --- a/scripts/zmwatch.pl.in +++ b/scripts/zmwatch.pl.in @@ -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;