用conky监视你的系统

刚刚安装了conky,效果不错,分享一下。

安装方法:

1,安装conky和mpd,命令sudo apt-get install conky mpd

2,在用户家目录下新建文件名为.conkyrc的空文件,将以下代码复制进去,并保存即可启动conky

3,自启动在“系统-首选项-启动程序”中添加

use_spacer right
use_xft yes
font WenQuanYi Bitmap Song:size=8
xftfont WenQuanYi Bitmap Song:size=8
override_utf8_locale yes
update_interval 1.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
minimum_size 206 5
maximum_width 400
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders no
default_color ffffff
default_shade_color 000000
default_outline_color 000000
alignment top_right
gap_x 5
gap_y 30
cpu_avg_samples 2
uppercase no # set to yes if you want all text to be in uppercase

TEXT
${font WenQuanYi Bitmap Song:style=Bold:pixelsize=30}${alignc}${time %H:%M:%S}
${font WenQuanYi Bitmap Song:pixelsize=18}${alignc}${time %G年%b%d日 星期%a}${font WenQuanYi Bitmap Song:pixelsize=12}
${color #ffd700}${hr 1}$color
${color #98c2c7}主机名:${color #db7093} $alignr$nodename
${color #98c2c7}内核: ${color #db7093}$alignr$kernel
${color #98c2c7}已运行时间: ${color #db7093}$alignr$uptime
${color #98c2c7}CPU使用率: ${color #db7093} $alignr$cpu%
${color #78af78}$cpubar
${color #98c2c7}进程总数:$alignr${color }$processes ($running_processes 个运行中)
${color #98c2c7}CPU 最高占用:$alignr PID CPU%
${color #ddaa00} ${top name 1}$alignr ${top pid 1}${top cpu 1}
${color lightgrey} ${top name 2}$alignr ${top pid 2}${top cpu 2}
${color lightgrey} ${top name 3} $alignr${top pid 3}${top cpu 3}
${color #98c2c7}总内存:${color #4169e1}$alignr ${color}$mem ${color #98c2c7}已用/总${color}$memmax${color #4169e1}${color #db7093}$memperc%
${color #78af78}${membar}
${color #98c2c7}SWAP:${color} $alignr ${color}$swap${color #98c2c7}已用/总${color}$swapmax${color #4169e1}${color #db7093}$swapperc%
${color #78af78}${fs_bar 4 /dev/sda1}
${color #98c2c7}内存最高占用:$alignr PID MEM%
${color #ddaa00}${top_mem name 1}$alignr${top_mem pid 1}${top_mem mem 1}
${color}${top_mem name 2}$alignr${top_mem pid 2}${top_mem mem 2}
${color}${top_mem name 3}$alignr${top_mem pid 3}${top_mem mem 3}
${color #98c2c7}网络 $alignr ${color #98c2c7}IP地址: ${color DDAA00}${addr ppp0}${color}
${voffset 1}${color #98c2c7}ppp0(上行):${color #db7093} ${upspeed ppp0} k/s ${alignr}${color #98c2c7}全部发送: ${color #db7093}${totalup ppp0}
${upspeedgraph ppp0 20,160 dcff82 ffffff}
${voffset 1}${color #98c2c7}ppp0(下行):${color #ddaa00} ${downspeed ppp0} k/s ${alignr}${color #98c2c7}全部接收:${color #ddaa00}${totaldown ppp0}
${downspeedgraph ppp0 20,160 dcff82 ffffff}
${color #98c2c7}根分区: ${color}${alignr}${fs_free /} 可用/总 ${fs_size /}
${color #78af78}${fs_bar 4 /}
${color #98c2c7}Home分区: ${color}${alignr}${fs_free /home} 可用/总 ${fs_size /home}
${color #78af78}${fs_bar 4 /home}

${color #ffd700}${hr 1}$color

在 Conky 网站上提供了大量的配置文件示例可以参考.

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据