Public bug reported:

Binary package hint: update-motd

Hi,
The following issue applies to any recent Ubuntu distribution and architecture:

I have made an observation regarding the calculation of the system load within 
the update-motd package:
When I was logging in to my 12-core /12GB RAM Server I got the message "System 
information disabled due to load higher then 1"
But when I checked the system with top or htop barely 2 cores where occupied.
So I investigated the code in /etc/update-motd/50-landscape-sysinfo.
Next I informed myself about the calculation of the sysload and it's meaning.
Apparently, a load average of 1.0 means, that means that 1 CPU has been fully 
occupied during the measuring period of 1/5/15 minutes...
So, on a 12 core machine a load of 1.0 is no danger and indicator for resource 
shortage.
Therefor I have added some lines to  /etc/update-motd/50-landscape-sysinfo:

#!/bin/sh

cput=`cat /proc/cpuinfo |grep processor|wc -l`
cpuc=`echo "scale=0;$cput/2"| bc -l`

#echo cpucores: $cpuc
#exit

if [ $(echo "`cut -f1 -d ' ' /proc/loadavg` < $cpuc.0" | bc) -eq 1 ]; then
    echo
    echo -n "  System information as of "
    /bin/date
    echo
    /usr/bin/landscape-sysinfo
else
    echo
    echo " System information disabled due to load higher than CPU Core-Count 
$cpuc"
fi


Maybe I'm totaly wrong about my theory, then please teach me otherwise, else, 
maybe it's worth to publish it?

Regards,
Felix

** Affects: update-motd (Ubuntu)
     Importance: Undecided
         Status: New

-- 
evaluation from the systemload on multiprocessor machines in 
50-landscape-sysinfo
https://bugs.launchpad.net/bugs/675245
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to