Ubuntu 20.04 rendszer monitor és a Conky widgetek

Ubuntu 20.04 System Monitoring with Conky widgets

  • hálózati kártya nevét (enp0s3) valószínű módosítani kell
  • ha nincs nvidia kártya és gyári nvidia meghajtó akkor érdemes törölni
  • lemezek nevét, csatolást is ellenőrizni kell, értelemszerűen módosítandó
  • ha nincs ipv6 akkor azt is érdemes törölni
  • az üres sorok is alakítják megjelenítést
  • CPU hőmérséket megjalanítése igényli a lm-sensors csomagot (apt install lm-sensors)

 

conky.config = {

  update_interval = 1,
  cpu_avg_samples = 2,
  net_avg_samples = 2,
  out_to_console = false,
  override_utf8_locale = true,
  double_buffer = true,
  no_buffers = true,
  text_buffer_size = 32768,
  imlib_cache_size = 0,
  own_window = true,
  own_window_type = 'normal',
  own_window_argb_visual = true,
  own_window_argb_value = 80,
  own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
  border_inner_margin = 6,
  border_outer_margin = 6,
  xinerama_head = 1,
  alignment = 'bottom_right',
  gap_x = 14,
  gap_y = 46,
  draw_shades = false,
  draw_outline = false,
  draw_borders = false,
  draw_graph_borders = true,
  use_xft = true,
  font = 'Ubuntu:size=13',
  xftalpha = 0.8,
  uppercase = false,
  default_color = 'FloralWhite',
  own_window_colour = '#000000',
  minimum_width = 280, minimum_height = 800,
  alignment = 'top_right',
};

