~ubuntu-branches/ubuntu/lucid/landscape-client/lucid-updates

« back to all changes in this revision

Viewing changes to debian/landscape-sysinfo.wrapper

  • Committer: Package Import Robot
  • Author(s): Andreas Hasenack
  • Date: 2012-04-10 14:28:48 UTC
  • mfrom: (1.1.27)
  • mto: This revision was merged to the branch mainline in revision 35.
  • Revision ID: package-import@ubuntu.com-20120410142848-7xsy4g2xii7y7ntc
ImportĀ upstreamĀ versionĀ 12.04.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
cores=$(grep -c ^processor /proc/cpuinfo 2>/dev/null)
 
3
[ "$cores" -eq "0" ] && cores=1
 
4
threshold="${cores:-1}.0"
 
5
if [ $(echo "`cut -f1 -d ' ' /proc/loadavg` < $threshold" | bc) -eq 1 ]; then
 
6
    echo
 
7
    echo -n "  System information as of "
 
8
    /bin/date
 
9
    echo
 
10
    /usr/bin/landscape-sysinfo
 
11
else
 
12
    echo
 
13
    echo " System information disabled due to load higher than $threshold"
 
14
fi