CPU Load calculation :reg

57 views
Skip to first unread message

Manukumar NM

unread,
Jul 11, 2023, 8:15:16 AM7/11/23
to open...@googlegroups.com
Greetings...
                    Hi team,
                                 In openwisp2, on what basis the cpu load is calculated and where can i find the logic in "OPENWISP_MONITORING" module.

Thanks in advance.

Manukumar NM

unread,
Jul 11, 2023, 9:09:49 AM7/11/23
to open...@googlegroups.com
I have gone through the code but I didn't understand it because here we are taking the first value of the load, For example: load[0][1][2] = 0.37,  0.24,  0.17 and cpus = 1. Calculation goes like this according to the code: 100 * float(load[0] / cpus) i.e = 100 * (0.37 / 1) = 37.  

Federico Capoano

unread,
Jul 11, 2023, 9:11:57 AM7/11/23
to open...@googlegroups.com
This blog post summarizes the concept:
https://www.digitalocean.com/community/tutorials/load-average-in-linux

There's similar resources online to dig deeper.

Federico

--
You received this message because you are subscribed to the Google Groups "OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openwisp+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/CAG6AGHfmHSHKiSyyuJMTfgCzodCRi-zikPUb8R9yz9iKvXi1PQ%40mail.gmail.com.

Manukumar NM

unread,
Jul 11, 2023, 9:47:04 AM7/11/23
to open...@googlegroups.com
sure...thanks for your valuable information.

Manukumar NM

unread,
Jul 12, 2023, 1:21:18 AM7/12/23
to open...@googlegroups.com
Hiii,
      I have gone through that cpu load calculation but the doubt is that the cpu load chart of  Y-axis is showing in the range of 200, 400, 600, 800 like that. I have attached the screenshot below. But that's not right. It should be in the range of 0 to 100% What am thinking. Is there any specific reason why in the chart it's showing usage of 712% of cpu, 800% of cpu etc like that.

Thanks in advance.
image.png

Federico Capoano

unread,
Jul 12, 2023, 9:51:49 AM7/12/23
to open...@googlegroups.com
Again, we're using load averages to infer CPU utilization, please read this post to understand why load averages can show these kind of values, this is useful to know how much overutilized the CPU is:

Federico

Manukumar NM

unread,
Jul 13, 2023, 6:45:36 AM7/13/23
to open...@googlegroups.com
Okay...one more doubt I have on PING CHECK is that according this logic: DEFAULT_PING_CHECK_CONFIG = { 'count': { 'type': 'integer', 'default': 5, 'minimum': 2, # chosen to avoid slowing down the queue 'maximum': 20, }, 'interval': { 'type': 'integer', 'default': 25, 'minimum': 10, # chosen to avoid slowing down the queue 'maximum': 1000, }, 'bytes': {'type': 'integer', 'default': 56, 'minimum': 12, 'maximum': 65508}, 'timeout': { 'type': 'integer', 'default': 800, 'minimum': 5, # arbitrary chosen to avoid slowing down the queue 'maximum': 1500, }, } 
Every 2.5 milliseconds ping is happening, it means it's huge ryt because the data is on the devices will be vanished very fast. Per minute 2400 times ping will happen if am not wrong (Interval =25, Ping check per min = 60000/interval) . Is there any specific reason there to ping to the devices every 2.5 milliseconds?                                                      
I started calculating these values and researching more on Openwisp2 Graphs so am getting all these doubts.  

--
You received this message because you are subscribed to the Google Groups "OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openwisp+u...@googlegroups.com.

Federico Capoano

unread,
Jul 13, 2023, 10:17:15 AM7/13/23
to open...@googlegroups.com
Sorry, I don't understand your last question.
Please open a new thread when you change the subject and please make sure to provide more information about:

- you current situation
- the problem you are noticing
- what you want to achieve

Best regards
Federico

Reply all
Reply to author
Forward
0 new messages