NAME
App::ppgrep - Look up parents' processes based on name and other attributes
VERSION
This document describes version 0.033 of App::ppgrep (from Perl distribution App-ppgrep), released on 2019-11-29.
SYNOPSIS
See included script ppgrep.
FUNCTIONS
ppgrep
Usage:
ppgrep(%args) -> [status, msg, payload, meta]
Look up parents' processes based on name and other attributes.
This utility is similar to pgrep except that we only look at our descendants (parent, parent's parent, and so on up to PID 1).
This function is not exported.
Arguments ('*' denotes required arguments):
count => true
Suppress normal output; instead print a count of matching processes.
euid => array[str]
Only match processes whose effective user ID is listed. Either the numerical or symbolical value may be used.
exact => true
Only match processes whose names (or command line if -f is specified) exactly match the pattern.
full => true
The pattern is normally only matched against the process name. When -f is set, the full command line is used.
group => array[str]
Only match processes whose real group ID is listed. Either the numerical or symbolical value may be used.
inverse => true
Negates the matching.
list_full => true
List the full command line as well as the process ID.
list_name => true
List the process name as well as the process ID.
pattern => str
Only match processes whose name/cmdline match the pattern.
pgroup => array[uint]
Only match processes in the process group IDs listed.
session => array[uint]
Only match processes whose process session ID is listed.
terminal => array[str]
Only match processes whose controlling terminal is listed. The terminal name should be specified without the "/dev/" prefix.
uid => array[str]
Only match processes whose user ID is listed. Either the numerical or symbolical value may be used.
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (payload) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information.
Return value: (any)
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/App-ppgrep.
SOURCE
Source repository is at https://github.com/perlancar/perl-App-ppgrep.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-ppgrep
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
SEE ALSO
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2019 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.