Conky's use more cpu over days

Add functionality to your desktop
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
User avatar
Koentje
Level 7
Level 7
Posts: 1581
Joined: Tue Jan 04, 2022 6:23 pm
Location: Netherlands

Conky's use more cpu over days

Post by Koentje »

I noticed since a few weeks that some of my conky's are using more cpu usage as the days go by.
Schermafdruk van 2023-12-09 12-48-59.jpg
Schermafdruk van 2023-12-09 12-48-59.jpg (6.98 KiB) Viewed 1161 times

After 2 days
Schermafdruk van 2023-12-09 11-58-20.jpg
Schermafdruk van 2023-12-09 11-58-20.jpg (6.81 KiB) Viewed 1161 times

What could be a reason of this?
User avatar
Bleys
Level 4
Level 4
Posts: 431
Joined: Wed Apr 20, 2022 4:17 am
Location: Essen, Germany

Re: Conky's use more cpu over days

Post by Bleys »

This is almost always caused by external calls to system tools via exec*
I would comment out all exec* calls and activate them individually until the culprit is found.
Ryzen 5 5600G, 16GB RAM, 2TB M.2 Crucial P3, Asrock Deskmeet X300, Samsung Odyssey 49", Linux Mint 21
User avatar
Koentje
Level 7
Level 7
Posts: 1581
Joined: Tue Jan 04, 2022 6:23 pm
Location: Netherlands

Re: Conky's use more cpu over days

Post by Koentje »

This has not happened in the past. It's only since a few weeks that i noticed this growing of cpu usage.
But the cpu load conky has only a few exec commands in it in comparison to other conky's.
There are 7 of these in the script..

Code: Select all

${exec echo $(cat $(cat /etc/hwmon | grep coretemp | awk '{print $2}')/temp1_input)/1000 | bc}
My pcinfo script has 19 exec commands in them and GPU Radeon has even more..

I made a small bash script that does the calculating of the temps and call it in the conkyscript to expiriment a bit if that makes any difference.

Bash

Code: Select all

#!/bin/sh

if [ "$1" = "" ]; then
  echo "\n Calculates temperature values of coretemp\n"
else
  echo $(cat $(cat /etc/hwmon | grep coretemp | awk '{print $2}')/$1_input)/1000 | bc
fi

Conky

Code: Select all

${execp ./calc-coretemps.sh temp1}
Now i have to wait a day or 2 to see if it still grows..
User avatar
Pjotr
Level 24
Level 24
Posts: 20142
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Conky's use more cpu over days

Post by Pjotr »

Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
User avatar
Koentje
Level 7
Level 7
Posts: 1581
Joined: Tue Jan 04, 2022 6:23 pm
Location: Netherlands

Re: Conky's use more cpu over days

Post by Koentje »

As i said before, it only happens since a few weeks. The 4 years before i had no problem of this kind. And i'm aware of more conky's equals more cpu load. That's why i made a conky that monitors the cpu usage of all the conky windows. And i had always the same top 5.. like volume bars, this one has a 0.1 update interval, so i know it uses more cpu load then the rest.
But when scripting, i always try to code it so it takes the least amount of cpu usage or time to run.

I suspect an update of some kind.. but since it's already a few weeks back i have no idea which one.
Post Reply

Return to “Compiz, Conky, Docks & Widgets”