Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The systemd log is being spammed by auto-cpufreq #82

Closed
marc0der opened this issue Aug 7, 2020 · 6 comments
Closed

The systemd log is being spammed by auto-cpufreq #82

marc0der opened this issue Aug 7, 2020 · 6 comments

Comments

@marc0der
Copy link
Contributor

marc0der commented Aug 7, 2020

I've started using the tool and loving it so far. Good work!

After installation, the auto-cpufreq service is continually outputting the full payload of the --log command to the system logs.

When tailing the logs with journalctl --follow, I see a continual stream of these log reports being dumped in the log every 5 seconds.

...
Aug 07 12:34:18 rocinante auto-cpufreq.service[561395]: ----------------------------- System information ------------------------------
Aug 07 12:34:18 rocinante auto-cpufreq.service[561395]: Linux distro: Manjaro Linux UNKNOWN version
Aug 07 12:34:18 rocinante auto-cpufreq.service[561395]: Linux kernel: 5.4.52-1-MANJARO
Aug 07 12:34:18 rocinante auto-cpufreq.service[561395]: Driver: intel_pstate
Aug 07 12:34:18 rocinante auto-cpufreq.service[561395]: Architecture: x86_64
Aug 07 12:34:18 rocinante auto-cpufreq.service[561395]: Processor: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
...

My system info:

               +
               #
              ###
             #####
             ######
            ; #####;            User: marco
           +##.#####            Hostname: rocinante
          +##########           Distro: Arch Linux
         #############;         Kernel: 5.4.52-1-MANJARO
        ###############+        Uptime: 10 days, 14:03
       #######   #######        Window Manager: i3
     .######;     ;###;`".      Desktop Environment:
    .#######;     ;#####.       Shell: /bin/zsh
    #########.   .########`     Terminal: screen-256color
   ######'           '######    Packages: 1588
  ;####                 ####;   CPU: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
  ##'                     '##   RAM: 6717 MB / 15766 MB
 #'                         `#  Disk: 469GB / 989GB

Installed with snap:

snap     2.45.2-1
snapd    2.45.2-1
series   16
manjaro  -
kernel   5.4.52-1-MANJARO

Should this perhaps rather be a one-line summary whenever the state of cpu scaling is changed by the tool?

I also further noticed the continued references to a /var/log/auto-cpufreq.log file in the service descriptor and elsewhere, but this file never seems to be created. I tried creating it myself, but it still doesn't get populated with the logs.

I realise that these are just teething issues that still need to be sorted. Keep up the great work!

@AdnanHodzic
Copy link
Owner

AdnanHodzic commented Aug 7, 2020

First of all thank you, will do :)

I remember this same thing was mentioned in #53. Hence, I think it would be a good think to address this issue in one of the future releases.

@marc0der
Copy link
Contributor Author

marc0der commented Aug 7, 2020

Great stuff. Some further digging has revealed that all logging is done straight to standard out. Perhaps this issue could be circumvented using targeted logging using a logger library. I could look into this, but since python isn't my first language I'm not promising anything.

@AdnanHodzic
Copy link
Owner

Go for it, it would be amazing to see a PR from you :) Otherwise, even if you find a nice library that could be used for this purpose that would also be great.

@AdnanHodzic
Copy link
Owner

Released a fix as part of 1.2.3 version which is available in beta channel, install it by running:

sudo snap install auto-cpufreq --beta

After you confirm it's working as expected for you I'll promote it to stable channel, merge changes with master and close this issue.

@marc0der
Copy link
Contributor Author

marc0der commented Sep 2, 2020

I just tried it out and it works perfectly 👍

@AdnanHodzic
Copy link
Owner

AdnanHodzic commented Sep 2, 2020

Awesome, enjoy.

Changes have been promoted to stable channel, hence if you want to move back to stable from beta, can you do so by running:

sudo snap switch --channel=stable auto-cpufreq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants