[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

albertel lon-capa-cvs-allow@mail.lon-capa.org
Sat, 17 Nov 2007 02:41:21 -0000


albertel		Fri Nov 16 21:41:21 2007 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - don't count public users into the user load avg
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.924 loncom/lonnet/perl/lonnet.pm:1.925
--- loncom/lonnet/perl/lonnet.pm:1.924	Tue Nov 13 17:19:53 2007
+++ loncom/lonnet/perl/lonnet.pm	Fri Nov 16 21:41:17 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.924 2007/11/13 22:19:53 albertel Exp $
+# $Id: lonnet.pm,v 1.925 2007/11/17 02:41:17 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -513,7 +513,6 @@
 }
 
 # ------------------------------------------ Find out current server userload
-# there is a copy in lond
 sub userload {
     my $numusers=0;
     {
@@ -521,7 +520,8 @@
 	my $filename;
 	my $curtime=time;
 	while ($filename=readdir(LONIDS)) {
-	    if ($filename eq '.' || $filename eq '..') {next;}
+	    next if ($filename eq '.' || $filename eq '..');
+	    next if ($filename =~ /publicuser_\d+\.id/);
 	    my ($mtime)=(stat($perlvar{'lonIDsDir'}.'/'.$filename))[9];
 	    if ($curtime-$mtime < 1800) { $numusers++; }
 	}