Project

General

Profile

Actions

Bug #3078

closed

Les valeurs HK_LFR_CPU_LOAD, HK_LFR_CPU_LOAD_MAX et HK_LFR_CPU_LOAD_AVE sont erronées dans FSW <=3.2.0.18

Added by bruno katra about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
High
Category:
Next
Target version:
-
Start date:
24/08/2018
Due date:
% Done:

100%

Estimated time:
Spent time:
revision:
r0

Description

Contexte :
FSW <= 3.2.0.18

Suite à la correction/modification du calcul du CPU load par Alexis dans FSW >=3.2.0.17, les valeurs apparaissant dans le GSE sont incohérentes i.e. >> 100 (255, 192, ...) or le CPU load devrait être compris entre 0 et 100. La revue du code 3.2.0.18 par inspection confirme cela : Alexis (et Paul avant ça) sont censé renvoyer des valeurs entières entre 0 et 100 (CONST_100 - ival où ival est un entier compris normalement entre 0 et 100).

Il apparait de fait que le bug doit exister depuis le début pour toutes les versions du logiciel mais l'ancienne configuration (<=3.2.0.15) sans la tache de scrubbing faisait que les valeurs du CPU load (déjà fausses) se retrouvaient entre 0 et 100 et cohérentes avec les valeurs relevés pour le budget avec la sortie série (option --cpu-usage-report du FSW).

Autre problème : l'ICD dit bien que ces champs HK sont des unsigned char et qu'il faut leur appliquer une fonction de transfert (bijection de [0,255] vers [0,100]) : c'est ce que font les scripts de validation de Gerald/Vero :
tmp += (
"HK_LFR_CPU_LOAD=" + str(0.392156862745 * tm_ccsds26) + ', ' +
"HK_LFR_CPU_LOAD_MAX=" + str(0.392156862745 * tm_ccsds27) + ', ' +
"HK_LFR_CPU_LOAD_AVE=" + str(0.392156862745 * tm_ccsds28) + ', ')

DONC ce calcul est aussi faux car à priori les valeurs envoyées par Alexis/Paul sont <=100.

CONCLUSION : le calcul des CPU load est faux depuis toujours + il semblerait que Plasson attendent des valeurs 0-255.


Related issues

Related to Task #3081: Explication et mise à jour des infos de calcul des cpu load dans SRS, SDD et SUMClosedAlexis Jeandet28/08/2018

Actions
Actions #1

Updated by Alexis Jeandet about 6 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

Ça devrait être corrigé maintenant dans la version 3.2.0.19.
Build associé: https://hephaistos.lpp.polytechnique.fr/teamcity/viewLog.html?buildId=32923&buildTypeId=LfrFlightSoftware_BuildLpp&tab=artifacts

Testé sur un code simple l'utilisation CPU est calculée en prenant TAS2 comme référence.
Les valeurs affichées sont le pourcentage sur 255 et le 0.39 fois cette valeur, puis le tableau correspond à celui généré par la fonction RTEMS rtems_cpu_usage_report:

LFR CPU USAGE=143 55.770000
-------------------------------------------------------------------------------
                              CPU USAGE BY THREAD
------------+----------------------------------------+---------------+---------
 ID         | NAME                                   | SECONDS       | PERCENT
------------+----------------------------------------+---------------+---------
 0x09010001 | IDLE                                   |      0.461561 |  46.056
 0x0A010002 | TAS0                                   |      0.065323 |   6.518
 0x0A010003 | TAS1                                   |      0.031891 |   3.182
 0x0A010004 | TAS2                                   |      0.440381 |  43.943
 0x0A010005 | TAS3                                   |      0.002996 |   0.298
------------+----------------------------------------+---------------+---------
 TIME SINCE LAST CPU USAGE RESET IN SECONDS:                          1.002152
-------------------------------------------------------------------------------
LFR CPU USAGE=145 56.550000
-------------------------------------------------------------------------------
                              CPU USAGE BY THREAD
------------+----------------------------------------+---------------+---------
 ID         | NAME                                   | SECONDS       | PERCENT
------------+----------------------------------------+---------------+---------
 0x09010001 | IDLE                                   |      0.489245 |  48.819
 0x0A010002 | TAS0                                   |      0.044641 |   4.454
 0x0A010003 | TAS1                                   |      0.035004 |   3.492
 0x0A010004 | TAS2                                   |      0.430272 |  42.934
 0x0A010005 | TAS3                                   |      0.002996 |   0.298
------------+----------------------------------------+---------------+---------
 TIME SINCE LAST CPU USAGE RESET IN SECONDS:                          1.002158
-------------------------------------------------------------------------------
LFR CPU USAGE=168 65.520000
-------------------------------------------------------------------------------
                              CPU USAGE BY THREAD
------------+----------------------------------------+---------------+---------
 ID         | NAME                                   | SECONDS       | PERCENT
------------+----------------------------------------+---------------+---------
 0x09010001 | IDLE                                   |      0.571098 |  56.986
 0x0A010002 | TAS0                                   |      0.049568 |   4.946
 0x0A010003 | TAS1                                   |      0.038104 |   3.802
 0x0A010004 | TAS2                                   |      0.340399 |  33.966
 0x0A010005 | TAS3                                   |      0.002997 |   0.299
------------+----------------------------------------+---------------+---------
 TIME SINCE LAST CPU USAGE RESET IN SECONDS:                          1.002166
-------------------------------------------------------------------------------
LFR CPU USAGE=156 60.840000
-------------------------------------------------------------------------------
                              CPU USAGE BY THREAD
------------+----------------------------------------+---------------+---------
 ID         | NAME                                   | SECONDS       | PERCENT
