jrgp / linfo

Linfo PHP Server Health Status
MIT License
360 stars 74 forks source link

CPU information concentration #115

Open Saentist opened 3 years ago

Saentist commented 3 years ago

Currently each tread report CPU name Linfo WebUI Screenshot imagine how many space take 2x of latest 64 core EPYC cpu's (256 lines )

Each page refresh show current core speed Is it possible to add some chart graph as https://canvasjs.com/php-charts/dynamic-live-multi-series-chart/

jrgp commented 3 years ago

You're totally right about the CPU core density. On the newer version of the machine in the screenshot you posted (Machina), it now has 32 threads up from 4. I'm not sure of a better way of displaying this information, as we show the unique speed of each thread.

image

You mentioned showing a graph of speeds over time with one line per thread with the graph's X axis. This is problematic as we can't rely on speed values for past page loads.

It is possible, however, to feed data (such as cpu speeds) from Linfo's JSON REST API into graphing/metrics solutions such as Grafana/Influx to get pretty graphs.

Saentist commented 3 years ago

No need to see so big array of data from graph just data need to be collected from time when page generated and add new value each 3 seconds with array of 20 values per core. Or let's say array to collect 20 values per 3 seconds = 1min graph per core. on page refresh all to start from begining if user stays more then 1 min old data to disappear

Saentist commented 3 years ago

About speed of cpu can be added info about steps avalivable in CPU ex:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
3600000 3200000 2800000 2400000 1900000 1400000

values are in Hz so 3600000/1000 = 3600MHz or 3600000/1000000 =3.6GHz

am not shure how PowerTop collect this information

            Package |            CPU 0
3.60 GHz     0.6%   | 3.60 GHz     0.1%
3.21 GHz     5.3%   | 3.21 GHz     0.2%
2.81 GHz    22.0%   | 2.81 GHz     1.3%
2.40 GHz    46.2%   | 2.40 GHz     2.1%
1.91 GHz    19.1%   | 1.91 GHz     0.5%
1400 MHz     0.0%   | 1400 MHz     0.0%
Idle         6.8%   | Idle        95.7%

                    |            CPU 1
                    | 3.60 GHz     0.6%
                    | 3.21 GHz     5.2%
                    | 2.81 GHz    21.5%
                    | 2.40 GHz    45.3%
                    | 1.91 GHz    18.7%
                    | 1400 MHz     0.0%
                    | Idle         8.6%