Author image Zane C. Bowers-Hadley

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. At the time of writing, this is as below.

   States  Description
   Z       Zombie
   S       Sleep
   W       Wait
   R       Run

   Flags   Description
   O       Swapped Output
   E       Exiting
   s       Session Leader
   L       POSIX lock advisory
   +       has controlling terminal
   X       traced by a debugger
   F       being forked

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 proccs with a EGID set.

--egi

Invert the EGID set search.

--eu

Search for proccs with a EUID set.

--eui

Invert the EUID set search.

-f

Show minor faults.

-F

Show major faults.

-J

Show jail IDs.

-j <jids>

A comma seperated list of JIDs to search for.

--ji

Invert the JIDs earch.

--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 seperated 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 the ncps process as well.

--st <states>

A comma seperated list of states to search for.

--sti

Invert the state search.

--stats

Print some general states about CPU usage and memory usage.

-t <times>

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

--ti

Invert the time search.

--tty

Show TTYs.

-u <UIDs>

A comma seperated list of UIDs or usernames.

--ui

Invert the UID/username search.

-vs <VSZs>

A comma seperated 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 zombies 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.

    <
    <=
    >
    >=
    !

ENVIROMENTAL VARIABLES

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

Unless set to defined ands 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.