Danke Dir...
Beiträge von Lextor im Thema „[c++] Frage zu Conky“
-
-
-
Kein Problem...wieder was gelernt...
Aber...woher soll man das alles wissen, wenn nicht irgendwer es einem sagt?
Und wer war dann zuerst da...Huhn oder Ei?
-
Klasse...wieder was gelernt...ich danke Dir vielmals...
-
Hallo,
Es sind so die Kleinigkeiten die ich gerne wissen würde...
Warum kann ich in der Config z.B. Color1 = 'E0FFFF' angeben um damit im conky.text zu arbeiten, aber wenn ich den Hintergrund ändern möchte, muss ich own_window_colour schreiben, also noch ein "u" ?
-
Ich danke Dir vielmals für deine Geduld und Hilfe...
Nun hab ich noch eine Verständnisfrage...
In dieser Zeile für die CPU Package Temperatur sind die Schwellwerte in Anführungszeichen
${color1}${font Font Awesome 6 Free:style=Solid:size=10}${font}${goto 25}${font Roboto:size=10} CPU Package:$alignr${if_match "${exec sensors coretemp-isa-0000 | grep 'Package id 0' | cut -c17-23}">="75"}${color4}${exec sensors coretemp-isa-0000 | grep 'Package id 0' | cut -c17-23}${else}${color2}${exec sensors coretemp-isa-0000 | grep 'Package id 0' | cut -c17-23}${endif}${font}
Funktioniert nicht ohne...wird falsche Schriftfarbe ausgegeben.
In der deinem Code sind keine Anführungszeichen...funktioniert aber...
Warum?
-
Hallo nochmals,
Ich habe noch eine Frage...
Es geht um folgende Zeile:
${color1}${font Font Awesome 6 Free:style=Solid:size=10}${font Roboto:size=10}Akku: ${color2} $alignr$ {if_match "${cat /sys/class/power_supply/BAT0/capacity}"<="40"}${color6}${if_match "${cat /sys/class/power_supply/BAT0/capacity}"<="25"}${color4}${else}${cat /sys/class/power_supply/BAT0/capacity}${color2}${endif}${endif}
Ich möchte gerne die Akkuzustände farblich unterscheiden. Es geht um <=40 und <=25
irgendwie bekomme ich es nicht hin..und dann kam die Frage auf, ob es überhaupt gehen würde...denn kleiner als 25 ist ja auch zeitgleich kleiner als 40...könnt Ihr mir auf die Sprünge helfen?
Vielen Dank...
-
Nein. Die input Dateien enthalten wohl mehrere Stellen hinterm Komma aber der hwmon Befehl arbeitet mit Ganzzahlen.
OK, Danke für die Info und deine Unterstützung...hab doch so einiges gelernt...
-
was mir gerade auffällt...
über den Hwmon Befehl bekomme ich die Temperaturen ohne Dezimalstelle ausgegeben...beim exec aber schon..
Kann man da was machen?
-
Nebenbei fällt mir noch auf das Deine sensors Ausgabe relativ mager ist. Hast Du
sudo sensors-detect
ausgeführt?
sudo sensors-detect
[sudo] Passwort für christoph:
# sensors-detect version 3.6.0
# System: ASUSTeK COMPUTER INC. ZenBook UX363EA_UX363EA [1.0]
# Board: ASUSTeK COMPUTER INC. UX363EA
# Kernel: 5.15.0-102-generic x86_64
# Processor: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz (6/140/1)This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): y
Module cpuid loaded successfully.
Silicon Integrated Systems SIS5595... No
VIA VT82C686 Integrated Sensors... No
VIA VT8231 Integrated Sensors... No
AMD K8 thermal sensors... No
AMD Family 10h thermal sensors... No
AMD Family 11h thermal sensors... No
AMD Family 12h and 14h thermal sensors... No
AMD Family 15h thermal sensors... No
AMD Family 16h thermal sensors... No
AMD Family 17h thermal sensors... No
AMD Family 15h power sensors... No
AMD Family 16h power sensors... No
Hygon Family 18h thermal sensors... No
Intel digital thermal sensor... Success!
(driver `coretemp')
Intel AMB FB-DIMM thermal sensor... No
Intel 5500/5520/X58 thermal sensor... No
VIA C7 thermal sensor... No
VIA Nano thermal sensor... NoSome Super I/O chips contain embedded sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): y
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor/ITE'... No
Trying family `SMSC'... No
Trying family `VIA/Winbond/Nuvoton/Fintek'... No
Trying family `ITE'... No
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor/ITE'... No
Trying family `SMSC'... No
Trying family `VIA/Winbond/Nuvoton/Fintek'... No
Trying family `ITE'... NoSome systems (mainly servers) implement IPMI, a set of common interfaces
through which system health data may be retrieved, amongst other things.
We first try to get the information from SMBIOS. If we don't find it
there, we have to read from arbitrary I/O ports to probe for such
interfaces. This is normally safe. Do you want to scan for IPMI
interfaces? (YES/no): y
Probing for `IPMI BMC KCS' at 0xca0... No
Probing for `IPMI BMC SMIC' at 0xca8... NoSome hardware monitoring chips are accessible through the ISA I/O ports.
We have to write to arbitrary I/O ports to probe them. This is usually
safe though. Yes, you do have ISA I/O ports even if you do not have any
ISA slots! Do you want to scan the ISA I/O ports? (YES/no): y
Probing for `National Semiconductor LM78' at 0x290... No
Probing for `National Semiconductor LM79' at 0x290... No
Probing for `Winbond W83781D' at 0x290... No
Probing for `Winbond W83782D' at 0x290... NoLastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no): y
Found unknown SMBus adapter 8086:a0a3 at 0000:00:1f.4.
Sorry, no supported PCI bus adapters found.Next adapter: SMBus I801 adapter at efa0 (i2c-0)
Do you want to scan it? (YES/no/selectively): yNext adapter: Synopsys DesignWare I2C adapter (i2c-1)
Do you want to scan it? (YES/no/selectively): y
Adapter doesn't support all probing functions.
Some addresses won't be probed.Next adapter: Synopsys DesignWare I2C adapter (i2c-2)
Do you want to scan it? (YES/no/selectively): y
Adapter doesn't support all probing functions.
Some addresses won't be probed.Next adapter: i915 gmbus dpa (i2c-3)
Do you want to scan it? (yes/NO/selectively): yNext adapter: i915 gmbus dpb (i2c-4)
Do you want to scan it? (yes/NO/selectively): y
Client found at address 0x4a
Probing for `National Semiconductor LM75'... No
Probing for `National Semiconductor LM75A'... No
Probing for `Dallas Semiconductor DS75'... No
Probing for `National Semiconductor LM77'... No
Probing for `Analog Devices ADT7410/ADT7420'... No
Probing for `Analog Devices ADT7411'... No
Probing for `Maxim MAX6642'... No
Probing for `Texas Instruments TMP435'... No
Probing for `National Semiconductor LM73'... No
Probing for `National Semiconductor LM92'... No
Probing for `National Semiconductor LM76'... No
Probing for `Maxim MAX6633/MAX6634/MAX6635'... No
Probing for `NXP/Philips SA56004'... No
Client found at address 0x4b
Probing for `National Semiconductor LM75'... No
Probing for `National Semiconductor LM75A'... No
Probing for `Dallas Semiconductor DS75'... No
Probing for `National Semiconductor LM77'... No
Probing for `Analog Devices ADT7410/ADT7420'... No
Probing for `Analog Devices ADT7411'... No
Probing for `Maxim MAX6642'... No
Probing for `Texas Instruments TMP435'... No
Probing for `National Semiconductor LM92'... No
Probing for `National Semiconductor LM76'... No
Probing for `Maxim MAX6633/MAX6634/MAX6635'... No
Probing for `NXP/Philips SA56004'... No
Probing for `Analog Devices ADT7481'... NoNext adapter: i915 gmbus dpc (i2c-5)
Do you want to scan it? (yes/NO/selectively): yNext adapter: i915 gmbus tc1 (i2c-6)
Do you want to scan it? (yes/NO/selectively): yNext adapter: i915 gmbus tc2 (i2c-7)
Do you want to scan it? (yes/NO/selectively): yNext adapter: i915 gmbus tc3 (i2c-8)
Do you want to scan it? (yes/NO/selectively): yNext adapter: i915 gmbus tc4 (i2c-9)
Do you want to scan it? (yes/NO/selectively): yNext adapter: i915 gmbus tc5 (i2c-10)
Do you want to scan it? (yes/NO/selectively): yNext adapter: i915 gmbus tc6 (i2c-11)
Do you want to scan it? (yes/NO/selectively): yNext adapter: AUX A/DDI A/PHY A (i2c-12)
Do you want to scan it? (yes/NO/selectively): y
Client found at address 0x48
Probing for `National Semiconductor LM75'... No
Probing for `National Semiconductor LM75A'... No
Probing for `Dallas Semiconductor DS75'... No
Probing for `National Semiconductor LM77'... No
Probing for `Analog Devices ADT7410/ADT7420'... No
Probing for `Analog Devices ADT7411'... No
Probing for `Maxim MAX6642'... No
Probing for `Texas Instruments TMP435'... No
Probing for `National Semiconductor LM73'... No
Probing for `National Semiconductor LM92'... No
Probing for `National Semiconductor LM76'... No
Probing for `Maxim MAX6633/MAX6634/MAX6635'... No
Probing for `NXP/Philips SA56004'... No
Probing for `SMSC EMC1023'... No
Probing for `SMSC EMC1043'... No
Probing for `SMSC EMC1053'... No
Probing for `SMSC EMC1063'... NoNext adapter: AUX USBC1/DDI TC1/PHY TC1 (i2c-13)
Do you want to scan it? (yes/NO/selectively): yNext adapter: AUX USBC2/DDI TC2/PHY TC2 (i2c-14)
Do you want to scan it? (yes/NO/selectively): y
Now follows a summary of the probes I have just done.
Just press ENTER to continue: yDriver `coretemp':
* Chip `Intel digital thermal sensor' (confidence: 9)To load everything that is needed, add this to /etc/modules:
#----cut here----
# Chip drivers
coretemp
#----cut here----
If you have some drivers built into your kernel, the list above will
contain too many modules. Skip the appropriate ones!Do you want to add these lines automatically to /etc/modules? (yes/NO)y
Successful!Monitoring programs won't work until the needed modules are
loaded. You may want to run '/etc/init.d/kmod start'
to load them.Unloading cpuid... OK
-
${hwmon asus fan 1}
Das wars...danke
-
Ich nochmal...
also über den Befehl Hwmon funktioniert das nicht bei jedem Sensor.
${hwmon asus cpu_fan} und es passiert nichts....über den exec Befehl ist die Drehzahl vorhanden.
Mache ich was falsch?
-
Ach ja... der Fehler. Der Cut Befehl für den Package Wert gibt das aus:
Wie kamst Du darauf? Kann ich das kontrollieren?
-
Ich danke Dir vielmals...werde ich ausprobieren...
Vielen Dank...
Gruß Lextor
-
Danke für deine Tipps....
coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +91.0°C (high = +100.0°C, crit = +100.0°C)
Core 0: +91.0°C (high = +100.0°C, crit = +100.0°C)
Core 1: +76.0°C (high = +100.0°C, crit = +100.0°C)
Core 2: +78.0°C (high = +100.0°C, crit = +100.0°C)
Core 3: +74.0°C (high = +100.0°C, crit = +100.0°C)ucsi_source_psy_USBC000:002-isa-0000
Adapter: ISA adapter
in0: 20.00 V (min = +5.00 V, max = +0.00 V)
curr1: 3.25 A (max = +0.00 A)nvme-pci-e100
Adapter: PCI adapter
Composite: +31.9°C (low = -0.1°C, high = +76.8°C)
(crit = +79.8°C)BAT0-acpi-0
Adapter: ACPI interface
in0: 17.21 Viwlwifi_1-virtual-0
Adapter: Virtual device
temp1: +36.0°Cucsi_source_psy_USBC000:001-isa-0000
Adapter: ISA adapter
in0: 0.00 V (min = +0.00 V, max = +0.00 V)
curr1: 0.00 A (max = +0.00 A)asus-isa-0000
Adapter: ISA adapter
cpu_fan: 0 RPMacpitz-acpi-0
Adapter: ACPI interface
temp1: +91.0°C (crit = +103.0°C) -
Hallo zusammen,
Wie das halt so ist im Leben...habe ich mal angefangen mich mit Conky zu beschäftigen...bin also gerade damit gestartet...hoffe also das ich hier die eine oder andere Frage platzieren darf?
Ich habe ein Problem mit der Anzeige der Temperaturen bzw. deren Farbe. Anfürsich bin ich schon recht zufrieden mit den Zwischenergebnissen, da ich erst seit gestern damit arbeite.
Nur die Farben der Temperaturen der CPU machen nicht was sie sollten. bei >=30 sollte Color4 gesetzt werden, ansonsten color2...und genau das geht nicht.
Kann mir jemand weiter helfen?
Die entsprechende Zeile (CPU Package, gilt aber auch für die Kerne 1-4) habe ich mal hervorgehoben.
conky.config = {
alignment = 'middle_right',
background = true,
border_width = 1,
cpu_avg_samples = 2,
default_color = 'white',
default_outline_color = 'white',
default_shade_color = 'white',
double_buffer = true,
draw_borders = false,
draw_graph_borders = false,
draw_outline = false,
draw_shades = false,
extra_newline = false,
font = 'DejaVu Sans Mono:size=12',
gap_x = 25,
gap_y = 25,
minimum_height = 1100,
minimum_width = 300,
net_avg_samples = 2,
no_buffers = true,
out_to_console = false,
out_to_ncurses = false,
out_to_stderr = false,
out_to_x = true,
own_window = true,
own_window_transparent = black,
own_window_argb_visual = true,
own_window_class = 'Conky',
own_window_type = 'panel',
show_graph_range = t,
show_graph_scale = false,
stippled_borders = 0,
update_interval = 1.0,
uppercase = false,
use_spacer = 'none',
use_xft = true,color1 = 'grey',
color2 = '#90EBCD',
color3 = '#30BA78',
color4 = '#FE7C3F',
color5 = 'red'
}conky.text = [[
${color3}${font Font Awesome 6 Free:style=Solid:size=12}${voffset 2} S Y S T E M ${hr 2}${font}${color}
${color1}${font Roboto:size=10}Hostname:${color2} ${alignr}${nodename}
${color1}OS: $alignr ${color2} ${execi 6000 lsb_release -d| awk '{$1=""; print $0}'}
${color1}Kernel: $alignr ${color2} $kernel
${color1}Uptime:$color $alignr ${color2} $uptime${font}${color}${color3}${font Font Awesome 6 Free:style=Solid:size=12} C P U ${hr 2}${font}${color}
${color1}${font}${font Roboto:size=10}Intel® Core™ i5-1135G7 Prozessor${font}
${color1}${font Font Awesome 6 Free:style=Solid:size=10}${font}${goto 25}${font Roboto:size=10} CPU Freq:${color2} $alignr${freq_g}GHz${font}${color1}${font Font Awesome 6 Free:style=Solid:size=10}${font}${goto 25}${font Roboto:size=10} CPU Package:$alignr${if_match "${exec sensors coretemp-isa-0000 | grep 'Package id 0' | cut -c13-21}">="30"}${color4}${exec sensors coretemp-isa-0000 | grep 'Package id 0' | cut -c13-21}${else}${color2}${exec sensors coretemp-isa-0000 | grep 'Package id 0' | cut -c13-21}${endif}${font}
${color1}${font Font Awesome 6 Free:style=Solid:size=10}${font}${goto 25}${font Roboto:size=10} CPU Core 1:$alignr${if_match "${exec sensors coretemp-isa-0000 | grep 'Core 0' | cut -c13-21}">="30"}${color4}${exec sensors coretemp-isa-0000 | grep 'Core 0' | cut -c13-21}${else}${color2}${exec sensors coretemp-isa-0000 | grep 'Core 0' | cut -c13-21}${endif}${font}
${color1}${font Font Awesome 6 Free:style=Solid:size=10}${font}${goto 25}${font Roboto:size=10} CPU Core 2:$alignr${if_match "${exec sensors coretemp-isa-0000 | grep 'Core 1' | cut -c13-21}">="30"}${color4}${exec sensors coretemp-isa-0000 | grep 'core 1' | cut -c13-21}${else}${color2}${exec sensors coretemp-isa-0000 | grep 'Core 1' | cut -c13-21}${endif}${font}
${color1}${font Font Awesome 6 Free:style=Solid:size=10}${font}${goto 25}${font Roboto:size=10} CPU Core 3:$alignr${if_match "${exec sensors coretemp-isa-0000 | grep 'Core 2' | cut -c13-21}">="30"}${color4}${exec sensors coretemp-isa-0000 | grep 'core 2' | cut -c13-21}${else}${color2}${exec sensors coretemp-isa-0000 | grep 'Core 2' | cut -c13-21}${endif}${font}
${color1}${font Font Awesome 6 Free:style=Solid:size=10}${font}${goto 25}${font Roboto:size=10} CPU Core 4:$alignr${if_match "${exec sensors coretemp-isa-0000 | grep 'Core 3' | cut -c13-21}">="30"}${color4}${exec sensors coretemp-isa-0000 | grep 'core 3' | cut -c13-21}${else}${color2}${exec sensors coretemp-isa-0000 | grep 'Core 3' | cut -c13-21}${endif}${font}
${color1}${font Font Awesome 6 Free:style=Solid:size=10}${font}${goto 25}${font Roboto:size=10} CPU Usage: ${color2} $alignr ${cpu}%${font}${color}
${color1}${font Font Awesome 6 Free:style=Solid:size=10}${font}${goto 25}${font Roboto:size=10} CPU Fanspeed: ${color2} $alignr ${exec sensors asus-isa-0000 | grep 'cpu_fan' | cut -c13-21}${font}${color}${color3}${font Font Awesome 6 Free:style=Solid:size=12} G P U ${hr 2}${font}${color}
${color1}${font}${font Roboto:size=10}Intel® Iris Xe Graphics${font}
${color1}${font Font Awesome 6 Free:style=Solid:size=10}${font}${goto 25}${font Roboto:size=10} GPU Temp:$alignr${if_match "${hwmon 1 temp 1}">="80"}${color4}+${hwmon 1 temp 1}°C${else}${color2}+${hwmon 1 temp 1}°C${endif}${font}${color3}${font Font Awesome 6 Free:style=Solid:size=12} M E M O R Y ${hr 2}${font}${color}
${color1}${font Roboto:size=10}Usage: ${color2}$memperc% ${alignr}${color1}Total: ${color2}$memmax
${color1}Used: ${color2}$mem ${alignr}${color1}Free: ${if_match "${memfree}"<="15"}${color4}$memfree${else}${color2}${memfree}${endif}${font}${color1}${font Roboto:size=10}Top Processes ${goto 200}CPU% ${alignr}Mem%${font}${color}
${color2}${font Roboto:size=10}${top_mem name 1}${alignr}${goto 200}${top_mem cpu 1} ${alignr}${top_mem mem 1}
${color2}${top_mem name 2}${alignr}${goto 200}${top_mem cpu 2} ${alignr}${top_mem mem 2}
${color2}${top_mem name 3}${alignr}${goto 200}${top_mem cpu 3} ${alignr}${top_mem mem 3}
${color2}${top_mem name 4}${alignr}${goto 200}${top_mem cpu 4} ${alignr}${top_mem mem 4}
${color2}${top_mem name 5}${alignr}${goto 200}${top_mem cpu 5} ${alignr}${top_mem mem 5}
${color2}${top_mem name 6}${alignr}${goto 200}${top_mem cpu 6} ${alignr}${top_mem mem 6}
${color2}${top_mem name 7}${alignr}${goto 200}${top_mem cpu 7} ${alignr}${top_mem mem 7}
${color2}${top_mem name 8}${alignr}${goto 200}${top_mem cpu 8} ${alignr}${top_mem mem 8}${font}${color}${color3}${font Font Awesome 6 Free:style=Solid:size=12} N E T W O R K ${hr 2}${font}${color}
${color1}${font Font Awesome 6 Free:style=Solid:size=8}${font}${goto 25}${font Roboto:size=10}Download ${alignr}${color2}${downspeedf wlo1}k/s (${totaldown wlo1})${font}${color}
${color1}${font Font Awesome 6 Free:style=Solid:size=8}${font}${goto 25}${font Roboto:size=10}Upload ${alignr}${color2}${upspeedf wlo1}k/s (${totalup wlo1})${font}${color}${color3}${font Font Awesome 6 Free:style=Solid:size=12} D I S K ${hr 2}${font}${color}
${color1}${font Roboto:size=10}Partition /: $alignr ${color2}${fs_free} free / ${fs_size}
${color1}Partition /home: $alignr ${color2}${fs_free /home} free / ${fs_size /home}${font}${color}
${color1}${font Font Awesome 6 Free:style=Solid:size=10}${font Roboto:size=10}Temp: ${color2} $alignr ${exec sensors nvme-pci-e100 | grep 'Composite' | cut -c13-21}${font}${color}${color1}${font Font Awesome 6 Free:style=Solid:size=10}${font Roboto:size=10}Akku: ${color2} $alignr ${battery_percent}%${goto 760}
]]