--- lib/PXElator/httpd.pm 2009/07/31 14:42:45 77 +++ lib/PXElator/httpd.pm 2009/07/31 17:43:38 87 @@ -111,7 +111,9 @@ return qq|$daemon pid $pid started|; } elsif ( defined $pid ) { # child - my $eval = $daemon . '::start(' . ( @_ ? dump(@_) : '' ) . ')'; + my $invoke = 'start'; + $invoke = $1 if $daemon =~ s{/(.+)}{}; + my $eval = $daemon . '::' . $invoke . '(' . ( @_ ? dump(@_) : '' ) . ')'; warn "eval $eval"; eval $eval; warn "can't start $daemon: $@" if $@; @@ -147,27 +149,34 @@ my $debug_proc; - warn 'pids: ', dump( $pids ); - foreach my $name ( keys %$pids ) { + warn 'pids: ', dump( $pids ) if $debug; + foreach my $name ( sort keys %$pids ) { my $pid = $pids->{$name} || next; my $html = qq|$pid|; - if ( $debug ) { - $html .= qq| ?|; + my $proc = "/proc/$pid/status"; - my $proc = "/proc/$pid/status"; - $debug_proc - .= qq|$proc
| - . read_file($proc) - . qq|| - if -e $proc; + if ( -e $proc ) { + if ( $debug ) { + $html .= qq| ?|; + + $debug_proc + .= qq|$proc
| + . read_file($proc) + . qq|| + ; + } + + if ( $name->can('start_options') ) { + $html .= qq| $_| foreach $name->start_options; + } } push @rows, ( $name => $html ); } - warn 'static_pids: ', dump( $static_pids ); + warn 'static_pids: ', dump( $static_pids ) if $debug; foreach my $pid ( keys %$static_pids ) { my $path = $static_pids->{$pid}; if ( -d "/proc/$pid" ) { @@ -188,11 +197,11 @@ warn $@ if $@; print $client $redirect, qq|$1 = $2