If you can reproduce it at least some times, I have some suggestions:
- hack the script to only run if you login as a certain user. In that way, you can trigger it by logging in as, say, "ubuntu", and don't run if you login as someone else. Something like this (untested):
--- /usr/share/landscape/landscape-sysinfo.wrapper 2012-06-13 18:10:15.000000000 -0300
+++ landscape-sysinfo.wrapper 2012-07-18 09:21:29.868717152 -0300
@@ -2,6 +2,10 @@
cores=$(grep -c ^processor /proc/cpuinfo 2>/dev/null)
[ "$cores" -eq "0" ] && cores=1
threshold="${cores:-1}.0"
+if [ "$USER" = "safeuser" ]; then
+ echo "Not running landscape-sysinfo because logging in as user 'safeuser'"
+ exit 0
+fi
if [ $(echo "`cut -f1 -d ' ' /proc/loadavg` < $threshold" | bc) -eq 1 ]; then
echo
echo -n " System information as of "
Then you can observe what happens when it stalls.
You could also use the above plus strace the landscape-sysinfo script, but that *may* prevent the bug from happening. Something like this:
--- /usr/share/landscape/landscape-sysinfo.wrapper 2012-06-13 18:10:15.000000000 -0300
+++ landscape-sysinfo.wrapper 2012-07-18 09:22:56.466115731 -0300
@@ -2,12 +2,16 @@
cores=$(grep -c ^processor /proc/cpuinfo 2>/dev/null)
[ "$cores" -eq "0" ] && cores=1
threshold="${cores:-1}.0"
+if [ "$USER" = "safeuser" ]; then
+ echo "Not running landscape-sysinfo because logging in as user 'safeuser'"
+ exit 0
+fi
if [ $(echo "`cut -f1 -d ' ' /proc/loadavg` < $threshold" | bc) -eq 1 ]; then
echo
echo -n " System information as of "
/bin/date
echo
- /usr/bin/landscape-sysinfo
+ strace -f -o /tmp/sysinfo.strace /usr/bin/landscape-sysinfo
else
echo
echo " System information disabled due to load higher than $threshold"
If you can reproduce it at least some times, I have some suggestions:
- hack the script to only run if you login as a certain user. In that way, you can trigger it by logging in as, say, "ubuntu", and don't run if you login as someone else. Something like this (untested):
--- /usr/share/ landscape/ landscape- sysinfo. wrapper 2012-06-13 18:10:15.000000000 -0300 sysinfo. wrapper 2012-07-18 09:21:29.868717152 -0300 "${cores: -1}.0"
+++ landscape-
@@ -2,6 +2,10 @@
cores=$(grep -c ^processor /proc/cpuinfo 2>/dev/null)
[ "$cores" -eq "0" ] && cores=1
threshold=
+if [ "$USER" = "safeuser" ]; then
+ echo "Not running landscape-sysinfo because logging in as user 'safeuser'"
+ exit 0
+fi
if [ $(echo "`cut -f1 -d ' ' /proc/loadavg` < $threshold" | bc) -eq 1 ]; then
echo
echo -n " System information as of "
Then you can observe what happens when it stalls.
You could also use the above plus strace the landscape-sysinfo script, but that *may* prevent the bug from happening. Something like this:
--- /usr/share/ landscape/ landscape- sysinfo. wrapper 2012-06-13 18:10:15.000000000 -0300 sysinfo. wrapper 2012-07-18 09:22:56.466115731 -0300 "${cores: -1}.0" landscape- sysinfo landscape- sysinfo
+++ landscape-
@@ -2,12 +2,16 @@
cores=$(grep -c ^processor /proc/cpuinfo 2>/dev/null)
[ "$cores" -eq "0" ] && cores=1
threshold=
+if [ "$USER" = "safeuser" ]; then
+ echo "Not running landscape-sysinfo because logging in as user 'safeuser'"
+ exit 0
+fi
if [ $(echo "`cut -f1 -d ' ' /proc/loadavg` < $threshold" | bc) -eq 1 ]; then
echo
echo -n " System information as of "
/bin/date
echo
- /usr/bin/
+ strace -f -o /tmp/sysinfo.strace /usr/bin/
else
echo
echo " System information disabled due to load higher than $threshold"