ControlTier > core
 

ps

Command Reference

Description

get process info

Obtains and prints process table information.

The following pieces of information are shown for each running process:

  • user: user name
  • command: command and arguments
  • pcpu: percentage cpu usage
  • pmem: percentage memory usage
  • state: symbolic process state
  • pid: process ID

Example: Show bash processes

	    $ ctl -m shellutil -c ps -- -pname bash
	    --- 
	    user: alexh
	    command: bash
	    pmem: "0.0"
	    args: "[-login]"
	    state: S
	    pid: "57085"
	    pcpu: "0.0"
	  

static: This command can be run outside of an object context.

Usage

ctl -m shellutil -c ps [-format <yaml>] [-output <>] [-pname <.*>]

Options

Option Description Type Default
format output format. (plain, yaml)

Display the result in the spcified format. If "plain" is specified, results are displayed in their native ps command format. If "yaml" is specified then each process is displayed in a key/value pair format.

string yaml
output output file

Save the results to the output file. If no -output option is specified results are printed to the terminal.

string
pname process name

Filter process info to those matching specified process name. The value for the -pname argument can also be a regular expression. If the argument is unspecified then all processes are listed.

string .*