SapMachine #2392: Add load average to vitals - #2409
Conversation
… the code to handle wanting to add a long term sample without havin it.
|
Hello @schmelter-sap, this pull request fulfills all formal requirements. |
|
Ohh nooo, AIX fails to compile! But I see a commit dealing with AIX so I wonder if this is already fixed?? |
I think there is no getloadavg() on AIX. Isn't it? Have to use perfstat_cpu_total. |
There is an implementation for os::loadavg() on aix at least. And that's what I wanted to use, but the "os" part is missing. |
|
Hello @schmelter-sap, this pull request fulfills all formal requirements. |
|
The column is named |
|
From the info I find, the PDH stuff (e.g. PROCESSOR_TIME) might be localized. https://github.com/openjdk/jdk/blob/af4116009d8567aab8f23a04fc79e801b52f60d4/src/hotspot/os/windows/os_perf_windows.cpp#L71 (there are also english-name counter functions, maybe those help too to get around issues on non-english Windows https://learn.microsoft.com/en-us/windows/win32/api/pdh/nf-pdh-pdhaddenglishcounterw) |
According to the SAPJVM code this doesn't matter from Vista onward. But I can test it on my machine. |
|
Maybe the comments in os_perf_windows about this localization stuff Fun side fact , if the docu is correct, the language neutral helper PdhAddEnglishCounterW https://learn.microsoft.com/en-us/windows/win32/api/pdh/nf-pdh-pdhaddenglishcounterw |
Ups, that is the initial description. I later changed to do indicate it covers the sample interval of the table. |
Good question. It doesn't seem to make sense. I will switch to PdhAddEnglishCounterW. Edit: |
The change adds a load average value for all operating systems.
It only uses one value as the load average which tries to be specific for the sample interval of vitals. For the long term values the load average is defined as the short term values averaged over the sample interval of the long term table.
This change adds the ability to use different values for entries in the long term table. Until now that value in the long term table is just the same as in the short term table for the given timestamp. This is OK for some types of values but, for others a value which more represents the sample interval of the long term table might be better.
We also split up the initialization of the vitals system into two phases, since we don't want to start the sampler thread until the himem report system is initialized too (otherwise there is a race condition).
And finally some traces were improved.
fixes #2392