New answers tagged

0

See Documentation regarding CHECK PROCESS. It's as simple as CHECK PROCESS myProcName MATCHING "my_detached_script.sh" It checks for Processes containing "my_detached_script.sh" (note: It's a regex. So it also matches "my_detached_script-sh" and so on). It can be any valid regex. You might want to check your regex with monit procmatch '<YourRegexHere>...


0

Sometimes I forgot to run screen too and losing my unfinished work. In this case, though we can't reattach to a broken SSH session, reparenting a running program to a new terminal and resuming what you're doing is still possible thanks to reptyr. After accidentally disconnected from a SSH session, the first thing first is to run screen lest the connection ...


0

how to deal with two processes that run in parallel? There is a lot of possible answer, using or not screen, tmux or tools, or running as background tasks, using separated log files... Running two process separatedly You could use named fifo: mkfifo $HOME/mysqlFifo Then run in two separated terminal console: mysqldump --host host1 --databases db1 db2 ...


0

Leave your busy session running. Open another fresh session. Use tmux so that app will persist even if you close or lose your ssh connection. The tmux is similar to screen, arguably a bit better. sudo apt install tmux tmux Now the crucial step, steal the terminal of the processes. sudo apt install reptyr ps uw # find one of the PIDs to save, any will ...


Top 50 recent answers are included