[LON-CAPA-cvs] cvs: loncom /auth lonlogin.pm

www www@source.lon-capa.org
Thu, 02 Sep 2010 09:24:42 -0000


www		Thu Sep  2 09:24:42 2010 EDT

  Modified files:              
    /loncom/auth	lonlogin.pm 
  Log:
  Don't show "User Load: 0.00 percent" if there is no maximum load configured. That looks like nobody is using the system.
  
  
  
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.144 loncom/auth/lonlogin.pm:1.145
--- loncom/auth/lonlogin.pm:1.144	Thu Aug 26 14:16:23 2010
+++ loncom/auth/lonlogin.pm	Thu Sep  2 09:24:42 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Login Screen
 #
-# $Id: lonlogin.pm,v 1.144 2010/08/26 14:16:23 bisitz Exp $
+# $Id: lonlogin.pm,v 1.145 2010/09/02 09:24:42 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -131,6 +131,7 @@
     }
     my $role    = $r->dir_config('lonRole');
     my $loadlim = $r->dir_config('lonLoadLim');
+    my $uloadlim= $r->dir_config('lonUserLoadLim');
     my $servadm = $r->dir_config('lonAdmEMail');
     my $tabdir  = $r->dir_config('lonTabDir');
     my $include = $r->dir_config('lonIncludes');
@@ -151,7 +152,9 @@
     }
     $loadavg =~ s/\s.*//g;
     my $loadpercent=sprintf("%.1f",100*$loadavg/$loadlim);
+    unless ($loadlim) { $loadpercent='---'; }
     my $userloadpercent=&Apache::lonnet::userload();
+    unless ($uloadlim) { $userloadpercent='---'; }
 
     my $firsturl=
     ($env{'request.firsturl'}?$env{'request.firsturl'}:$env{'form.firsturl'});