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

if_up not working #31

Closed
matmunn opened this issue Jul 11, 2018 · 3 comments
Closed

if_up not working #31

matmunn opened this issue Jul 11, 2018 · 3 comments
Assignees
Labels

Comments

@matmunn
Copy link

matmunn commented Jul 11, 2018

Using the if_up variable results in conky dying with the error "could not create sockfd"

@npyl npyl self-assigned this Jul 11, 2018
@npyl npyl added the bug label Jul 11, 2018
@npyl
Copy link
Member

npyl commented Jul 11, 2018

In net_stat.cc, line 468, socket() function fails with error 43: Protocol not supported.

I noticed that the SOCK_CLOEXEC flag causes socket() to fail. This could mean that the code as it is now (-works on Linux and most likely on FreeBSD-) is invalid for macOS or that macOS has a bug.

Deleting the flag makes the problem disappear, but I am going to investigate further to see if this is the optimal solution.

You can pull the latest commit and recompile, it should now work.

npyl added a commit that referenced this issue Jul 11, 2018
@matmunn
Copy link
Author

matmunn commented Jul 12, 2018

You're a legend, thanks so much

@npyl
Copy link
Member

npyl commented Jul 12, 2018

You are welcome!!!

@npyl npyl closed this as completed Jul 12, 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
Labels
Projects
None yet
Development

No branches or pull requests

2 participants