终于搞定了conky
2008-10-25 14:49
260 查看
从网上找到的配置例子都有点问题,大多数都是用的i2c,可是新版本的sensors都在platform里了。
首先安装需要的程序:
sudo apt-get install lm-sensors conky
配置sensors:
sudo sensors-detect
一路回车,在最后显示出来需要加载的模块,比如我的:To load everything that is needed, add this to /etc/modules:
#----cut here----
# Chip drivers
f71805f
k8temp
#----cut here----
Do you want to add these lines automatically? (yes/NO)
这里要注意,如果想要每次启动自动加载驱动模块的话就要回答 yes,而默认的是no
手动加载这检测到的驱动模块:
sudo modprobe f71805f
sudo modprobe k8temp
运行sensors看看结果:$ sensors
k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp: +30.0°C
f71872f-isa-0290
Adapter: ISA adapter
in0: +3.36 V (min = +0.00 V, max = +4.03 V)
in1: +0.98 V (min = +0.00 V, max = +2.02 V)
in2: +1.26 V (min = +0.00 V, max = +2.02 V)
in3: +0.95 V (min = +0.00 V, max = +2.02 V)
in5: +1.10 V (min = +0.00 V, max = +2.02 V)
in6: +1.55 V (min = +0.00 V, max = +2.02 V)
in7: +1.42 V (min = +0.00 V, max = +0.00 V) ALARM
in9: +3.36 V (min = +0.00 V, max = +4.03 V)
in10: +3.10 V (min = +0.00 V, max = +4.03 V)
fan1: 2311 RPM (min = 0 RPM)
fan2: 0 RPM (min = 0 RPM)
fan3: 0 RPM (min = 0 RPM)
temp1: +29.0°C (high = +100.0°C, hyst = +100.0°C) sensor = thermal diode
temp2: +27.0°C (high = +255.0°C, hyst = +0.0°C) sensor = thermal diode
temp3: +96.0°C (high = +114.0°C, hyst = +24.0°C) sensor = thermistor
准备工作完成,下面就是配置conky了,安装完conky是不会自动生成配置文件的,所以要手动新建一个文件:
vi ~/.conkyrc#Conky configuration
background yes
use_xft yes
xftfont Monospace:size=9
xftalpha 0.8
out_to_console no
update_interval 2
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
stippled_borders 5
maximum_width 222
border_margin 4
border_width 1
default_color grey
default_shade_color black
default_outline_color black
alignment top_right
gap_x 10
gap_y 47
no_buffers no
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
use_spacer no
TEXT
${color white}$alignc$sysname $kernel on $machine
${color white}${exec whoami} @ $nodename $alignr Uptime: ${color white}$uptime
$color$stippled_hr
${color}Date: ${color white}${time %Y,%m,%d}${alignr}${color}Time: ${color white}${time %k:%M:%S}
$color$stippled_hr
CPU ${color FFFFFF}${alignc} ${freq dyn}MHz / ${platform f71805f.656 temp 2}°C ${alignc} MB: ${color white}${platform f71805f.656 temp 1}°C
${color}CPU:${color white} ${cpu cpu1}% ${cpubar cpu1}
${cpugraph 000000 5000a0}
${color}RAM:${color white}$memperc% $mem/$memmax $membar
${color}Swap:${color white}$swapperc% $swap/$swapmax ${swapbar}
$color$stippled_hr
${alignc}File systems
${color}/dev/sda1${color white} ${fs_used_perc /}% ${fs_used /}/${fs_size /} ${fs_bar /}
Highest CPU $alignr CPU% MEM%${color FFAA00}
${top name 1}$alignr${top cpu 1}${top mem 1}
${top name 2}$alignr${top cpu 2}${top mem 2}
${top name 3}$alignr${top cpu 3}${top mem 3}
${top name 4}$alignr${top cpu 4}${top mem 4}
${top name 5}$alignr${top cpu 5}${top mem 5}
${color}
Highest MEM $alignr CPU% MEM%${color B5FF00}
${top_mem name 1}$alignr${top_mem cpu 1}${top_mem mem 1}
${top_mem name 2}$alignr${top_mem cpu 2}${top_mem mem 2}
${top_mem name 3}$alignr${top_mem cpu 3}${top_mem mem 3}
${top_mem name 4}$alignr${top_mem cpu 4}${top_mem mem 4}
${top_mem name 5}$alignr${top_mem cpu 5}${top_mem mem 5}
${color}
$stippled_hr
NETWORK $alignr IP: ${color FFFFFF}${addr eth0}${color}
Down ${color FFFFFF}${downspeed eth0} k/s${color} $alignr Up ${color FFFFFF}${upspeed eth0} k/s${color}
${color FF8177}${downspeedgraph eth0 25,110}${color} $alignr ${color FFFFFF}${upspeedgraph eth0 25,110}${color}
Total ${color FFFFFF}${totaldown eth0}${color} $alignr Total ${color FFFFFF}${totalup eth0}
这是我从conky官网上下的一个例子修改的,要注意的是
CPU ${color FFFFFF}${alignc} ${freq dyn}MHz / ${platform f71805f.656 temp 2}°C ${alignc} MB: ${color white}${platform f71805f.656 temp 1}°C
这一行,其中的”f71805f.656“要换成你自己的实际目录中,这个目录是在/sys/devices/platform下面,名字要根据刚加载的模块生成的
最后的效果如图
首先安装需要的程序:
sudo apt-get install lm-sensors conky
配置sensors:
sudo sensors-detect
一路回车,在最后显示出来需要加载的模块,比如我的:To load everything that is needed, add this to /etc/modules:
#----cut here----
# Chip drivers
f71805f
k8temp
#----cut here----
Do you want to add these lines automatically? (yes/NO)
这里要注意,如果想要每次启动自动加载驱动模块的话就要回答 yes,而默认的是no
手动加载这检测到的驱动模块:
sudo modprobe f71805f
sudo modprobe k8temp
运行sensors看看结果:$ sensors
k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp: +30.0°C
f71872f-isa-0290
Adapter: ISA adapter
in0: +3.36 V (min = +0.00 V, max = +4.03 V)
in1: +0.98 V (min = +0.00 V, max = +2.02 V)
in2: +1.26 V (min = +0.00 V, max = +2.02 V)
in3: +0.95 V (min = +0.00 V, max = +2.02 V)
in5: +1.10 V (min = +0.00 V, max = +2.02 V)
in6: +1.55 V (min = +0.00 V, max = +2.02 V)
in7: +1.42 V (min = +0.00 V, max = +0.00 V) ALARM
in9: +3.36 V (min = +0.00 V, max = +4.03 V)
in10: +3.10 V (min = +0.00 V, max = +4.03 V)
fan1: 2311 RPM (min = 0 RPM)
fan2: 0 RPM (min = 0 RPM)
fan3: 0 RPM (min = 0 RPM)
temp1: +29.0°C (high = +100.0°C, hyst = +100.0°C) sensor = thermal diode
temp2: +27.0°C (high = +255.0°C, hyst = +0.0°C) sensor = thermal diode
temp3: +96.0°C (high = +114.0°C, hyst = +24.0°C) sensor = thermistor
准备工作完成,下面就是配置conky了,安装完conky是不会自动生成配置文件的,所以要手动新建一个文件:
vi ~/.conkyrc#Conky configuration
background yes
use_xft yes
xftfont Monospace:size=9
xftalpha 0.8
out_to_console no
update_interval 2
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
stippled_borders 5
maximum_width 222
border_margin 4
border_width 1
default_color grey
default_shade_color black
default_outline_color black
alignment top_right
gap_x 10
gap_y 47
no_buffers no
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
use_spacer no
TEXT
${color white}$alignc$sysname $kernel on $machine
${color white}${exec whoami} @ $nodename $alignr Uptime: ${color white}$uptime
$color$stippled_hr
${color}Date: ${color white}${time %Y,%m,%d}${alignr}${color}Time: ${color white}${time %k:%M:%S}
$color$stippled_hr
CPU ${color FFFFFF}${alignc} ${freq dyn}MHz / ${platform f71805f.656 temp 2}°C ${alignc} MB: ${color white}${platform f71805f.656 temp 1}°C
${color}CPU:${color white} ${cpu cpu1}% ${cpubar cpu1}
${cpugraph 000000 5000a0}
${color}RAM:${color white}$memperc% $mem/$memmax $membar
${color}Swap:${color white}$swapperc% $swap/$swapmax ${swapbar}
$color$stippled_hr
${alignc}File systems
${color}/dev/sda1${color white} ${fs_used_perc /}% ${fs_used /}/${fs_size /} ${fs_bar /}
Highest CPU $alignr CPU% MEM%${color FFAA00}
${top name 1}$alignr${top cpu 1}${top mem 1}
${top name 2}$alignr${top cpu 2}${top mem 2}
${top name 3}$alignr${top cpu 3}${top mem 3}
${top name 4}$alignr${top cpu 4}${top mem 4}
${top name 5}$alignr${top cpu 5}${top mem 5}
${color}
Highest MEM $alignr CPU% MEM%${color B5FF00}
${top_mem name 1}$alignr${top_mem cpu 1}${top_mem mem 1}
${top_mem name 2}$alignr${top_mem cpu 2}${top_mem mem 2}
${top_mem name 3}$alignr${top_mem cpu 3}${top_mem mem 3}
${top_mem name 4}$alignr${top_mem cpu 4}${top_mem mem 4}
${top_mem name 5}$alignr${top_mem cpu 5}${top_mem mem 5}
${color}
$stippled_hr
NETWORK $alignr IP: ${color FFFFFF}${addr eth0}${color}
Down ${color FFFFFF}${downspeed eth0} k/s${color} $alignr Up ${color FFFFFF}${upspeed eth0} k/s${color}
${color FF8177}${downspeedgraph eth0 25,110}${color} $alignr ${color FFFFFF}${upspeedgraph eth0 25,110}${color}
Total ${color FFFFFF}${totaldown eth0}${color} $alignr Total ${color FFFFFF}${totalup eth0}
这是我从conky官网上下的一个例子修改的,要注意的是
CPU ${color FFFFFF}${alignc} ${freq dyn}MHz / ${platform f71805f.656 temp 2}°C ${alignc} MB: ${color white}${platform f71805f.656 temp 1}°C
这一行,其中的”f71805f.656“要换成你自己的实际目录中,这个目录是在/sys/devices/platform下面,名字要根据刚加载的模块生成的
最后的效果如图
![](http://p.blog.csdn.net/images/p_blog_csdn_net/hodrag/EntryImages/20081025/%E6%97%A0%E6%A0%87%E9%A2%98.jpg)
相关文章推荐
- 终于搞定了kali linux的网卡驱动问题
- 额...汉。。终于搞定了输入法。。。
- tomcat的Context配置今天终于搞定Tomcat的Context了,conf/Context.xml是Tomcat公用的环境配置;
- 哈哈,郁闷了2天的问题终于搞定!
- 郁闷很久的问题终于搞定了
- 终于搞定J2ME和Funambol DS同步...(努力中)
- 忙乎了一下午,终于将我的Blog搞定了;
- 弄了一整天,终于把打印自定义纸张大小搞定了
- 今天终于把那个俄罗斯方块程序搞定.
- android 终于搞定了判断ScrollView是否滚动到底部!
- usb wifi移植终于搞定了
- 如何正确安装mySQL,本人折腾一天终于搞定,分享给大家
- 郁闷了大半天,终于搞定了,把用户输入的内容转换成XML格式信息,在内存中创建XmlDocument
- 今天终于搞定asm 数据全部丢失的恢复了
- 今天终于搞定了安装项目中的自定义操作,庆祝一下!
- 链式二叉树后序遍历的非递归形式,终于搞定了
- MFC 数据库绑定操作 提示无效的参数类型错误,搞死了。。。。终于搞定了
- 终于搞定无参“动态调用WebService方法”,其实很简单,大家还是要有信心,还是要有琢磨的精神。
- Tiny6410 JTAG调试终于搞定
- Linux终于搞定Windows 8的UEFI安全启动