Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fixing issue on reading cpu load when decimal separator is not a dot #60

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

Merged
merged 2 commits into from
May 14, 2021
Merged

fixing issue on reading cpu load when decimal separator is not a dot #60

merged 2 commits into from
May 14, 2021

Conversation

mrouillard
Copy link
Contributor

On a system where the decimal separator is not a dot, the previous command to grab CPU load was failing (e.g. with French locale, the decimal separator is a comma).
My proposal is to read the CPU load from /proc/loadavg instead of querying with top|grep|awk

@ladyada ladyada requested a review from evaherrada April 13, 2021 16:44
@jposada202020
Copy link
Contributor

@dherrada Another for your consideration :)

Copy link
Collaborator

@evaherrada evaherrada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the changes on Ubuntu. Absolutely no idea where my Pi is or I would test on that as well but I'm like 99% sure it'll work.

@evaherrada evaherrada merged commit aff8c9d into adafruit:master May 14, 2021
@evaherrada
Copy link
Collaborator

@jposada202020 Thanks for the reminder!

@mrouillard mrouillard deleted the fix-decimal-separator-issue branch May 14, 2021 16:09
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request May 18, 2021
Updating https://github.com/adafruit/Adafruit_CircuitPython_CharLCD to 3.3.10 from 3.3.9:
  > Merge pull request adafruit/Adafruit_CircuitPython_CharLCD#62 from jposada202020/correcting_rtype_documentation
  > Merge pull request adafruit/Adafruit_CircuitPython_CharLCD#61 from lesamouraipourpre/docs-and-examples
  > "Increase duplicate code check threshold "

Updating https://github.com/adafruit/Adafruit_CircuitPython_HTU21D to 0.11.0 from 0.10.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_HTU21D#16 from jposada202020/adding_temp_rh_resolution

Updating https://github.com/adafruit/Adafruit_CircuitPython_HTU31D to 1.1.0 from 1.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_HTU31D#5 from jposada202020/adding_temp_rh_resolution_properties
  > Merge pull request adafruit/Adafruit_CircuitPython_HTU31D#4 from jposada202020/correcting_conversion_formulas
  > "Increase duplicate code check threshold "

Updating https://github.com/adafruit/Adafruit_CircuitPython_MONSTERM4SK to 0.1.3 from 0.1.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_MONSTERM4SK#3 from FoamyGuy/add_jackolantern_example
  > "Increase duplicate code check threshold "

Updating https://github.com/adafruit/Adafruit_CircuitPython_Seesaw to 1.8.2 from 1.8.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_seesaw#66 from jposada202020/examples_api

Updating https://github.com/adafruit/Adafruit_CircuitPython_SHT4x to 1.0.6 from 1.0.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_SHT4x#7 from jposada202020/correcting_print

Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1306 to 2.11.4 from 2.11.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_SSD1306#60 from mrouillard/fix-decimal-separator-issue

Updating https://github.com/adafruit/Adafruit_CircuitPython_FakeRequests to 1.0.3 from 1.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_FakeRequests#4 from jposada202020/main
  > "Increase duplicate code check threshold "
  > Merge pull request adafruit/Adafruit_CircuitPython_FakeRequests#3 from FoamyGuy/pylintrc_and_versions

Updating https://github.com/adafruit/Adafruit_CircuitPython_FunHouse to 2.1.1 from 2.1.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_FunHouse#14 from makermelissa/main
  > Merge pull request adafruit/Adafruit_CircuitPython_FunHouse#13 from joezilla86/Docstring-updates

Updating https://github.com/adafruit/Adafruit_CircuitPython_ProgressBar to 2.1.1 from 2.1.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_ProgressBar#27 from jposada202020/improving_docs
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

Successfully merging this pull request may close these issues.

3 participants