当前位置: 首页 > 工具软件 > Conky > 使用案例 >

Conky

戚均
2023-12-01

1.OS: Ubuntu 8.10

2.Summary:
Conky is a free, light-weight system monitor for X, that displays any information on your desktop.
Conky is licensed under the GPL and runs on Linux and BSD.

3.Ref URL:
http://conky.sourceforge.net/index.html

4.The configuration script:

# Conky, a system monitor, based on torsmo
#
# Any original torsmo code is licensed under the BSD license
#
# All code written since the fork of torsmo is licensed under the GPL
#
# Please see COPYING for details
#
# Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
# Copyright (c) 2005-2007 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
# All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# $Id: conky.conf 1193 2008-06-21 20:37:58Z ngarofil $

# THIS CONFIG RELIES ON 2 SCRIPTS, CPUSPEED AND CPUTEMP
# YOUR SYSTEM MAY NOT REQUIRE THEM, REPLACE AS DESIRED

# boinc (seti) dir
# seti_dir /opt/seti

# Possible variables to be used:
#
#      Variable         Arguments                  Description               
#  acpiacadapter                     ACPI ac adapter state.                  
#  acpifan                           ACPI fan state                          
#  acpitemp                          ACPI temperature.                       
#  adt746xcpu                        CPU temperature from therm_adt746x      
#  adt746xfan                        Fan speed from therm_adt746x            
#  battery           (num)           Remaining capasity in ACPI or APM       
#                                    battery. ACPI battery number can be     
#                                    given as argument (default is BAT0).    
#  buffers                           Amount of memory buffered               
#  cached                            Amount of memory cached                 
#  color             (color)         Change drawing color to color           
#  cpu                               CPU usage in percents                   
#  cpubar            (height)        Bar that shows CPU usage, height is     
#                                    bar's height in pixels                  
#  downspeed         net             Download speed in kilobytes             
#  downspeedf        net             Download speed in kilobytes with one    
#                                    decimal                                 
#  exec              shell command   Executes a shell command and displays   
#                                    the output in torsmo. warning: this     
#                                    takes a lot more resources than other   
#                                    variables. I'd recommend coding wanted  
#                                    behaviour in C and posting a patch :-). 
#  execi             interval, shell Same as exec but with specific interval.
#                    command         Interval can't be less than             
#                                    update_interval in configuration.       
#  fs_bar            (height), (fs)  Bar that shows how much space is used on
#                                    a file system. height is the height in  
#                                    pixels. fs is any file on that file     
#                                    system.                                 
#  fs_free           (fs)            Free space on a file system available   
#                                    for users.                              
#  fs_free_perc      (fs)            Free percentage of space on a file      
#                                    system available for users.             
#  fs_size           (fs)            File system size                        
#  fs_used           (fs)            File system used space                  
#  hr                (height)        Horizontal line, height is the height in
#                                    pixels                                  
#  i2c               (dev), type, n  I2C sensor from sysfs (Linux 2.6). dev  
#                                    may be omitted if you have only one I2C 
#                                    device. type is either in (or vol)      
#                                    meaning voltage, fan meaning fan or temp
#                                    meaning temperature. n is number of the 
#                                    sensor. See /sys/bus/i2c/devices/ on    
#                                    your local computer.                    
#  kernel                            Kernel version                          
#  loadavg           (1), (2), (3)   System load average, 1 is for past 1    
#                                    minute, 2 for past 5 minutes and 3 for  
#                                    past 15 minutes.                        
#  machine                           Machine, i686 for example               
#  mails                             Mail count in mail spool. You can use   
#                                    program like fetchmail to get mails from
#                                    some server using your favourite        
#                                    protocol. See also new_mails.           
#  mem                               Amount of memory in use                 
#  membar            (height)        Bar that shows amount of memory in use  
#  memmax                            Total amount of memory                  
#  memperc                           Percentage of memory in use             
#  new_mails                         Unread mail count in mail spool.        
#  nodename                          Hostname                                
#  outlinecolor      (color)         Change outline color                    
#  pre_exec          shell command   Executes a shell command one time before
#                                    torsmo displays anything and puts output
#                                    as text.                                
#  processes                         Total processes (sleeping and running)  
#  running_processes                 Running processes (not sleeping),       
#                                    requires Linux 2.6                      
#  shadecolor        (color)         Change shading color                    
#  stippled_hr       (space),        Stippled (dashed) horizontal line       
#                    (height)       
#  swapbar           (height)        Bar that shows amount of swap in use    
#  swap                              Amount of swap in use                   
#  swapmax                           Total amount of swap                    
#  swapperc                          Percentage of swap in use               
#  sysname                           System name, Linux for example          
#  time              (format)        Local time, see man strftime to get more
#                                    information about format                
#  totaldown         net             Total download, overflows at 4 GB on    
#                                    Linux with 32-bit arch and there doesn't
#                                    seem to be a way to know how many times 
#                                    it has already done that before torsmo  
#                                    has started.                            
#  totalup           net             Total upload, this one too, may overflow
#  updates                           Number of updates (for debugging)       
#  upspeed           net             Upload speed in kilobytes               
#  upspeedf          net             Upload speed in kilobytes with one      
#                                    decimal                                 
#  uptime                            Uptime                                  
#  uptime_short                      Uptime in a shorter format              
#
#  seti_prog                         Seti@home current progress
#  seti_progbar      (height)        Seti@home current progress bar
#  seti_credit                       Seti@hoome total user credit


