Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP4:Update
pacemaker.34782
0001-Fix-extra-resources-SysInfo.in-This-calcul...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Fix-extra-resources-SysInfo.in-This-calculation-of-c.patch of Package pacemaker.34782
From 69351640f19b9984fc50aedd3bafa53c53ce6552 Mon Sep 17 00:00:00 2001 From: liupei <liupei@kylinos.cn> Date: Wed, 15 Mar 2023 17:12:54 +0800 Subject: [PATCH] Fix: extra/resources/SysInfo.in: This calculation of cpu_load returns an incorrect value in Darwin and Linux --- extra/resources/SysInfo.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/resources/SysInfo.in b/extra/resources/SysInfo.in index 80bcde0a1..5c2c7c704 100755 --- a/extra/resources/SysInfo.in +++ b/extra/resources/SysInfo.in @@ -182,7 +182,7 @@ SysInfoStats() { cpu_type=$(system_profiler SPHardwareDataType | awk -F': ' '/^CPU Type/ {print $2; exit}') cpu_speed=$(system_profiler SPHardwareDataType | awk -F': ' '/^CPU Speed/ {print $2; exit}') cpu_cores=$(system_profiler SPHardwareDataType | awk -F': ' '/^Number Of/ {print $2; exit}') - cpu_load=$(uptime | awk '{ print $10 }') + cpu_load=$(uptime | awk -F 'load average: ' '{ print $2 }' | awk -F ', ' '{ print $2 }') ;; "FreeBSD") cpu_type=$(sysctl -in hw.model) @@ -203,7 +203,7 @@ SysInfoStats() { cpu_speed=$(awk -F': ' '/bogomips/ {print $2; exit}' /proc/cpuinfo) cpu_cores=$(grep "^processor" /proc/cpuinfo | wc -l) fi - cpu_load=$(uptime | awk '{ print $10 }') + cpu_load=$(uptime | awk -F 'load average: ' '{ print $2 }' | awk -F ', ' '{ print $2 }') if [ -f /proc/meminfo ]; then # meminfo results are in kB -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor