Conky

Conky jest to dość lekki monitor systemu, dzięki któremu na pulpicie bądź panelu możemy wyświetlić informacje o stanie i zasobach naszego komputera.
W tej chwili w repozytorium debiana mamy cztery dostępne pakiety:
conky – pakiet przejściowy,
conky-cli – pakiet podstawowy,
conky-std – pakiet standardowy, posiadający większe wsparcie niż conky-cli,
conky-all – pakiet zawierający pełne wsparcie.
Polecam na początek conky-std.
Conky instalujemy standardowo, wpisując kod:
apt-get install conky-std
lub
aptitude install conky-std
po wcześniejszym zaktualizowaniu repozytorium kodem:
apt-get update bądź aptitude update
Następnie tworzymy plik o nazwie '.conkyrc' w swoim katalogu użytkownika:
/home/nazwa_użytkownika/.conkyrc
poprzez wpisanie w konsole kodu:
touch ~/.conkyrc
i otwieramy go za pomocą edytora tekstu (nano, vim lub gedit) by przekopiować któreś z poniższych plików konfiguracyjnych. Możemy także skorzystać z pomysłów innych użytkowników podanych na różnych stronach internetowych (trzeba trochę „pogooglować”).
Jeżeli nie mieści nam się Conky na ekranie monitora możemy utworzyć dodatkowe pliki nazywając je np. '.conkyrc2', '.conkyrc3' itd. i w nich umieszczać kolejne interesujące nas parametry, które chcielibyśmy oglądać na pulpicie.
Przykłady trzech różnych konfiguracji ułożonych na pulpicie w kolumnach podaje poniżej.
Teraz czas by Conky startował w systemie. W Openboksie w pliku autostart.sh (zob. artykuł na temat Openbox) dodajemy na końcu:
conky -d -c ~/.conkyrc &
Jeżeli mamy kilka plików z konfiguracja Conky dodajemy:
sleep 12 && conky -d -c ~/.conkyrc &
sleep 14 && conky -d -c ~/.conkyrc2 &
sleep 16 && conky -d -c ~/.conkyrc3 &
gdzie sleep 12 informuje za ile sekund od uruchomienia systemu odpali nasz Conky (wtedy lepiej jest ustawić odrębny czas na poszczególne Conky, bo program będzie startował wiele razy w zależności od ilości plików konfiguracyjnych).

Na zrzucie Conky razy trzy na Openboksie. Tapeta zamontowana za pomocą Nitrogena.


Na tym zrzucie widoczna lista z aktualizacjami.



Tu na zrzucie widoczne aktualizacje i zamontowane dyski.

Ustawienia .conkyrc

# conky configuration
background yes
use_xft yes
xftfont DejaVu Sans Mono:size=11
#xftalpha 0.8
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 5 5
draw_shades no
draw_outline no
draw_borders no
stippled_borders 4
border_width 1
default_color white
default_shade_color white
default_outline_color white
alignment top_left
gap_x 5
gap_y 5
no_buffers no
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
use_spacer none
hddtemp_port 7634
hddtemp_host 127.0.0.1
temperature_unit Celsius
#top_cpu_separate true
update_interval_on_battery yes
show_graph_scale no
show_graph_range no
#imap -p 993


