查看CPU信息
cat /proc/cpuinfo
显示当前电源功耗
top
命令能够清晰的展现出系统的状态,而且它是实时的监控,按q
退出。
uptime
与w
这两个命令只是单纯的反映出负载,所表示的是过去的1分钟、5分钟和15分钟内进程队列中的平均进程数量。
dmesg 命令
Linux dmesg(英文全称:display message)命令用于显示开机信息。
kernel 会将开机信息存储在 ring buffer 中。您若是开机时来不及查看信息,可利用 dmesg 来查看。开机信息亦保存在 /var/log
目录中,名称为 dmesg 的文件里。
dmesg [-cn][-s <缓冲区大小>]
查看系统崩溃日志
-
journalctl
:用于查看systemd日志,可以通过以下命令查看崩溃相关的日志: “journalctl -b -1″,这会显示最后一次系统启动到崩溃之间的所有日志。
journalctl 用来查询 systemd-journald 服务收集到的日志。systemd-journald 服务是 systemd init 系统提供的收集系统日志的服务。
命令格式为:journalctl [OPTIONS…] [MATCHES…]
最近日志:sudo journalctl -b -1
linux journalctl 命令 -
/var/log/syslog
:这是存储系统日志的主要文件,可以使用”cat /var/log/syslog | grep -i “error”
“来过滤出包含错误信息的日志。 -
/var/log/kern.log
:这是Linux内核日志文件,也可以使用”cat /var/log/kern.log | grep -i “error”
“来找到崩溃相关的错误信息。
su - 认证失败
原因:报这个错误的原因是root用户默认锁定的,只要使用 passwd 命令重新设置下 root 密码即可
sudo passwd
显卡驱动安装
找到显卡对应版本驱动:https://www.nvidia.cn/geforce/drivers/
给驱动 run 文件赋予执行权限:
sudo chmod 777 NVIDIA-linux-x86_64-xxx.xxx.run
sudo ./NVIDIA-linux-x86_64-xxx.xx.run -no-opengl-files
GCC11 升级为GCC12
1.Would you like to register the kernel module souces with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later? 【NO
】
2.Would you like to run the nvidia-xconfigutility to automatically update your x configuration so that the NVIDIA x driver will be used when you restart x? Any pre-existing x confile will be backed up. 【YES
】
3.是否安装 32 位驱动 【首选Yes
】
https://blog.csdn.net/weixin_42711071/article/details/90637706
挂载硬盘
如果新的挂载点不存在,需要新建目录,在终端输入(挂载点以‘/media/disk’为例)
sudo mkdir /media/disk
sudo mount /dev/sda0 /media/disk
/dev/sda0 为硬盘
Unsupported gpu architecture ‘compute_89’
原因:显卡太新
vi ~/.bashrc
# 在配置文件中添加如下一行
export TORCH_CUDA_ARCH_LIST="8.0" # 因为是CUDA11.0,对应的算力为8.0
source ~/.bashrc
安装好以后再将bashrc中的那行代码注释掉
查看CPU、GPU温度
watch -n 1 sensors
watch -n 1 nvidia-smi -q -i 0,1 -d TEMPERATURE