Chinaunix首页 | 论坛 | 博客
  • 博客访问: 126312
  • 博文数量: 22
  • 博客积分: 948
  • 博客等级: 准尉
  • 技术积分: 225
  • 用 户 组: 普通用户
  • 注册时间: 2008-05-08 15:50
文章分类

全部博文(22)

文章存档

2015年(1)

2013年(1)

2010年(1)

2009年(19)

我的朋友

分类: LINUX

2009-05-16 16:49:21

 linux系统监控工具Conky对系统
安装conky后,将下面的代码保存到~/.conkyrc即可

alignment top_right
background no
border_margin 2
border_width 1
cpu_avg_samples 2
top_cpu_separate false
default_color white
default_outline_color white
default_shade_color white
double_buffer yes
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
use_xft yes
xftfont DejaVu Sans Mono:size=11
#gap_x 5
gap_y 30
max_port_monitor_connections 5
maximum_width 308
minimum_size 5 5
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
own_window yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
stippled_borders 0
update_interval 2.0
uppercase no
use_spacer none
show_graph_scale no
show_graph_range no

TEXT
 $nodename $sysname $kernel on $machine
$hr
${color grey}Uptime:$color $uptime
${color grey}Battery: $color $battery_percent% $battery_bar
${color grey}CPU State: $color${freq cpu0}MHz $acpitemp°C(T)
${color grey}Buffers/Cached:$color $buffers/$cached
${color grey}Mem State:$color $memperc% ${membar}
${color grey}Swap Usage:$color ${swap}/$swapmax $swapperc% ${swapbar}
${color grey}Processes:$color $processes  ${color grey}Running:$color $running_processes
$hr
${color grey}CPU Usage ${color}Num1: ${cpu cpu0}%   Num2: ${cpu cpu1}%
 $color ${cpugraph cpu0 25,142 0AF031 0AF031} ${cpugraph cpu1 25,142 ff0000 0000ff}
${color grey}Mem Usage :${color} $mem/$memmax
 $color ${memgraph 1EDF57 1EDF57}
${color grey}Disk Usage ${color}Read:${diskio_read} Write:${diskio_write}
 $color ${diskiograph_read 25,142 F0E80A F0E80A} ${diskiograph_write 25,142 E63016 E63016}
${color grey}Network Down:${color #8844Ee} ${downspeed eth0} ${color grey} ${offset}Up:${color #22ccff} ${upspeed eth0}
 $color ${downspeedgraph eth0 25,142 ff0000 0000ff} ${upspeedgraph eth0 25,142 0000ff ff0000}
$hr
${color grey}File systems:
 /     $color${fs_used /}/${fs_size /} ${fs_bar 6 /}
 /var  $color${fs_used /var}/${fs_size /var} ${fs_bar 6 /var}
 /home $color${fs_used /home}/${fs_size /home}  ${fs_bar 6 /home}
$hr
${color grey}Name              PID    CPU%   MEM%
${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${color lightgrey} ${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}



具体显示如下图:





阅读(2762) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~