cpu温度查看

sensors命令

  1. xxx@System-Product-Name:~$ sensors
  2. coretemp-isa-0000
  3. Adapter: ISA adapter
  4. Package id 0: +62.0°C (high = +82.0°C, crit = +100.0°C)
  5. Core 0: +56.0°C (high = +82.0°C, crit = +100.0°C)
  6. Core 1: +56.0°C (high = +82.0°C, crit = +100.0°C)
  7. Core 2: +62.0°C (high = +82.0°C, crit = +100.0°C)
  8. Core 3: +55.0°C (high = +82.0°C, crit = +100.0°C)
  9. Core 4: +54.0°C (high = +82.0°C, crit = +100.0°C)
  10. Core 5: +58.0°C (high = +82.0°C, crit = +100.0°C)

#没有的话需要安装下
CentOS系列:

  1. 1.yum install lm_sensors;
  2. 2.sensors-detect
  3. 3.sensors

Ubuntu系列:

  1. 1.apt-get install lm-sensors
  2. 2.sensors-detect
  3. 3.service kmod start
  4. 4.sensors

cpu频率

cpufreq-info -m 命令

  1. xxx@System-Product-Name:~$ cpufreq-info -m
  2. cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
  3. Report errors and bugs to cpufreq@vger.kernel.org, please.
  4. analyzing CPU 0:
  5. driver: intel_pstate
  6. CPUs which run at the same hardware frequency: 0
  7. CPUs which need to have their frequency coordinated by software: 0
  8. maximum transition latency: 0.97 ms.
  9. hardware limits: 800 MHz - 4.00 GHz
  10. available cpufreq governors: performance, powersave
  11. current policy: frequency should be within 800 MHz and 4.00 GHz. ##额定频率
  12. The governor "powersave" may decide which speed to use
  13. within this range.
  14. current CPU frequency is 3.80 GHz.    ##当前频率

#没有的话,需要安装下

  1. yes|sudo apt install cpufrequtils

cpu降频

若当前频率小于 额定频率, 对半,或者更小时, 有可能是降频,
top看看cpu的使用率. 如果是你的程序把cpu占用很多,,吃的满满的. 导致的才是降频.
如果你的程序没在用, 那它自然就恢复到一个较低的频率.

CLI interface报错

  1. WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
  2. E: Internal Error, No file name for open-falcon-agent:amd64
  3. dpkg-preconfigure: 重新开启标准输入失败:
  4. E: Sub-process /usr/bin/dpkg returned an error code (1)

#解决方案

  1. apt install -f

#备用(要不运行 apt-get update 或者加上 —fix-missing)

安装xmind8报错

报错  tail -n 40 /xmind/workspace/.metadata/.log

  1. root@XXX:/home/software/xmind/workspace/.metadata# pwd
  2. /home/daiyi/software/xmind/workspace/.metadata
  3. root@daiyi:/home/daiyi/software/xmind/workspace/.metadata# tail -n 40 .log
  4. at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.handleInvalid(TrackableComputationExt.java:74)
  5. at org.eclipse.e4.core.internal.contexts.EclipseContext.dispose(EclipseContext.java:176)
  6. at org.eclipse.e4.core.internal.contexts.osgi.EclipseContextOSGi.dispose(EclipseContextOSGi.java:106)
  7. at org.eclipse.e4.core.internal.contexts.osgi.EclipseContextOSGi.bundleChanged(EclipseContextOSGi.java:139)
  8. at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:903)
  9. at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
  10. at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
  11. at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213)
  12. at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120)
  13. at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112)
  14. at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:156)
  15. at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)
  16. at org.eclipse.osgi.container.Module.doStop(Module.java:634)
  17. at org.eclipse.osgi.container.Module.stop(Module.java:498)
  18. at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:191)
  19. at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165)
  20. at java.base/java.lang.Thread.run(Thread.java:844)
  21. Caused by: java.lang.ClassNotFoundException: javax.annotation.PreDestroy cannot be found by org.eclipse.e4.core.di_1.6.0.v20160319-0612
  22. at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:398)
  23. at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:361)
  24. at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:353)
  25. at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161)
  26. at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
  27. ... 21 more

看报错,需要java8的包

  1. java --version
  2. sudo apt-get install openjdk-8-jdk

编辑XMind.ini 新增一下内容

  1. vim xmind/XMind_amd64/XMind.ini
  1. -vm
  2. /usr/lib/jvm/java-8-openjdk-amd64/bin

添加好之后,结果如下

  1. root@XXX:/home/software/xmind/XMind_amd64# tail -n 20 XMind.ini
  2. -configuration
  3. ./configuration
  4. -data
  5. ../workspace
  6. -startup
  7. ../plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
  8. --launcher.library
  9. ../plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.400.v20160518-1444
  10. --launcher.defaultAction
  11. openFile
  12. --launcher.GTK_version
  13. 2
  14. -eclipse.keyring
  15. @user.home/.xmind/secure_storage_linux
  16. -vm
  17. /usr/lib/jvm/java-8-openjdk-amd64/bin
  18. -vmargs
  19. -Dfile.encoding=UTF-8

保存退出,打开软件使用吧。

  1. sudo ./XMind

在这里插入图片描述感谢(https://segmentfault.com/a/1190000015338040)

指定GPU以及用量

1.在终端执行程序时指定GPU

  1. CUDA_VISIBLE_DEVICES=0 python your_file.py # 指定GPU集群中第一块GPU使用,其他的屏蔽掉
  2. CUDA_VISIBLE_DEVICES=1 Only device 1 will be seen
  3. CUDA_VISIBLE_DEVICES=0,1 Devices 0 and 1 will be visible
  4. CUDA_VISIBLE_DEVICES="0,1" Same as above, quotation marks are optional GPU一起使用
  5. CUDA_VISIBLE_DEVICES=0,2,3 Devices 0, 2, 3 will be visible; device 1 is masked
  6. CUDA_VISIBLE_DEVICES="" No GPU will be visible

2.在Python代码中指定GPU

  1. import os
  2. os.environ["CUDA_VISIBLE_DEVICES"] = "0"  #指定第一块gpu

3.设置定量的GPU使用量

  1. config = tf.ConfigProto()
  2. config.gpu_options.per_process_gpu_memory_fraction = 0.9 # 占用GPU90%的显存
  3. session = tf.Session(config=config)

4设置最小的GPU使用量

  1. config = tf.ConfigProto()
  2. config.gpu_options.allow_growth = True
  3. session = tf.Session(config=config)

感谢(https://blog.csdn.net/alxe_made/article/details/80471739)