1 package System::Introspector::Processes;
4 use System::Introspector::Util qw(
9 # args is automatically included, since it has to be last
46 my @names = (@Included, 'args');
47 return transform_exceptions {
48 my $pipe = $self->_open_ps_pipe;
50 $spec =~ s{(?:^\s+|\s+$)}{}g;
51 my @fields = map lc, split m{\s+}, $spec;
53 while (defined( my $line = <$pipe> )) {
55 $line =~ s{(?:^\s+|\s+$)}{}g;
56 my @values = split m{\s+}, $line, scalar @fields;
58 @row{ @names } = @values;
61 return { processes => \@rows };
67 return handle_from_command sprintf
69 join(',', @Included, 'args');
78 System::Introspector::Processes - Gather running processes
82 Uses C<ps> to gather a list of all running processes.
88 =item L<System::Introspector>