conky.text = [[

${voffset -16}${font sans-serif:bold:size=22}${alignc}${time %H:%M}${font}
${voffset 4}${alignc}${time %Y. %B %d.}
${voffset 4}${alignc}${time %A}
${font sans-serif:normal:size=10}
${color CC9900}Rendszer ${hr 2}$color
${font sans-serif:normal:size=10}$sysname $kernel $alignr $machine
Host:$alignr$nodename
Uptime:$alignr$uptime
File System: $alignr${fs_type}
Processes: $alignr ${execi 1000 ps aux | wc -l}
#${alignr}${offset -6}< ${execi 560 dnf -q check-update | sed '/^$/d' | wc -l | tail} > updates
#${font sans-serif:normal:size=9}Fedoraproject status: $alignr ${execpi 10 ./pingtest.sh fedoraproject.org}
#${font sans-serif:normal:size=9}Flathub status: $alignr ${execpi 14 ./pingtest.sh dl.flathub.org}
#${font sans-serif:normal:size=9}RPM Fusion status: $alignr ${execpi 18 ./pingtest.sh rpmfusion.org}
#Updates: $alignr ${execi 3600 dnf -q check-update | sed '/^$/d' | wc -l | tail}

${color CC9900}Videó ${hr 2}$color
GPU: ${exec nvidia-smi --query-gpu=gpu_name --format=csv,noheader,nounits}
GPU Utilization: ${exec nvidia-smi | grep % | cut -c 71-77}
#GPU Utilization: ${exec nvidia-settings -query [gpu:0]/GPUUtilization -t} %
#VRAM Utilization: ${exec nvidia-smi | grep % | cut -c 48-54} 
Memory: ${exec nvidia-settings -query [gpu:0]/UsedDedicatedGPUMemory -t} MB
GPU Temperature: ${exec nvidia-settings -query [gpu:0]/GPUCoreTemp -t} °C
#GPU Temperature: ${exec nvidia-smi | grep % | cut -c 9-13}
GPU Power Draw: ${exec nvidia-smi | grep % | cut -c 33-42}

${color CC9900}CPU ${hr 2}$color
${font sans-serif:normal:size=10}${execi 10000 grep model /proc/cpuinfo | cut -d : -f2 | tail -1 | sed 's/\s//'}
${font sans-serif:normal:size=10}${cpugraph cpu1 cpu2 cpu3 cpu4}
CPU: ${cpu cpu1}% ${cpubar cpu1}
CPU: ${cpu cpu2}% ${cpubar cpu2}
CPU: ${cpu cpu3}% ${cpubar cpu3}
CPU: ${cpu cpu4}% ${cpubar cpu4}
Sensors CPU: ${exec sensors | grep 'Package id' | awk '{print $4}'}

${color CC9900}Memória ${hr 2}$color
${font sans-serif:normal:size=10}RAM $alignc $mem / $memmax $alignr $memperc%
$membar
SWAP $alignc ${swap} / ${swapmax} $alignr ${swapperc}%
${swapbar}

${color CC9900}Lemezek ${hr 2}$color
${font sans-serif:normal:size=10}sdc $alignc ${fs_used /} / ${fs_size /} $alignr ${fs_used_perc /}%
${fs_bar /}
#${font sans-serif:normal:size=9}sdb $alignc ${fs_used /mnt/sdb1} / ${fs_size /mnt/sdb1} $alignr ${fs_used_perc /mnt/sdb1}%
#${fs_bar /mnt/sdb1}
#${font sans-serif:normal:size=9}Olvasás sdb:${goto 120} ${diskio_read /dev/sdb}
#${diskiograph_read /dev/sdb}
#${font sans-serif:normal:size=9}Írás sdb: ${goto 120} ${diskio_write /dev/sdb}
#${diskiograph_write /dev/sdb}
#${font sans-serif:normal:size=9}olvasás sdc:${goto 120} ${diskio_read /dev/sdc}
#${diskiograph_read /dev/sdc}
#${font sans-serif:normal:size=9}írás sdc: ${goto 120} ${diskio_write /dev/sdc}
#${diskiograph_write /dev/sdc}
#${font sans-serif:normal:size=9}data-hdd $alignc ${fs_used /mnt/0587D9437D6EBBAA} / ${fs_size /mnt/0587D9437D6EBBAA} $alignr ${fs_used_perc /mnt/0587D9437D6EBBAA}%
#${fs_bar /mnt/0587D9437D6EBBAA}
#${font sans-serif:normal:size=9}data-ssd $alignc ${fs_used /mnt/ata-CT960BX500SSD1_1936E198DED5-part2} / ${fs_size /mnt/ata-CT960BX500SSD1_1936E198DED5-part2} $alignr ${fs_used_perc /mnt/ata-CT960BX500SSD1_1936E198DED5-part2}%
#${fs_bar /mnt/ata-CT960BX500SSD1_1936E198DED5-part2}

${color CC9900}Hálózat ${hr 2}$color
${font sans-serif:normal:size=10}Local IPs:${alignr}External IP:
${execi 600 ip a | grep inet | grep -vw lo | grep -v inet6 | cut -d \/ -f1 | sed 's/[^0-9\.]*//g'}
${alignr}${execi 600 curl  https://ipinfo.io/ip}
${alignr}${execi 600 wget -q -O- http://ipecho.net/plain; echo}
#${execi 1000 dig +short -6 myip.opendns.com aaaa @resolver1.ipv6-sandbox.opendns.com}
#${execi 1000 dig @ns1.google.com TXT o-o.myaddr.l.google.com +short -6}

${color CC9900}Folyamatok ${hr 2}$color
${font sans-serif:normal:size=10}Name $alignr  CPU%   MEM%${font sans-serif:normal:size=9}
${top name 1} $alignr ${top cpu 1}% ${top mem 1}%
${top name 2} $alignr ${top cpu 2}% ${top mem 2}%
${top name 3} $alignr ${top cpu 3}% ${top mem 3}%
${top name 4} $alignr ${top cpu 4}% ${top mem 4}%
${top name 5} $alignr ${top cpu 5}% ${top mem 5}%
${top name 6} $alignr ${top cpu 6}% ${top mem 6}%
${top name 7} $alignr ${top cpu 7}% ${top mem 7}%
${top name 8} $alignr ${top cpu 8}% ${top mem 8}%
${top name 9} $alignr ${top cpu 9}% ${top mem 9}%
${top name 10} $alignr ${top cpu 10}% ${top mem 10}%
]];

 

Conky indítását érdemes késleltetni, ellenkező esetben hibás működést és/vagy megjelenést fogunk tapasztalni:

  • indítópulthoz kell adni „/usr/bin/conky –pause=10”
  • „conky -p10”
  • vagy alábbi script „start_conky.sh” indításával
  • indítópult „start_conky.sh”
#!/usr/bin/env bash

## Wait 10 seconds
sleep 10

## Run conky
conky

 

©2016 idStudio & SMThemes.com

Legjobb tárhely ajánlatok


ADATKEZELÉSI TÁJÉKOZTATÓ