run this thing in the background
We need to close the current command line, and we need to use the command we assigned before it is executed:
nohup
This means that after we close the ssh, the command will continue to be executed by the host
import stream elsewhere
After we use nohup, we have to find a place for this output, or it may be interrupted, so we use >test.log
nohup python testcode20220329.py >test.log
Look at the current GPU usage
Because we sometimes share the remote host with others, it is very troublesome for us to communicate whether the other party is using it every time, so we only need to use the following command to check the occupancy.
nvidia-smi
Look at the current CPU usage
ps auxw | head -1;ps auxw|sort -rn -k4|head -5