linux笔记

来源:互联网 发布:网络主播睡一次多少钱 编辑:程序博客网 时间:2024/06/16 04:10

linux笔记

  • linux笔记
    • 说明
    • su切换位超级用户
    • chmod无效原因分析
    • 监视显存

说明

本文用来记录linux的点滴知识。

su切换位超级用户

su                  //切换到超级用户 exit               //从超级用户退回到普通用户  

Ubuntu下使用 su 切换到超级用户时遇到:

su: Authentication failure  

解决方法:

Try to change the password of the sudo and login$ sudo passwd    [sudo] password for dhamu:Enter new UNIX password:Retype new UNIX password:passwd: password updated successfullyAfter changing the sudo passwd you will be able to switch user via su$ suPassword:root@askmetutorials:/etc# 

chmod无效原因分析

chmod改变文件权限是有限制的,它只能在linux分区下生效,否则权限改不了。

监视显存

查看nvidia显卡信息:

$ nvidia-smi

将会输出类似下面的信息:

$ nvidia-smiFri Jan  6 18:53:54 2012       +------------------------------------------------------+                       | NVIDIA-SMI 2.290.10   Driver Version: 290.10         |                       |-------------------------------+----------------------+----------------------+| Nb.  Name                     | Bus Id        Disp.  | Volatile ECC SB / DB || Fan   Temp   Power Usage /Cap | Memory Usage         | GPU Util. Compute M. ||===============================+======================+======================|| 0.  GeForce 8500 GT           | 0000:01:00.0  N/A    |       N/A        N/A ||  30%   62 C  N/A   N/A /  N/A |  17%   42MB /  255MB |  N/A      Default    ||-------------------------------+----------------------+----------------------|| Compute processes:                                               GPU Memory ||  GPU  PID     Process name                                       Usage      ||=============================================================================||  0.           ERROR: Not Supported                                          |+-----------------------------------------------------------------------------+

设置为每 4s 显示一次显存的情况

$ watch -n 4 nvidia-smi
0 0
原创粉丝点击