You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Windows doesn't have a load but a very similar function could be derived from System\Processor Queue Length.
Per http://www.teamquest.com/pdfs/whitepaper/ldavg1.pdf and http://www.teamquest.com/pdfs/whitepaper/ldavg2.pdf Linux uses this exact metric and calculates load at the OS level.
This query should return information that contains the ProcessorQueueLength, and then it can be averaged over time or left to the user to do that if they want in elasticsearch/kibana
var dst []Win32_PerfRawData_PerfOS_System
q := wmi.CreateQuery(&dst, "")
err := wmi.Query(q, &dst)
if err != nil {
return Win32_PerfRawData_PerfOS_System{}, errors.Wrap(err, "wmi query for Win32_PerfRawData_PerfOS_System failed")
}
if len(dst) != 1 {
return Win32_PerfRawData_PerfOS_System{}, errors.New("wmi query for Win32_PerfRawData_PerfOS_System failed")
}
return dst[0], nil```
I could be wrong about this function but something like this should expose the queue length.
The text was updated successfully, but these errors were encountered:
Windows doesn't have a load but a very similar function could be derived from System\Processor Queue Length.
Per http://www.teamquest.com/pdfs/whitepaper/ldavg1.pdf and http://www.teamquest.com/pdfs/whitepaper/ldavg2.pdf Linux uses this exact metric and calculates load at the OS level.
This query should return information that contains the ProcessorQueueLength, and then it can be averaged over time or left to the user to do that if they want in elasticsearch/kibana
The text was updated successfully, but these errors were encountered: