Take into account number of cores when deciding whether to display or not sysinfo

Bug #643565 reported by Andreas Hasenack
46
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Landscape Client
Fix Released
Low
Andreas Hasenack
landscape-client (Ubuntu)
Fix Released
Undecided
Unassigned
Karmic
Won't Fix
Undecided
Unassigned
Lucid
Fix Released
Undecided
Unassigned
Maverick
Fix Released
Undecided
Unassigned
Changed in landscape-client:
assignee: nobody → Andreas Hasenack (ahasenack)
Changed in landscape-client:
milestone: 1.5.6 → 1.6.0
Revision history for this message
Javier Sánchez (javiersm) wrote :

I think including the message "System information disabled due to load higher than 1" in the bug description would help to find this bug.

Revision history for this message
Mike Uchima (uchima) wrote :

Even a load equal to the number of cores is not particularly "high". I would argue for changing the threshold to the number of cores scaled by some hard-wired factor. E.g. if the scale factor is 2, the message is not suppressed on a quad-core system until the load reaches 8.

Changed in landscape-client:
milestone: 1.6.0 → 10.11
Revision history for this message
Dean Gardiner (gardiner91) wrote :

I would also like to see this fixed on my Core i7 Server which has 4 physical, 4 virtual cores (8 cores total) a load of 2 is too high for it to display the System Information.

Changed in landscape-client:
milestone: 10.11 → 10.12
Jamu Kakar (jkakar)
Changed in landscape-client:
milestone: 10.12 → later
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hey guys, what about this then:

"""
=== modified file 'debian/landscape-sysinfo.wrapper' (properties changed: -x to +x)
--- debian/landscape-sysinfo.wrapper 2010-07-23 08:28:59 +0000
+++ debian/landscape-sysinfo.wrapper 2011-01-12 22:18:56 +0000
@@ -1,5 +1,7 @@
 #!/bin/sh
-if [ $(echo "`cut -f1 -d ' ' /proc/loadavg` < 1.0" | bc) -eq 1 ]; then
+cores=$(grep -c ^processor /proc/cpuinfo 2>/dev/null)
+threshold="${cores:-1}.0"
+if [ $(echo "`cut -f1 -d ' ' /proc/loadavg` < $cores" | bc) -eq 1 ]; then
     echo
     echo -n " System information as of "
     /bin/date
@@ -7,5 +9,5 @@
     /usr/bin/landscape-sysinfo
 else
     echo
- echo " System information disabled due to load higher than 1"
+ echo " System information disabled due to load higher than $threshold"
 fi
"""

It just uses the number of cores, which is a good start. I don't want to get too fancy here, as doing heavy things at login time was what prompted the original bug in the first place.

Changed in landscape-client:
milestone: later → 11.01
status: New → In Progress
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hmm, I thought the lines wouldn't get wrapper. Here is an attachment version of the patch.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Oops, small mistake in the previous patch. Here is the new version.

Changed in landscape-client:
status: In Progress → Fix Committed
tags: added: needs-testing
Changed in landscape-client (Ubuntu):
status: New → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted landscape-client into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in landscape-client (Ubuntu Lucid):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted landscape-client into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in landscape-client (Ubuntu Maverick):
status: New → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted landscape-client into karmic-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in landscape-client (Ubuntu Karmic):
status: New → Fix Committed
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Accepted landscape-client into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Accepted landscape-client into karmic-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Martin Pitt (pitti) wrote :

This package has been in karmic-proposed for some time without verification. I removed it as karmic is end-of-life now.

Changed in landscape-client (Ubuntu Karmic):
status: Fix Committed → Won't Fix
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Verified fixed in the lucid and maverick packages currently in proposed:
- 11.02-0ubuntu0.10.04.1
- 11.02-0ubuntu0.10.10.1

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package landscape-client - 11.02-0ubuntu0.10.10.1

---------------
landscape-client (11.02-0ubuntu0.10.10.1) maverick-proposed; urgency=low

  * debian/control, debian/rules: Add quilt
  * debian/patches/fix-landscape-monitor.patch: Fix landscape
    monitoring with gir1.0-gudev-1.0 installed. (LP: #747498)

landscape-client (11.02-0ubuntu0.10.10.0) maverick-proposed; urgency=low

  * New upstream version (LP: #727324)

    - Exit gracefully instead of crashing when the filesystem is
      read-only (LP: #649997).

    - Drop hal requirement (LP: #708502).

    - Enable HTTP compression in Curl (LP: #297623).

    - Explicitly name log files that need to be rotated (LP: #634236).

    - Assorted test suite fixes

    - Use a better load check for the sysinfo wrapper, taking into account the
      number of cores (LP: #643565).

    - Add an option to bootstrap cloud instances using cloud-init
      (LP: #701972).

    - Fix packaging for Natty (LP: #688115).

    - Force deletion of all the persist data for the monitoring plugins at
      resynchronization, instead of relying each one of them to do
      (LP: #688161).

    - Don't send the mount-activity message to the server anymore
      (LP: #688514).

    - Workaround a new behavior in NetworkManager where getfqdn would report
      localhost instead of useful hostname (LP: #649142).

landscape-client (1.5.5.1-0ubuntu0.10.10.0) maverick; urgency=low

  * The client network plugin would send erroneous data if a network
    interface was removed (and its kernel module removed as well) and
    then readded (LP: #641264).
 -- Chuck Short <email address hidden> Tue, 12 Apr 2011 13:56:38 -0400

Changed in landscape-client (Ubuntu Maverick):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package landscape-client - 11.02-0ubuntu0.10.04.1

---------------
landscape-client (11.02-0ubuntu0.10.04.1) lucid-proposed; urgency=low

  * debian/control, debian/rules: Add quilt
  * debian/patches/fix-landscape-monitor.patch: Fix landscape:
    monitoring with gir1.0-gudev-1.0 installed. (LP: #747498)

landscape-client (11.02-0ubuntu0.10.04.0) lucid-proposed; urgency=low

  * New upstream version (LP: #727324)

    - Exit gracefully instead of crashing when the filesystem is
      read-only (LP: #649997).

    - Drop hal requirement (LP: #708502).

    - Enable HTTP compression in Curl (LP: #297623).

    - Explicitly name log files that need to be rotated (LP: #634236).

    - Assorted test suite fixes

    - Use a better load check for the sysinfo wrapper, taking into account the
      number of cores (LP: #643565).

    - Add an option to bootstrap cloud instances using cloud-init
      (LP: #701972).

    - Fix packaging for Natty (LP: #688115).

    - Force deletion of all the persist data for the monitoring plugins at
      resynchronization, instead of relying each one of them to do
      (LP: #688161).

    - Don't send the mount-activity message to the server anymore
      (LP: #688514).

    - Workaround a new behavior in NetworkManager where getfqdn would report
      localhost instead of useful hostname (LP: #649142).
 -- Chuck Short <email address hidden> Tue, 12 Apr 2011 14:38:20 -0400

Changed in landscape-client (Ubuntu Lucid):
status: Fix Committed → Fix Released
Changed in landscape-client:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.