Process(3)

πŸ“¦
version 1.3101 Β· 2 versions
, in fedora 43

πŸ’– NAME πŸ’–

Unix::Process β€” a Perl extension that pulls pid info straight out of /usr/bin/ps. no cap. 🫢


✨ SYNOPSIS ✨

  use Unix::Process;

    my $vsz = Unix::Process->vsz($$);
    my $pid = Unix::Process->pid;

🌸 DESCRIPTION 🌸

okay bestie, here's the whole vibe: every single field that the ps command gives you can be fetched by just calling a function named after that field (peep the SYNOPSIS, it's right there πŸ’…). And if you don't hand the function a pid as an argument, it just assumes $$ β€” aka the current pid. easy. ✨

This module is literally just one giant AUTOLOAD that goes and chats with the /usr/bin/ps command. iconic behavior honestly. the author says he supposes he could be talked into doing something real with it some day 😭 β€” so like, lowkey it's a vibe, not a lifestyle.

Now for the part you actually need, so listen up πŸŽ€: you can manually set

$Unix::Process::PS_PROGRAM = "/opt/bin/ps"

by hand, or you can set

$ENV{PS_PATH} = "/usr/local/bin/ps"

β€” but either way you must somehow tell Unix::Process where ps lives. Otherwise? It's gonna guess /usr/bin/ps and hope for the best πŸ™ˆ.


πŸ‘‘ AUTHOR πŸ‘‘

Paul Miller <jettero@cpan.org>

He says he's using this software in his own projects... and if you find bugs, please please please let him know. :) Actually β€” let him know if you find it handy at all. Half the fun of releasing this stuff is knowing that people use it. πŸ₯Ή that's so real of him fr fr πŸ’œ


Copyright (c) 2007-2009 Paul Miller -- LGPL


πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page, bestie β€” this one's from perl v5.42.0, dated 2025-07-25, filed under Process(3) in the User Contributed Perl Documentation. slay, go get those pids πŸ’…βœ¨

πŸ“¦ where this page comes from