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

methodology for minimizing MonitorMode cpu impact #824

Closed
wants to merge 2 commits into from

Conversation

jaskcon
Copy link
Contributor

@jaskcon jaskcon commented Nov 22, 2017

Thomas,
In an effort to minimize the cpu impact associated with foreground monitoring, I've ported the relevant armbianmonitor bash functions to c/c++ (/usr/bin/acm). Have a look and let me know what you think
Thanks and regards,
./j

Note: file error handling has yet to be added, so I'll cross my hand-fingers that you don't hit a seg.fault right out of the gate....(ha^4)

Thomas,
In an effort to minimize the cpu impact associated with foreground monitoring, I've ported the relevant armbianmonitor bash functions to c/c++ (/usr/bin/acm). Have a look and let me know what you think
@ThomasKaiser
Copy link
Contributor

I tried to build it but failed. And since I know that other devs aren't exactly happy about an ever growing armbianmonitor script now also needing external tools that need to be packaged I think the best place would be to discuss this over at https://forum.armbian.com/forum/4-development/ first.

But I've to admit that I really like your approach since monitoring that changes the system's behaviour is a bad thing in general (and at least that's what happens with armbianmonitor with too frequent updates now)

@chwe17
Copy link
Member

chwe17 commented Aug 25, 2018

gcc -lm -o acm acm.c and it will compile

Note: file error handling has yet to be added, so I'll cross my hand-fingers that you don't hit a seg.fault right out of the gate....(ha^4)

happens when you call it without sudo

opi@orangepizero:~$ sudo ./acm

cpu statistics monitor_______________________________________________________________________________________________________________________

  hostname: orangepizero

  linux version: 4.14.65-sunxi
  cpu model:  ARMv7 Processor rev 5 (v7l)
  freq.union.cores: 0 1 2 3 
   | min.freq: 240000 
   | max.freq: 1200000
   | freq.gov: ondemand


  ['/'+<ENTER>: flip display mode (fixed-line/scrolling)]
  ['z'+<ENTER>: reset all counters]
  ['q'+<ENTER> || <CTRL-c>: exit cpu statistics monitor

  display interval:  0.100


___________________  |cpu.stats_____________________________________________________________________________________________________________     
                     |
                     |   core.freq       cpu.temp      load.average
Ʃ.int     time       |    0 - 3          °C |°F       1m   5m   15m     idle     cpu      ưcpu      sys     user     nice     ioio     irqs     

17.34     17:43:11       240 MHz       43.3  110.0    0.00 0.02 0.00    1.00     0.00     0.01     0.00     0.00     0.00     0.00     0.00      
/
17.37     17:43:12       240 MHz       43.3  110.0    0.00 0.02 0.00    1.00     0.00     0.01     0.00     0.00     0.00     0.00     0.00     
17.47     17:43:12       240 MHz       43.3  110.0    0.00 0.02 0.00    1.00     0.00     0.01     0.00     0.00     0.00     0.00     0.00     
17.57     17:43:12       240 MHz       43.3  110.0    0.00 0.02 0.00    0.98     0.02     0.01     0.02     0.00     0.00     0.00     0.00     
17.67     17:43:12       240 MHz       43.3  110.0    0.00 0.02 0.00    1.00     0.00     0.01     0.00     0.00     0.00     0.00     0.00     
17.77     17:43:12       240 MHz       43.3  110.0    0.00 0.02 0.00    1.00     0.00     0.01     0.00     0.00     0.00     0.00     0.00     
17.87     17:43:12       240 MHz       43.3  110.0    0.00 0.02 0.00    1.00     0.00     0.01     0.00     0.00     0.00     0.00     0.00     

I know the PR is outdated, but at least you can have a look now..

@lanefu
Copy link
Member

lanefu commented Feb 25, 2019

@jaskcon is this meant to integrate with armbian monitor or replace?

@lanefu lanefu added the stale label Mar 25, 2019
@lanefu
Copy link
Member

lanefu commented Jul 11, 2019

@ThomasKaiser @chwe17

Any thoughts on this PR?

@lanefu lanefu requested a review from a team August 16, 2019 00:59
@lanefu lanefu closed this Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants