# How to enable Stats Logging in idle mode?

**URL:** <https://klipper.discourse.group/t/how-to-enable-stats-logging-in-idle-mode/12507>\
**Category:** Developers\
**Created:** [December 22, 2023, 8:09am UTC](https://klipper.discourse.group/t/how-to-enable-stats-logging-in-idle-mode/12507 "2023-12-22T08:09:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![moelski](https://avatars.discourse-cdn.com/v4/letter/m/9de053/32.png) [@moelski](https://klipper.discourse.group/u/moelski)\
**Post date:** [December 22, 2023, 8:09am UTC](https://klipper.discourse.group/t/how-to-enable-stats-logging-in-idle-mode/12507/1 "2023-12-22T08:09:07Z")

</div>

Hi !  
I need to do some temperature tests with my RP2040 board. And I want to calculate graphs from the klippy.log for this purpose. Problem is that the Stats logging is disabled in klippy.log when the printer is not active.  
So is there any way - configuration or changing some lines of python code - to have the STATS logging even running when the printer is in idle mode?  
I know this will result in a huge log file. But as mentioned above … It’s only for testing purpose and not for daily usage.

Thx for your help  
Dominik

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [December 22, 2023, 8:41am UTC](https://klipper.discourse.group/t/how-to-enable-stats-logging-in-idle-mode/12507/2 "2023-12-22T08:41:06Z")

</div>

Hello @moelski !

I think, this is more a task for the frontend you use.

---

<div class="post-metadata">

**Author:** ![moelski](https://avatars.discourse-cdn.com/v4/letter/m/9de053/32.png) [@moelski](https://klipper.discourse.group/u/moelski)\
**Post date:** [December 22, 2023, 10:06am UTC](https://klipper.discourse.group/t/how-to-enable-stats-logging-in-idle-mode/12507/3 "2023-12-22T10:06:11Z")

</div>

Hi,  
no I don’t think so. The logging of stats information is disabled when the printer is in idle. So regardless which frontend you are using, you won’t get any data at all.

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [December 22, 2023, 10:43am UTC](https://klipper.discourse.group/t/how-to-enable-stats-logging-in-idle-mode/12507/4 "2023-12-22T10:43:36Z")

</div>

I run Klipper with OctoPrint and I constantly get the temperature information - even in idle mode.

---

<div class="post-metadata">

**Author:** ![moelski](https://avatars.discourse-cdn.com/v4/letter/m/9de053/32.png) [@moelski](https://klipper.discourse.group/u/moelski)\
**Post date:** [December 22, 2023, 10:55am UTC](https://klipper.discourse.group/t/how-to-enable-stats-logging-in-idle-mode/12507/5 "2023-12-22T10:55:33Z")

</div>

That´s because Octoprint queries the data.  
But this answer my question. And btw. I don´t use Octoprint.

---

<div class="post-metadata">

**Author:** ![hcet14](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@hcet14](https://klipper.discourse.group/u/hcet14)\
**Post date:** [December 22, 2023, 11:53am UTC](https://klipper.discourse.group/t/how-to-enable-stats-logging-in-idle-mode/12507/6 "2023-12-22T11:53:39Z")

</div>

> [@moelski](#):
>
> So is there any way - configuration or changing some lines of python code - to have the STATS logging even running when the printer is in idle mode?

Good question to developers!  
There is probably a switch to enable logging in idle mode.  
Hopefully you may get an answer.

---

<div class="post-metadata">

**Author:** ![koconnor](https://avatars.discourse-cdn.com/v4/letter/k/aca169/32.png) [@koconnor](https://klipper.discourse.group/u/koconnor)\
**Post date:** [December 27, 2023, 12:37am UTC](https://klipper.discourse.group/t/how-to-enable-stats-logging-in-idle-mode/12507/7 "2023-12-27T00:37:24Z")

</div>

There is currently no way to force statistics to always be logged. One could alter the code (modify `generate_stats` in `klippy/extras/statistics.py`).

A possible hack is to set an extruder or bed to a target temperature of 1.0 and disable the idle timeout.

-Kevin
