-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #85, move system monitoring to PSP #90
Conversation
* Initialize The System Monitor functions | ||
* -------------------------------------------------------- | ||
*/ | ||
int32 HS_SysMonInit(void) |
Check notice
Code scanning / CodeQL
Long function without assertion
return StatusCode; | ||
} | ||
|
||
void HS_SysMonCleanup(void) |
Check notice
Code scanning / CodeQL
Long function without assertion
* Obtain the System CPU utilization information | ||
* -------------------------------------------------------- | ||
*/ | ||
int32 HS_SysMonGetCpuUtilization(void) |
Check notice
Code scanning / CodeQL
Long function without assertion
* Initialize The System Monitor functions | ||
* -------------------------------------------------------- | ||
*/ | ||
int32 HS_SysMonInit(void) |
Check notice
Code scanning / CodeQL
Function too long
if (CFE_PSP_IODriver_Command(&Location, CFE_PSP_IODriver_SET_RUNNING, CFE_PSP_IODriver_U32ARG(0)) != | ||
CFE_PSP_SUCCESS) |
Check warning
Code scanning / CodeQL
Side effect in a Boolean expression
CFE_PSP_IODriver_Location_t Location; | ||
int32 StatusCode; | ||
|
||
if (CFE_PSP_IODriver_FindByName(HS_SYSTEM_MONITOR_DEVICE, &HS_AppData.SysMonPspModuleId) != CFE_PSP_SUCCESS) |
Check warning
Code scanning / CodeQL
Side effect in a Boolean expression
if (CFE_PSP_IODriver_Command(&Location, CFE_PSP_IODriver_SET_RUNNING, CFE_PSP_IODriver_U32ARG(1)) != | ||
CFE_PSP_SUCCESS) |
Check warning
Code scanning / CodeQL
Side effect in a Boolean expression
d1f67f2
to
d10569e
Compare
Removes all "Custom" routines from HS, and instead calls into PSP via the new iodriver mechanism. This is used to obtain average CPU utilization information rather than an idle task. This architecuture allows support for many more variables, such as per-cpu utilization information, temperature, fan speeds, and other health info. That is not implemented here, but could be added in the future.
d10569e
to
2adeaa2
Compare
Checklist (Please check before submitting)
Describe the contribution
Removes all "Custom" routines from HS, and instead calls into PSP via the new iodriver mechanism. This is used to obtain average CPU utilization information rather than an idle task.
This architecture allows support for many more variables, such as per-cpu utilization information, temperature, fan speeds, and other health info. That is not implemented here, but could be added in the future.
Fix #85
Testing performed
Monitor HS telemetry, vary system load and confirm
Expected behavior changes
No more idle task, system load should be reported correctly on multi-core systems.
System(s) tested on
Debian
Additional context
Only Linux is implemented thus far, will need to create an RTEMS and VxWorks variant - but that is only in PSP - HS does not change
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.