# maintain spacing between certain elements
use_spacer yes

# set to yes if you want conky to be forked in the background
background no

use_xft yes

# Xft font when Xft is enabled
xftfont Bitstream Vera Sans Mono-7
#xftfont Andale Mono-9
#xftfont Clean-8
xftfont cubicfive10:pixelsize=14
#xftfont squaredance10:pixelsize=14
#xftfont swf!t_v02:pixelsize=10

# Text alpha when using Xft
xftalpha 1
mail_spool $MAIL

# Update interval in seconds
update_interval 4.0

# Create own window instead of using desktop (required in nautilus)
own_window no

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
#minimum_size 280 5
minimum_size 500 20

# Draw shades?
draw_shades yes

# Draw outlines?
draw_outline no # amplifies text

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 0

# border margins
border_margin 9

# border width
#border_width 1
border_width 10

# Default colors and also border colors, grey90 == #e5e5e5
default_color grey90
default_shade_color black
default_outline_color DarkGrey

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
#gap_x 24
#gap_y 24
gap_x 35
gap_y 35

# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

# stuff after 'TEXT' will be formatted on screen

TEXT
${color white}$nodename$color ${color white}Uptime:$color $uptime ${color white}$sysname $kernel $machine $color ${color white}Battery:$color ${battery}
  
${color white}CPU PROCESSING $color
   ${color white}Processes:$color $processes  ${color white}Running:$color $running_processes
   ${color white}Frequency(GHz):$color $freq_g
   ${color white}CPU Usage:$color $cpu% ${cpubar 4}

   ${color white}NAME             PID       CPU%      MEM%
   ${color white}${top name 1} ${top pid 1}   ${top cpu 1}    ${top mem 1}
   ${color white}${top name 2} ${top pid 2}   ${top cpu 2}    ${top mem 2}
   ${color white}${top name 3} ${top pid 3}   ${top cpu 3}    ${top mem 3}
   ${color white}${top name 4} ${top pid 4}   ${top cpu 4}    ${top mem 4}
   ${color white}${top name 5} ${top pid 5}   ${top cpu 5}    ${top mem 5}
   ${color white}${top name 6} ${top pid 6}   ${top cpu 6}    ${top mem 6}
   ${color white}${top name 7} ${top pid 7}   ${top cpu 7}    ${top mem 7}
   ${color white}${top name 8} ${top pid 8}   ${top cpu 8}    ${top mem 8}
   ${color white}${top name 9} ${top pid 9}   ${top cpu 9}    ${top mem 9}
   ${color white}${top name 10} ${top pid 10}   ${top cpu 10}    ${top mem 10}

${color white}DATA$color
   ${color white}RAM Usage:$color $mem/$memmax  $memperc% ${membar 4}
   ${color white}Swap Usage:$color $swap/$swapmax  $swapperc% ${swapbar 4}
   ${color white}File systems:
   Total:$color ${fs_size} -- Free:$color ${fs_free}${fs_bar 6 /}

   ${color white}NAME             PID      CPU%      MEM%
   ${color white}${top_mem name 1}   ${top_mem pid 1}   ${top_mem cpu 1}   ${top_mem mem 1}
   ${color white}${top_mem name 2}   ${top_mem pid 2}   ${top_mem cpu 2}   ${top_mem mem 2}
   ${color white}${top_mem name 3}   ${top_mem pid 3}   ${top_mem cpu 3}   ${top_mem mem 3}
   ${color white}${top_mem name 4}   ${top_mem pid 4}   ${top_mem cpu 4}   ${top_mem mem 4}
   ${color white}${top_mem name 5}   ${top_mem pid 5}   ${top_mem cpu 5}   ${top_mem mem 5}
   ${color white}${top_mem name 6}   ${top_mem pid 6}   ${top_mem cpu 6}   ${top_mem mem 6}
   ${color white}${top_mem name 7}   ${top_mem pid 7}   ${top_mem cpu 7}   ${top_mem mem 7}
   ${color white}${top_mem name 8}   ${top_mem pid 8}   ${top_mem cpu 8}   ${top_mem mem 8}
   ${color white}${top_mem name 9}   ${top_mem pid 9}   ${top_mem cpu 9}   ${top_mem mem 9}
   ${color white}${top_mem name 10}   ${top_mem pid 10}   ${top_mem cpu 10}   ${top_mem mem 10}

${color white}Network$color
   Up:$color ${upspeed eth0} kb/s                 Down:$color ${downspeed eth0} kb/s



5.Issue:
    1st Issue: Segmentation fault
alexanderlee@lee:~$ conky
Conky: use_spacer should have an argument of left, right, or none.  'yes' seems to be some form of 'true', so defaulting to right.
Conky: desktop window (14000a8) is subwindow of root window (1a6)
Conky: drawing to desktop window
Conky: drawing to double buffer
Segmentation fault
alexanderlee@lee:~$

 类似资料:

相关阅读

相关文章

相关问答