justanhduc / task-spooler

A scheduler for GPU/CPU tasks
https://justanhduc.github.io/2021/02/03/Task-Spooler.html
GNU General Public License v2.0
273 stars 24 forks source link

How to send SIGINT to a process? #57

Closed jasam-sheja closed 3 months ago

jasam-sheja commented 5 months ago

Is there a way to send SIGINT to one of the running processes, like using ts -k [id] to send SIGTERM?

LeelaPrasadMaturu commented 3 months ago

kill -SIGINT [PID]

find process id's with this command ts -l

jasam-sheja commented 3 months ago

The ts -l command shows the job list but none of the columns show the PID! Currently, I'm using nvidia-smi to pinpoint the PID, but it'd be nicer to do it from ts.

CMGeldenhuys commented 3 months ago

I believe you can get the PID using ts -p

jasam-sheja commented 3 months ago

Thanks. This is new! Now I can call kill -s SIGINT $(ts -p [id])

jasam-sheja commented 3 months ago

Closing ...