TEXT
${color red}$hr
${color green}Desktop: $desktop $alignr ${color red}Uptime:$color $uptime
${color red}$hr
${color red}RAM:$color ${memperc}% ${memgauge} $membar
${color}$memgraph 25,200 000000 ff0000
${color red}Total: ${color}$memmax ${color red}Used: ${color}$mem ${color red}Free: ${color}$memfree
${color red}Buffers: ${color}$buffers ${color red}Cached: ${color}$cached
${color red}$hr
${color red}CPU:$color ${cpu}% ${cpugauge} $cpubar
${color}$cpugraph 25,200
${color red}Frequency:$color ${freq_g}GHz ${color red}Load:$color $loadavg
${color red}Processes:$color $processes  ${color red}Running:$color $running_processes
${color red}Name:             PID   CPU%   MEM%
${color yellow} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color yellow} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color yellow} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color yellow} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${color yellow} ${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}
${color yellow} ${top name 6} ${top pid 6} ${top cpu 6} ${top mem 6}
${color yellow} ${top name 7} ${top pid 7} ${top cpu 7} ${top mem 7}
${color yellow} ${top name 8} ${top pid 8} ${top cpu 8} ${top mem 8}
${color yellow} ${top name 9} ${top pid 9} ${top cpu 9} ${top mem 9}
${color red}$hr
${color red}${exec sensors | grep 'Adapter\|temp1\|Core0 Temp\|Core0 Temp\|Core1 Temp\|Core1 Temp' | cut -c 1-50}
${color red}$hr
${color red}Batt$color = ${battery BAT1} ${battery_short BAT1}${color red} $alignr Time: ${color}${battery_time BAT1}
${battery_percent BAT1}% ${battery_bar BAT1}
${color red}$hr
${color red}Mixer:$color $mixer $alignr ${color red}Terms: ${color}$user_terms
${color red}$hr

Ustawienia .conkyrc2

# conky configuration
background yes
use_xft yes
xftfont DejaVu Sans Mono:size=11
#xftalpha 0.8
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 5 5
draw_shades no
draw_outline no
draw_borders no
stippled_borders 4
border_width 1
default_color white
default_shade_color white
default_outline_color white
alignment top_middle
gap_x 5
gap_y 5
no_buffers no
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
use_spacer none


TEXT
${color red}$hr
${color green} ${scroll 50 trust on $nodename sid unstable - $sysname $kernel on $machine}
${color red}$hr
${color}${time %e-%m-%G} ${time %a} $alignr ${time %H:%M:%S}
${color red}$hr
${color yellow}Pack: $alignr${execi 600 cat /var/log/upgrades.log}
${color red}$hr
${color red}Media:
${color red}${if_mounted /media/red}red: ${fs_size /media/red} ${fs_used /media/red} ${fs_free /media/red} ${fs_type /media/red}
${fs_bar /media/red} ${endif}
${color yellow}${if_mounted /media/yellow}yellow: ${fs_size /media/yellow} ${fs_used /media/yellow} ${fs_free /media/yellow} ${fs_type /media/yellow}
${fs_bar /media/yellow} ${endif}
${color blue}${if_mounted /media/ardata}ardata: ${fs_size /media/ardata} ${fs_used /media/ardata} ${fs_free /media/ardata} ${fs_type /media/ardata}
${fs_bar /media/ardata} ${endif}
${color green}${if_mounted /media/mini}mini: ${fs_size /media/mini} ${fs_used /media/mini} ${fs_free /media/mini} ${fs_type /media/mini}
${fs_bar /media/mini} ${endif}
${color white}${if_mounted /media/kingston}kingston: ${fs_size /media/kingston} ${fs_used /media/kingston} ${fs_free /media/kingston} ${fs_type /media/kingston}
${fs_bar /media/kingston} ${endif}
${color pink}${if_mounted /media/karta}karta: ${fs_size /media/karta} ${fs_used /media/karta} ${fs_free /media/karta} ${fs_type /media/karta}
${fs_bar /media/karta} ${endif}

Ustawienia .conkyrc3

# conky configuration
background yes
use_xft yes
xftfont DejaVu Sans Mono:size=11
#xftalpha 0.8
update_interval 1,0
total_run_times 0
own_window yes
own_window_transparent yes
#own_window_type override
#own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 5 5
draw_shades no
draw_outline no
draw_borders no
stippled_borders 4
border_width 1
default_color white
default_shade_color white
default_outline_color white
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right
gap_x 5
gap_y 5
no_buffers no
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
use_spacer none

