add EUID set search

This commit is contained in:
Zane C. B-H 2019-08-22 23:22:12 -05:00
parent e16b93a1bc
commit 155bedbdce
1 changed files with 19 additions and 2 deletions

View File

@ -19,8 +19,8 @@ sub help{
--cF Show children major faults.
-m <pctmem> Memory usage percent to search for.
--mi Invert the memory usage search.
--eu Search for proccs witha EUID set.
--eui Invert the EUID search.
-f Show minor faults.
@ -30,6 +30,9 @@ sub help{
-j <jids> A comma seperated list of JIDs to search for.
--ji Invert the JIDs earch.
-m <pctmem> Memory usage percent to search for.
--mi Invert the memory usage search.
-n Show number of threads.
--nc disable color.
@ -99,6 +102,7 @@ my $jids_string;
my $jids_invert=0;
my $uids_string;
my $uids_invert=0;
my $euid=0;
# get the commandline options
Getopt::Long::Configure ('no_ignore_case');
@ -139,6 +143,7 @@ GetOptions(
'ji' => \$jids_invert,
'u=s' => \$uids_string,
'ui' => \$uids_invert,
'eu' => \$euid,
);
# print the version info if requested
@ -292,6 +297,18 @@ if ( defined( $uids_string ) ){
});
}
#
# handles the EUID set search
#
if ( $euid ){
push( @filters, {
type=>'EUIDset',
invert=>$uids_invert,
args=>{
},
});
}
# XOR common boolean CLI flags
if ( defined( $ENV{NCPS_jid} ) ){
$jid = $jid ^ 1;