------------+----------------------------------------+---------------+---------
 0x09010001 | IDLE                                   |      0.503674 |  50.258
 0x0A010002 | TAS0                                   |      0.069928 |   6.977
 0x0A010003 | TAS1                                   |      0.035251 |   3.517
 0x0A010004 | TAS2                                   |      0.390307 |  38.946
 0x0A010005 | TAS3                                   |      0.003005 |   0.299
------------+----------------------------------------+---------------+---------
 TIME SINCE LAST CPU USAGE RESET IN SECONDS:                          1.002165
-------------------------------------------------------------------------------
LFR CPU USAGE=130 50.700000
-------------------------------------------------------------------------------
                              CPU USAGE BY THREAD
------------+----------------------------------------+---------------+---------
 ID         | NAME                                   | SECONDS       | PERCENT
------------+----------------------------------------+---------------+---------
 0x09010001 | IDLE                                   |      0.438501 |  43.755
 0x0A010002 | TAS0                                   |      0.028965 |   2.890
 0x0A010003 | TAS1                                   |      0.041286 |   4.119
 0x0A010004 | TAS2                                   |      0.490408 |  48.935
 0x0A010005 | TAS3                                   |      0.002999 |   0.299
------------+----------------------------------------+---------------+---------
 TIME SINCE LAST CPU USAGE RESET IN SECONDS:                          1.002159
-------------------------------------------------------------------------------
LFR CPU USAGE=114 44.460000
-------------------------------------------------------------------------------
                              CPU USAGE BY THREAD
------------+----------------------------------------+---------------+---------
 ID         | NAME                                   | SECONDS       | PERCENT
------------+----------------------------------------+---------------+---------
 0x09010001 | IDLE                                   |      0.397555 |  39.669
 0x0A010002 | TAS0                                   |      0.030664 |   3.059
 0x0A010003 | TAS1                                   |      0.020369 |   2.032
 0x0A010004 | TAS2                                   |      0.550575 |  54.938
 0x0A010005 | TAS3                                   |      0.002994 |   0.298
------------+----------------------------------------+---------------+---------
 TIME SINCE LAST CPU USAGE RESET IN SECONDS:                          1.002157
-------------------------------------------------------------------------------
LFR CPU USAGE=138 53.820000
-------------------------------------------------------------------------------
                              CPU USAGE BY THREAD
------------+----------------------------------------+---------------+---------
 ID         | NAME                                   | SECONDS       | PERCENT
------------+----------------------------------------+---------------+---------
 0x09010001 | IDLE                                   |      0.488849 |  48.779
 0x0A010002 | TAS0                                   |      0.020492 |   2.044
 0x0A010003 | TAS1                                   |      0.029435 |   2.937
 0x0A010004 | TAS2                                   |      0.460387 |  45.939
 0x0A010005 | TAS3                                   |      0.003006 |   0.299
------------+----------------------------------------+---------------+---------
 TIME SINCE LAST CPU USAGE RESET IN SECONDS:                          1.002169
-------------------------------------------------------------------------------
LFR CPU USAGE=148 57.720000
-------------------------------------------------------------------------------
                              CPU USAGE BY THREAD
------------+----------------------------------------+---------------+---------
 ID         | NAME                                   | SECONDS       | PERCENT
------------+----------------------------------------+---------------+---------
 0x09010001 | IDLE                                   |      0.495099 |  49.403
 0x0A010002 | TAS0                                   |      0.052433 |   5.232
 0x0A010003 | TAS1                                   |      0.031210 |   3.114
 0x0A010004 | TAS2                                   |      0.420417 |  41.951
 0x0A010005 | TAS3                                   |      0.002998 |   0.299
------------+----------------------------------------+---------------+---------
 TIME SINCE LAST CPU USAGE RESET IN SECONDS:                          1.002157
-------------------------------------------------------------------------------
LFR CPU USAGE=86 33.540000
-------------------------------------------------------------------------------
                              CPU USAGE BY THREAD
------------+----------------------------------------+---------------+---------
 ID         | NAME                                   | SECONDS       | PERCENT
------------+----------------------------------------+---------------+---------
 0x09010001 | IDLE                                   |      0.268533 |  26.797
 0x0A010002 | TAS0                                   |      0.036078 |   3.600
 0x0A010003 | TAS1                                   |      0.033986 |   3.391
 0x0A010004 | TAS2                                   |      0.660564 |  65.919
 0x0A010005 | TAS3                                   |      0.002912 |   0.290
------------+----------------------------------------+---------------+---------
 TIME SINCE LAST CPU USAGE RESET IN SECONDS:                          1.002073
-------------------------------------------------------------------------------
LFR CPU USAGE=161 62.790000
-------------------------------------------------------------------------------
                              CPU USAGE BY THREAD
------------+----------------------------------------+---------------+---------
 ID         | NAME                                   | SECONDS       | PERCENT
------------+----------------------------------------+---------------+---------
 0x09010001 | IDLE                                   |      0.545230 |  54.400
 0x0A010002 | TAS0                                   |      0.054946 |   5.482
 0x0A010003 | TAS1                                   |      0.028805 |   2.874
 0x0A010004 | TAS2                                   |      0.370277 |  36.944
 0x0A010005 | TAS3                                   |      0.003001 |   0.299
------------+----------------------------------------+---------------+---------
 TIME SINCE LAST CPU USAGE RESET IN SECONDS:                          1.002259
-------------------------------------------------------------------------------

Actions #2

Updated by bruno katra about 6 years ago

  • Related to Task #3081: Explication et mise à jour des infos de calcul des cpu load dans SRS, SDD et SUM added
Actions #3

Updated by bruno katra about 6 years ago

  • Status changed from Feedback to Closed

Inspection code avec Alexis OK + lancement du FSW OK

Actions

Also available in: Atom PDF