<commit_before><commit_msg>Kill processes on ops which are used by WaNetMon - automanagerclient - opsrecv - manager<commit_after>#!/usr/bin/perl
#
# EMULAB-COPYRIGHT
# Copyright (c) 2006 University of Utah and the Flux Group.
# All rights reserved.
#

#
# kill processes associated with wanetmon on ops
#

use strict;

sub kill_pid($){
    my ($pid) = @_;
    `kill $pid`;
    my $successresult = `ps -a -o pid | grep $pid`;

    if( $successresult ne "" ){
        print "failresult = $successresult\n";
        return 0;
    }else{
        return 1;
    }
}


my ($pid, $command);

###########################################
($pid, $command) = split(" ",
    `ps -a -o pid,command | grep "perl automanagerclient.pl" | grep -v "grep"`,
                            2);
chomp $command;

print "stopping: ($pid,$command)\n";
if( kill_pid($pid) ){
    print "success!\n";
}else{
    print "FAILURE of killing pid=$pid\n";
}

###########################################


($pid, $command) = split(" ",
    `ps -a -o pid,command | grep "perl manager.pl" | grep -v "grep"`,
                            2);
chomp $command;

print "stopping: ($pid,$command)\n";
if( kill_pid($pid) ){
    print "success!\n";
}else{
    print "FAILURE of killing pid=$pid\n";
}
###########################################


($pid, $command) = split(" ",
    `ps -a -o pid,command | grep "perl opsrecv.pl" | grep -v "grep"`,
                            2);
chomp $command;

print "stopping: ($pid,$command)\n";
if( kill_pid($pid) ){
    print "success!\n";
}else{
    print "FAILURE of killing pid=$pid\n";
}
###########################################

{'fraction_non_alphanumeric': 0.2587584511370621, 'fraction_numerical': 0.005531653349723417, 'mean_word_length': 2.980440097799511, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6621401', 'n_tokens_mistral': 552, 'n_tokens_neox': 526, 'n_words': 150}