IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29107


Ignore:
Timestamp:
Sep 1, 2010, 4:57:14 PM (16 years ago)
Author:
Serge CHASTEL
Message:

Bug fixes. Need some feedback now

Location:
trunk/tools/who_uses_the_cluster
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/who_uses_the_cluster/_who_uses_the_cluster.sh

    r29102 r29107  
    4646    echo "########### $computer ###########" >> $LOGFILE
    4747#    /usr/bin/ssh $computer 'setenv TERM xterm; top -d 3 -b -n 5 -i -c' >> $LOGFILE 2> /dev/null &
    48     /usr/bin/ssh $computer 'setenv COLUMNS 300; top -d 3 -b -n 5 -i -c' >> $LOGFILE 2> /dev/null &
     48    /usr/bin/ssh $computer 'setenv TERM xterm; setenv COLUMNS 1000; top -d 3 -b -n 5 -c -i' >> $LOGFILE 2> /dev/null &
    4949done
    5050
  • trunk/tools/who_uses_the_cluster/_who_uses_the_cluster_analyze.pl

    r29105 r29107  
    3939                # We don't want the 'top' process to be shown
    4040                $line  =~ s/\s+/;/g;
    41                 print "$line\n";
    4241                $line =~ s/^;//g;
     42                # print "$line\n";
    4343                @values = split ';', $line;
    4444                $pid = $values[0];
     45                #print $pid, "\n";
    4546                $username = $values[1];
    4647                $proc =$values[8];
    4748                $mem =$values[9];
    4849                $size = scalar(@values);
    49                 $procname = join(" ", @values[11..$size]); #$values[11..-1];
    50                 #print "$size PROCNAME = [$procname]\n";
     50                #$procname = $values[11];
     51                $fullprocname = "";
     52                #print "$procname \n";
     53                for ($i=11;$i<$size;$i++) {
     54                        $fullprocname = $fullprocname.$values[$i]." ";
     55                }
    5156                if (!defined $summary{$pid}) {
    5257                    # The pid is a new one
     
    5560                    $summary{$pid}{"proc"} = $proc;
    5661                    $summary{$pid}{"memory"} = $mem;
    57                     $summary{$pid}{"procname"} = $procname;
     62                    $summary{$pid}{"procname"} = $fullprocname;
    5863                } else {
    59                     # The pid is a new onehas already been observed
    60                     if ($summary{$pid}{"procname"} eq $procname) {
     64                    # The pid has already been observed
     65                    # print "The pid has already been observed\n";
     66                    #if ($summary{$pid}{"procname"} eq $procname) {
    6167                        $before = $summary{$pid}{"count"};
    6268                        $summary{$pid}{"count"}++;
     
    6773                        $summary{$pid}{"memory"} = $ratio *
    6874                            $summary{$pid}{"memory"} + $proc / $after;
    69                     }
     75                    #}
    7076                }
    7177            }
     
    7985        $onceShown = 0;
    8086        while ( my ($pid, $value) = each(%summary) ) {
     87                # print $value->{"count"} , " ", $pid, "\n";
    8188            if ($value->{"count"} > 1) {
     89                #print "Ok\n";
    8290                $onceShown = 1;
    8391                printf("<tr>\n");
Note: See TracChangeset for help on using the changeset viewer.