Portál AbcLinuxu, 30. dubna 2025 15:24
Po dlhej dobe som sa rozhodol napísať o panely conky znovu. Za čas od posledného blogu na tému conky ubehlo mnoho času.
V tomto blogovom zápise popíšem zmeny panelu conky a dôvody zmien.
/proc
a parametrom hidepid > 0
. Z toho vyplýva, že ak bude conky spustené s UID >
bude počet procesov zodpovedať počtu procesov spustených pod daným UID.
V tomto prípade je k dispozícii šesť stupňov. Minimálna je 1400 MHz a maximálna pri využití všetkých jadier je 3500 MHz. Boost frekvencia je 3800 MHz.
Zmena farby z zelenej na žltú je pri záťaži viac ako 60%. Oranžová a červena pri záťaži 80% a 90%. Ukazatel celkovej záťaže má iné nastavenie. Pri záťaži viac ako 50% je farba žltá, pri 60% oranžová a pri 75% červená.
V tomto prípade je prechod na žltú farbu pri 70%, oranžovú 80% a červená 90%.
Zistiť stavy Px je jednoduché stačí si pozrieť súbor /sys/devices/system/cpu/cpufreq/policy/scaling_available_frequencies
. Samozrejme to nemusí platiť pre všetky cpu a linuxové jadra.
alignment bottom_right background yes border_width 1 default_color white default_outline_color white default_shade_color white draw_borders no draw_graph_borders yes draw_outline no draw_shades no #diskio_avg_samples 2 use_xft no gap_x 10 gap_y 36 minimum_size 5 5 out_to_console no out_to_x yes out_to_ncurses no out_to_stderr no extra_newline no own_window yes own_window_type desktop own_window_class panel_1 own_window_type panel stippled_borders 0 update_interval 1 uppercase no use_spacer none show_graph_scale no show_graph_range no double_buffer short_units TEXT ${color grey}Uptime:$color $uptime_short ${color grey}Hostname:$color $nodename $hr ${color grey}Procesy ${color grey}Celkom: ${color} $processes \ ${color grey}Beziace: ${color} $running_processes ${color grey}Zataz: ${loadavg} $hr ${color}\ ${color grey}Frekvencia: ${if_match ${freq} <= 1400}${color grey}${freq}$else${if_match ${freq} <= 1900}${color white}${freq}$else${if_match ${freq} <= 2400}${color green}${freq}$else${if_match ${freq} <= 2900}${color yellow}${freq}$else${if_match ${freq} <= 3200}${color orange}${freq}$else${if_match ${freq} <= 3500}${color red}${freq}$else${color red}${freq}$endif$endif$endif$endif$endif$endif\ ${if_match ${freq} >= 3500}${color} BOOST$endif ${color grey}P state:$color${if_match ${freq} <= 1400 }${color gray}P5$else${if_match ${freq} <= 1900}${color white}P4$else${if_match ${freq} <= 2400}${color green}P3$else${if_match ${freq} <= 2900}${color yellow}P2$else${if_match ${freq} <= 3200}${color orange}P1$else${if_match ${freq} <= 3500}${color red}P0$else${color red}P0$endif$endif$endif$endif$endif$endif ${color}\ ${if_match ${cpu cpu1} <=60}${color green}CPU1:${cpubar cpu1 5,100}$else${if_match ${cpu cpu1} < 80}${color yellow}CPU1:${cpubar cpu1 5,100}$else${if_match ${cpu cpu1} < 90}${color orange}CPU1:${cpubar cpu1 5,100}$else${color red}CPU1:${cpubar cpu1 5,100}$endif$endif$endif ${if_match ${cpu cpu1} == 0}${color}I$else${if_match ${cpu cpu1} <=60}${color green}L$else${if_match ${cpu cpu1} < 80}${color yellow}M$else${color red}H$endif$endif$endif ${if_match ${cpu cpu2} <=60}${color green}CPU2:${cpubar cpu2 5,100}$else${if_match ${cpu cpu2} < 80}${color yellow}CPU2:${cpubar cpu2 5,100}$else${if_match ${cpu cpu2} < 90}${color orange}CPU2:${cpubar cpu2 5,100}$else${color red}CPU2:${cpubar cpu2 5,100}$endif$endif$endif ${if_match ${cpu cpu2} == 0}${color}I$else${if_match ${cpu cpu2} <=60}${color green}L$else${if_match ${cpu cpu2} < 80}${color yellow}M$else${color red}H$endif$endif$endif ${if_match ${cpu cpu3} <=60}${color green}CPU3:${cpubar cpu3 5,100}$else${if_match ${cpu cpu3} < 80}${color yellow}CPU3:${cpubar cpu3 5,100}$else${if_match ${cpu cpu3} < 90}${color orange}CPU3:${cpubar cpu3 5,100}$else${color red}CPU3:${cpubar cpu3 5,100}$endif$endif$endif ${if_match ${cpu cpu3} == 0}${color}I$else${if_match ${cpu cpu3} <=60}${color green}L$else${if_match ${cpu cpu3} < 80}${color yellow}M$else${color red}H$endif$endif$endif ${if_match ${cpu cpu4} <=60}${color green}CPU4:${cpubar cpu4 5,100}$else${if_match ${cpu cpu4} < 80}${color yellow}CPU4:${cpubar cpu4 5,100}$else${if_match ${cpu cpu4} < 90}${color orange}CPU4:${cpubar cpu4 5,100}$else${color red}CPU4:${cpubar cpu4 5,100}$endif$endif$endif ${if_match ${cpu cpu4} == 0}${color}I$else${if_match ${cpu cpu4} <=60}${color green}L$else${if_match ${cpu cpu4} < 80}${color yellow}M$else${color red}H$endif$endif$endif ${if_match ${cpu} < 50}${color green}TOTAL USAGE ${cpu}%$else${if_match ${cpu} < 60}${color yellow}TOTAL USAGE ${cpu}%$else${if_match ${cpu} < 75}${color orange}TOTAL USAGE ${cpu}%$else${if_match ${cpu} < 80}${color orange}TOTAL USAGE ${cpu}%$else${color red}TOTAL USAGE ${cpu}%$endif$endif$endif$endif ${if_match ${cpu} < 10}${color}IDLE$else${if_match ${cpu} < 50}${color green}LOW$else${if_match ${cpu} < 60}${color yellow}MEDIUM$else${if_match ${cpu} < 80}${color orange}MEDHIGH$else${color red}${blink HIGH}$endif$endif$endif$endif ${color}\ $hr ${if_match $memperc <= 70}${color grey}RAM: ${color}$memmax$else${if_match $memperc < 80}${color grey}RAM: ${color yellow}$memmax$else${if_match $memperc < 90}${color orange}RAM: $memmax$else${color red}RAM :$memmax$endif$endif$endif ${color grey}Pouzita: ${if_match $memperc <= 70}${color green}$mem - $memperc%$else${if_match $memperc < 80}${color yellow}$mem - $memperc%$else${if_match $memperc < 90}${color orange}$mem - $memperc%$else${color red}$mem - $memperc%$endif$endif$endif ${color grey}Volna:$color $memfree ${color grey}Buffers:$color $buffers ${color grey}Cached:$color $cached ${color grey}RAM: ${if_match $memperc <= 70}${color green}${membar 5,100}$else${if_match $memperc < 80}${color yellow}${membar 5,100}$else${if_match $memperc < 90}${color orange}${membar 5,100}$else${color red}${membar 5,100}$endif$endif$endif ${if_match $memperc <= 70}${color}$else${if_match $memperc < 80}${color yellow}RAM usage Warning$else${if_match $memperc < 90}${color orange}RAM usage MEDIUM HIGH$else${color red}${blink RAM usage HIGH}$endif$endif$endif ${color}\ $hr ${color grey}I/O: ${if_match "${diskio_read}" == "0B"}${color grey}Read:$else${color grey}Read:$color${diskio_read}$endif ${if_match "${diskio_write}" == "0B"}${color grey}Write:$else${color grey}Write:$color${diskio_write}$endif ${color }\ $hr ${color grey}Filesystem: ${if_mounted /}${fs_size /} ${color grey}${if_match ${fs_used_perc /} < 75 }${color green}${fs_free /}$else${if_match ${fs_used_perc /} < 90 }$color${color yellow}${fs_free /}$else${color red}${fs_free /}$endif$endif${color grey} /$endif ${if_mounted /home}${fs_size /home} ${color grey}${if_match ${fs_used_perc /home} < 75 }${color green}${fs_free /home}$else${if_match ${fs_used_perc /home} < 90 }$color${color yellow}${fs_free /home}$else${color red}${fs_free /home}$endif$endif${color grey} /home$endif ${if_mounted /var}${fs_size /var} ${color grey}${if_match ${fs_used_perc /var} < 75 }${color green}${fs_free /var}$else${if_match ${fs_used_perc /var} < 90 }$color${color yellow}${fs_free /var}$else${color red}${fs_free /var}$endif$endif${color grey} /var$endif ${if_mounted /usr}${fs_size /usr} ${color grey}${if_match ${fs_used_perc /usr} < 75 }${color green}${fs_free /usr}$else${if_match ${fs_used_perc /usr} < 90 }$color${color yellow}${fs_free /usr}$else${color red}${fs_free /usr}$endif$endif${color grey} /usr$endif #${if_mounted /usr/src}${fs_size /usr/src} ${color grey}${if_match ${fs_used_perc /usr/src} < 75 }${color green}${fs_free /usr/src}$else${if_match ${fs_used_perc /usr/src} < 90 }$color${color yellow}${fs_free /usr/src}$else${color red}${fs_free /usr/src}$endif$endif${color grey} /usr/src$endif ${if_mounted /opt}${fs_size /opt} ${color grey}${if_match ${fs_used_perc /opt} < 75 }${color green}${fs_free /opt}$else${if_match ${fs_used_perc /opt} < 90 }$color${color yellow}${fs_free /opt}$else${color red}${fs_free /opt}$endif$endif${color grey} /opt$endif $color\ $hr ${color grey}Networking: ${if_up enp5s0}${if_match "${upspeed enp5s0}" == "0B"}${color grey}Up:$else${color grey}Up:$color${upspeed enp5s0}$endif ${if_match "${downspeed enp5s0}" == "0B"}${color grey}Down:$else${color grey}Down:$color${downspeed enp5s0}$endif$endif\ $color
Napriek redukcii informácii z dôvodu nedostupnosti parametrov z jadra panel dobre indikuje rôzne stavy a je dobrý zdroj informácii o stave systému. Umožňuje rýchle zistenie potrebných paramtrov. Z toho vyplýva, že aj v prípade užívateľa bez príkazového riadku môže bez otvárania nástrojov neustále mať na očiach stav systému
Nevýhoda je že tento panel trochu narušuje tok ikon na ploche.
EDIT :
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.