打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
ubuntu 让Indicator-Sysmonitor 在顶部面板显示上下行网速及CPU温度

转自:http://a-nerd.info/?p=1377


update:

先是安装Indicator-sysmonitor,也就是system monitor indicator

sudo add-apt-repository ppa:alexeftimie/ppa
sudo apt-get update
sudo apt-get install indicator-sysmonitor

默认只显示CPU、内存,要显示上下行网速和温度的话

sudo apt-get install dstat
sudo apt-get install acpi

下载sysmon文件,放入主目录,重命名为.sysmon,在设置界面按下图配置,Customize output中有{sysmon}就可以

 

 

 

下方为以前的版本,sysmon文件的由来及修改,可无视


sudo apt-get install dstat
mkdir -p ~/.Indicator-Sysmonitor-Scripts
cd ~/.Indicator-Sysmonitor-Scripts
wget http://webupd8.googlecode.com/files/sysmon_0.2.tar.gz
tar -xvf sysmon_0.2.tar.gz

在设置中选中Use  this command,输入:

$HOME/.Indicator-Sysmonitor-Scripts/sysmon

indicator-sensors设置选项 效果: indicator-sensors显示上下行网速

不过这样一来就不能显示CPU温度了。 安装acpi

sudo apt-get install acpi

终端下:

a-nerd:~$ acpi -t
Thermal 0: ok, 49.0 degrees C

得到的结果中第16-20字符是CPU温度 此时需要稍微修改一下sysmon文件:

sudo gedit .Indicator-Sysmonitor-Scripts/sysmon

在“The Indicator Sysmonitor actual output”上方空白处加上:

#------------------- acpitemp --------------------------
if [ $temp = true ]; then
#将acpi -t这个命令显示出第16-20个字符即CPU温度赋给acpitemp
acpitemp=$(acpi -t| cut -c 16-20)°C
fi

在“The Indicator Sysmonitor actual output”下方文本的末尾处加上:

$(if [ $temp = true ]; then echo \|Temp:$acpitemp; fi)
#当temp为True时显示acpitemp即CPU温度

最后在Setting部分加上

temp=true

以显示CPU温度。 indicator-sensors显示CPU温度和上下行网速 如果感觉太占地方了可以去掉分隔符、简写Men/CPU/Temp等。 可以参考本人的sysmon文件

本文链接地址: 让Indicator-Sysmonitor在顶部面板显示上下行网速及CPU温度

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Ubuntu12.10查看CPU温度方法介绍
树莓派实现温度监控并控制风扇散热 | 树莓派实验室
软件安装
统信UOS安装KeePass客户端方法
压力测试工具:Stress详解
Django on uWSGI and Nginx
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服