# Extracts from epilogue... .. # Handle input data as defined by TORQUE epilogue.. $nodefile = "/var/spool/torque/aux/$ARGV[0]"; $job_id = "$ARGV[0]"; $user = "$ARGV[1]"; # Construct list of allocated nodes (node_string) from nodefile.. $last_nodename = ""; foreach $nodename (`cat $nodefile`) { chomp($nodename); if ($nodename eq $last_nodename) { } else { # print "the node is $nodename\n"; $node_string = $node_string . "$nodename" . ","; } $last_nodename = $nodename; } ... # # Remove all remaining processes belonging to user # We have installed a dsh program to do the rsh's simultaneously # $cmd1a = `/var/spool/torque/mom_priv/dsh -f -e \'/var/spool/torque/mom_priv/epilogue _clean_up $user\' -w $node_string`; # end of extracts
The script epilogue_clean_up is just...
#!/bin/tcsh # # Kill all remaining processes of the user that are still left # kill -KILL `ps -U $1 -o pid --no-heading`