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

Improve get_freq() #20

Closed
npyl opened this issue Feb 3, 2018 · 3 comments
Closed

Improve get_freq() #20

npyl opened this issue Feb 3, 2018 · 3 comments
Assignees

Comments

@npyl
Copy link
Member

npyl commented Feb 3, 2018

Find a way to actually calculate each core's frequency.
Currently get_freq() gets the factory frequency using sysctl.

Probably this will require creating a kernel extension for conky.

@npyl npyl self-assigned this Feb 3, 2018
@npyl
Copy link
Member Author

npyl commented Jul 26, 2018

Intel's Power Gadget can read the CPU frequency (so we can read it, too!).
It is also available through Homebrew.

Can be installed using brew cask install intel-power-gadget.

The cask installs the PowerGadget.app, the Framework and the Driver.

@npyl
Copy link
Member Author

npyl commented Jul 26, 2018

Right now this API seems to only work for CORE0

npyl added a commit that referenced this issue Jul 26, 2018
Using the Intel® Power Gadget API (https://software.intel.com/en-us/blogs/2012/12/13/using-the-intel-power-gadget-api-on-mac-os-x) we can now get actual Core frequency and not the constant factory one.

Though, for some weird reason the API gives the same freq for all Cores, thus the |cpu| arg becomes useless.
@npyl
Copy link
Member Author

npyl commented Jul 26, 2018

This is probably as far as it can go for now; thus close issue.

@npyl npyl closed this as completed Jul 26, 2018
npyl pushed a commit that referenced this issue Aug 9, 2018
* Try to amend #31

* BUILD_WLAN should be available for all OS.

Keep BUILD_WLAN OFF by default for compatibility reasons.

* WLAN-related variables should be available for every OS.

There are some problems (probably null-dereference)

* Fix $wireless_essid crashing conky if no argument provided.

Conky wasn't parsing the argument of the variable as it should, thus wasn't allocating the `dev` member variable.

Also fix some documentation stuff.

* Improve `get_freq` #20

Using the Intel® Power Gadget API (https://software.intel.com/en-us/blogs/2012/12/13/using-the-intel-power-gadget-api-on-mac-os-x) we can now get actual Core frequency and not the constant factory one.

Though, for some weird reason the API gives the same freq for all Cores, thus the |cpu| arg becomes useless.

* Oops, this accidently slipped in

* Introduce BUILD_IPGFREQ build option

This build option has been introduced for one particular reason:

On macOS getting current core-frequency is not supported by the APIs.  A solution is to install Intel's ® Power Gadget which comes with an .app, a Framework and a kernel-extension.  Though, this may trouble some alot, thus introduce BUILD_IPGFREQ.

* Forgot static here.

* Some improvements for get_freq again.

Fix frequency not printing correctly (I wasn't using the divisor)
Add more guards.

* Setup cmake files and project code for Objective-C code #17

We want to use CoreWLAN framework.

* update_cpu_usage() now supports multiple cores

Also, some cleanup.

* Updated default conky config to monitor Mac Networking

* Made Mac Friendly BuildOptions and generic default conky configs

* Undid Xdamage config and cleaned up previous IF statements

* Re-Added XDamage fix

* Finish up the algorithm. I think its now correct. Closes: #33

* Cleanup macro and introduce a no-op free_cpu() function for ALL cpu-related variables

free_cpu() must be implemented for every OS and on all except macOS its a no-op function.

* Reformat, add empty comment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant