Browse Source

add EUID set search

master
Zane C. B-H 2 years ago
parent
commit
155bedbdce
  1. 21
      Proc-ProcessTable-ncps/bin/ncps

21
Proc-ProcessTable-ncps/bin/ncps

@ -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;

Loading…
Cancel
Save