Linux::Perl::prlimit
my ($soft, $hard) = Linux::Perl::prlimit->get( 0, Linux::Perl::prlimit::NUMBER()->{'NPROC'} ); my ($old_soft, $old_hard) = Linux::Perl::prlimit->get( 0, Linux::Perl::prlimit::NUMBER()->{'NPROC'}, $new_soft, $new_hard, );
This module provides access to Linux’s facility for getting and setting an arbitrary process’s rlimits.
Equivalent to the kernel’s RLIM_INFINITY constant.
A list of resource names, e.g., CPU. (cf. man 2 prlimit)
CPU
man 2 prlimit
A reference to a hash that correlates resource name (e.g., FSIZE) to number.
FSIZE
Fetches an individual resource limit. Must be called in list context.
Sets an individual resource limit. If called in list context will return the old soft/hard limits. Must not be called in scalar context.
To install Linux::Perl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Linux::Perl
CPAN shell
perl -MCPAN -e shell install Linux::Perl
For more information on module installation, please visit the detailed CPAN module installation guide.