TEXT
${color red}$hr
${color red}IP (eth0):$color ${addr eth0}
${color red}Up:$color ${upspeed eth0} $alignr ${color red}Down:$color ${downspeed eth0}
${color red}Total up:$color ${totalup eth0} $alignr ${color red}Total down:$color ${totaldown eth0}
${upspeedgraph eth0 25,200 000000 ff0000} $alignr ${downspeedgraph eth0 25,200 000000 ff0000} $alignr
${color red}IP (wlan0):$color ${addr wlan0}
${color red}Up:$color ${upspeed wlan0} $alignr ${color red}Down:$color ${downspeed wlan0}
${color red}Total up:$color ${totalup wlan0} $alignr ${color red}Total down:$color ${totaldown wlan0}
${upspeedgraph wlan0 25,200 000000 ff0000} $alignr ${downspeedgraph wlan0 25,200 000000 ff0000} $alignr
${color red}Signal: $color${wireless_link_qual_perc wlan0}% $alignr ${color red}Speed: $color${wireless_bitrate wlan0}
${color red}Mode: $color${wireless_mode wlan0} $alignr ${color red}AP: $color${wireless_ap wlan0}
${color red}Essid: $color${wireless_essid wlan0} ${wireless_link_bar wlan0} $alignr
${color red}Port(s): $alignr Inbound: ${color}${tcp_portmon 1 32767 count} ${color red} Outbound: ${color}${tcp_portmon 32768 61000 count} ${color red}ALL: ${color}${tcp_portmon 1 65535 count}
${color red}Inbound Connection ${alignr} Local Service/Port
${color yellow} ${tcp_portmon 1 32767 rhost 0} ${alignr} ${tcp_portmon 1 32767 lservice 0}
${color yellow} ${tcp_portmon 1 32767 rhost 1} ${alignr} ${tcp_portmon 1 32767 lservice 1}
${color yellow} ${tcp_portmon 1 32767 rhost 2} ${alignr} ${tcp_portmon 1 32767 lservice 2}
${color yellow} ${tcp_portmon 1 32767 rhost 3} ${alignr} ${tcp_portmon 1 32767 lservice 3}
${color yellow} ${tcp_portmon 1 32767 rhost 4} ${alignr} ${tcp_portmon 1 32767 lservice 4}
${color red}Outbound Connection ${alignr} Remote Service/Port
${color yellow} ${tcp_portmon 32768 61000 rhost 0} ${alignr} ${tcp_portmon 32768 61000 rservice 0}
${color yellow} ${tcp_portmon 32768 61000 rhost 1} ${alignr} ${tcp_portmon 32768 61000 rservice 1}
${color yellow} ${tcp_portmon 32768 61000 rhost 2} ${alignr} ${tcp_portmon 32768 61000 rservice 2}
${color yellow} ${tcp_portmon 32768 61000 rhost 3} ${alignr} ${tcp_portmon 32768 61000 rservice 3}
${color yellow} ${tcp_portmon 32768 61000 rhost 4} ${alignr} ${tcp_portmon 32768 61000 rservice 4}
${color red}$hr
${color red}File system: $alignr ${color}${diskio sda} ${color red}HD:$color ${hddtemp /dev/sda}°C
${color red}/:${fs_size /}/${fs_used /}/${fs_free /}/
${color red}/usr:${fs_size /usr}/${fs_used /usr}/${fs_free /usr}/
${color red}/var:${fs_size /var}/${fs_used /var}/${fs_free /var}/
${color red}/tmp:${fs_size /tmp}/${fs_used /tmp}/${fs_free /tmp}/
${color red}/home:${fs_size /home}/${fs_used /home}/${fs_free /home}/
${color}$fs_used_perc% $fs_bar $alignr
${color red}$diskiograph 25,200 $alignr
${color}$diskio_read $alignr $diskio_write
${color}${diskiograph_read 25,200 000000 ff0000} $alignr ${diskiograph_write 25,200 000000 ff0000} $alignr
${color red}$hr

 

Brak komentarzy:

Publikowanie komentarza