$agent_path = "/home/hadaq/" . $beamTime . "/eb/hadaq_tcl";
     }
 
-    my($exec_command) = "rsh $cpu -l $user_name \"sh -c 'cd; . .bash_profile; cd $agent_path; echo \"DAQSETUP: \\\$DAQ_SETUP\"; type daq_agent; echo \"PWD:\"; pwd; ./daq_agent'\"";
+    my($exec_command) = "rsh $cpu -l $user_name \"sh -c 'cd; . .bash_profile; kill_all_daq_procs; cd $agent_path; echo \"DAQSETUP: \\\$DAQ_SETUP\"; type daq_agent; echo \"PWD:\"; pwd; ./daq_agent'\"";
     print "exec: $exec_command\n";
     system($exec_command);
     print "finished pid:  $PID , cpu: $cpu, subsystem:  $cur_system, command: $exec_command\n";