/[pxelator]/lib/PXElator/httpd.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/PXElator/httpd.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 70 by dpavlin, Thu Jul 30 22:44:55 2009 UTC revision 71 by dpavlin, Thu Jul 30 22:55:08 2009 UTC
# Line 143  sub get_request { Line 143  sub get_request {
143                          'debug',        qq|<a href=/our/debug/| . boolean::toggle($debug) . qq|>$debug</a>|,                          'debug',        qq|<a href=/our/debug/| . boolean::toggle($debug) . qq|>$debug</a>|,
144                  );                  );
145    
146                    my $debug_proc;
147    
148                  warn 'pids: ', dump( $pids );                  warn 'pids: ', dump( $pids );
149                  foreach my $name ( keys %$pids ) {                  foreach my $name ( keys %$pids ) {
150                          my $pid = $pids->{$name} || next;                          my $pid = $pids->{$name} || next;
                         my $proc = "/proc/$pid/status";  
151    
152                          my $html = qq|<a href=/$name>$pid</a>|;                          my $html = qq|<a href=/$name>$pid</a>|;
153                          $html   .= qq|<pre style="font-size: 10%">|  
154                                          .  ( $debug && -e $proc ? read_file($proc) : '' )                          if ( $debug ) {
155                                          .  qq|</pre>| if $debug;                                  $html .= qq| <a name=$pid href=#proc-$pid>?</a>|;
156    
157                                    my $proc = "/proc/$pid/status";
158                                    $debug_proc
159                                            .= qq|<a name=proc-$pid href=#$pid>$proc</a><pre style="font-size: 10%">|
160                                            .  read_file($proc)
161                                            .  qq|</pre>|
162                                            if -e $proc;
163                            }
164    
165                          push @rows, ( $name => $html );                          push @rows, ( $name => $html );
166                  }                  }
# Line 166  sub get_request { Line 175  sub get_request {
175                          }                          }
176                  }                  }
177    
178                  print $client $ok, html::table( 2, @rows );                  print $client $ok, html::table( 2, @rows ), $debug_proc;
179    
180          } elsif ( $path =~ m{^/our/(\w+)/(\S+)} ) {          } elsif ( $path =~ m{^/our/(\w+)/(\S+)} ) {
181                  eval 'our $' . $1 . ' = ' . $2;                  eval 'our $' . $1 . ' = ' . $2;

Legend:
Removed from v.70  
changed lines
  Added in v.71

  ViewVC Help
Powered by ViewVC 1.1.26