NAME

ncps - Searches the process table and displays the results.

SYNOPSIS

ncps [-c <regex>] [--ci] [--cf] [--cF] [--eg] [--egi] [-f] [-F] [-J] [-j <JIDs>] [--ji] [--idle] [--kern] [--kerni] [-m <pctmem>] [--mi] [-n] [--nc] [-p <pctcpu>] [--pi] [--pid <PIDs>] [--pidi] [-r <RSS>] [--ri] [-s] [--si] [--self] [--st <states>] [--sti] [--stats] [-t <times>] [--ti] [--tty] [-u <UIDs>] [--ui] [--vs <VSZs>] [--vsi] [-w <WChans>] [--wi] [-z]

DESCRIPTION

No flags needed passed to use. By default it will show all processes except for its own and the idle process.

The info column is provided by Proc::ProcessTable::InfoString. That POD has the information on what they all mean.

State and flag support varies by OS, FreeBSD having the fullest support. The ncps -h output describes the ones usable on the current OS, via "proc_infostring_describe" in Proc::ProcessTable::InfoString.

Switch availability also varies by OS. Switches requiring process table fields the OS does not support are not shown by ncps -h and will error if used.

SWITCHES

-c <regex>

Search procs using the matching regex.

--ci

Invert the command search.

--cf

Show children minor faults.

--cF

Show children major faults.

--eg

Search for procs with an EGID set.

--egi

Invert the EGID set search.

--eu

Search for procs with an EUID set.

--eui

Invert the EUID set search.

-f

Show minor faults.

-F

Show major faults.

-J

Show jail IDs.

-j <jids>

A comma separated list of JIDs to search for.

--ji

Invert the JIDs search.

--idle

Show the idle kernel process.

--kern

Searches for kernel processes.

--kerni

Invert the kernel process search.

-m <pctmem>

Memory usage percent to search for.

--mi

Invert the memory usage search.

-n

Show number of threads.

--nc

Disable color.

-p <pctcpu>

CPU usage percent to search for.

--pi

Invert the CPU usage search.

--pid <pids>

PIDs to search for.

--pidi

Invert the PID search.

-r <RSSs>

A comma separated list of RSS values to search for.

--ri

Invert the RSS search.

-s

Show swapped out procs.

--si

Invert the swapped out search.

--self

Show the ncps process as well.

--st <states>

A comma separated list of states to search for.

--sti

Invert the state search.

--stats

Print some general stats about CPU usage and memory usage.

-t <times>

A comma separated value of time, in seconds, to search for.

--ti

Invert the time search.

--tty

Show TTYs.

-u <UIDs>

A comma separated list of UIDs or usernames.

--ui

Invert the UID/username search.

--vs <VSZs>

A comma separated list of VSZs to search for.

--vsi

Invert the VSZ search.

-w <wchans>

A string search for wait channels.

--wi

Invert the wait channel search.

-z

Show zombie procs.

EQUALITIES

For the various switches above that can take numeric values, the equalities below can be used, by directly prepending them to the number.

<
<=
>
>=
!

ENVIRONMENTAL VARIABLES

The environmental variables below may be set to set the default for the flag in question.

Unless defined and set to 1, these will default to 0.

NCPS_jid

Sets the default for the -J flag.

NCPS_numthr

Sets the default for the -n flag.

NCPS_cmajflt

Sets the default for the --cF flag.

NCPS_majflt

Sets the default for the -F flag.

NCPS_cminflt

Sets the default for the --cf flag.

NCPS_minflt

Sets the default for the -f flag.

NCPS_tty

Sets the default for the --tty flag.

NCPS_self

Sets the default for the --self flag.

NCPS_idle

Sets the default for the --idle flag.

NO_COLOR

Don't colorize the output.

EXAMPLES

ncps -J -j 0 --ji

Display all processes with a jail ID other than zero.

ncps -c firefox --stats

Show all firefox processes and the stats for them.

ncps -F -f -cF -cf

Show all minor/major values for processes.

ncps -p '>1'

Show all processes using more than 1% of the CPU time.