Terminal code record

I ran the code on the server, recorded some terminal codes, and saved it for later searching;

nvidia-smi

Insert picture description here
How to terminate the current program under Linux command line
Shortcut key:
Ctrl+c

Play the role of terminating the currently executing program under the command line (forcibly interrupt the execution of the program, the process has been terminated)

Ctrl+z

Interrupt command, the task is aborted (the meaning of pause), but the task is not over, he is still in the process, he just maintains the suspended state, the user can use the fg/bg operation to continue the task in the foreground or background, and the fg command to restart Tasks that are interrupted in the foreground, the bg command puts the interrupted tasks in the background for execution

For example: when you have a file in vi, if you need to use the shell to perform other operations, but you don't plan to close vi, because you have to save and launch, you can simply press ctrl+z, and the shell will suspend the vi process~ , After you finish that shell operation, you can use fg command to continue vi your file.

Ctrl+d

Equivalent to the exit command, exit the current shell (ctrl-d does not send a signal, but represents a special binary value, which means EOF)

Ctrl+s

Suspend the current shell (protection effect is obvious)

Ctrl+q

Unfreeze the hung shell, reconnect and open a terminal, reboot linux or kill related processes.

python -c "import paddle; paddle.fluid.install_check.run_check()"
can check whether paddlepaddl is installed successfully!
Insert picture description here
Can only run a single GPU.

cat /usr/local/cuda/version.txt
Insert picture description here
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
Insert picture description here
Here, you must first look at the path of cudnn. The
Insert picture description here
error message indicates that the libnccl.so file is not found. You can try to search the file globally.

find / -name "libnccl.so*"

unzip files

unzip -q data/data47260/NEU-CLS.zip

Move files

jobs can view the current task number
Insert picture description here
can be used kill %1to kill the process.
nohup 语句 >123.txt &This is running in the background, and write the record into 123.txt

How to see who is using a certain GPU

nvidia-smi

Insert picture description here
Then ps -f -p 70077007 is the PID number

Insert picture description here
Where
UID represents the user ID
PID represents the process ID
PPID represents the parent process ID
TIME represents the execution time of
CMD represents a command execution

Guess you like

Origin blog.csdn.net/ALZFterry/article/details/108978189