10.32. Procps-3.2.8 64 Bit

The Procps package contains programs for monitoring processes.

10.32.1. Installation of Procps

The following patch adds process control group support to ps:

patch -Np1 -i ../procps-3.2.8-ps_cgroup-1.patch

The following patch fixes an issue where some procps utils print an error on the screen if the monitor isn't running at 60Hz:

patch -Np1 -i ../procps-3.2.8-fix_HZ_errors-1.patch

The following fixes an issue with Make 3.82:

sed -i -r '/^-include/s/\*(.*)/proc\1 ps\1/' Makefile

Compile the package:

make CC="gcc ${BUILD64}" m64=""

This package does not come with a test suite.

Install the package:

make SKIP='/bin/kill /usr/share/man/man1/kill.1' install lib64=lib64

The meaning of the make and install options:

CC="gcc ${BUILD64}"

This allows us to compile using our gcc with our options lists in ${BUILD64} variable.

m64=""

The Makefile for this package goes to some lengths to build as 64-bit if at all possible. In CLFS we build each library for each available ABI. Overriding the m64 option enables us ignore this completely.

lib64=lib64

The Makefile also attempts to install into lib64 on multilib, so again we choose to override it.

10.32.2. Contents of Procps

Installed programs: free, pgrep, pkill, pmap, ps, pwdx, skill, slabtop, snice, sysctl, tload, top, uptime, vmstat, w, and watch
Installed library: libproc.so

Short Descriptions

free

Reports the amount of free and used memory (both physical and swap memory) in the system

pgrep

Looks up processes based on their name and other attributes

pkill

Signals processes based on their name and other attributes

pmap

Reports the memory map of the given process

ps

Lists the current running processes

pwdx

Reports the current working directory of a process

skill

Sends signals to processes matching the given criteria

slabtop

Displays detailed kernel slab cache information in real time

snice

Changes the scheduling priority of processes matching the given criteria

sysctl

Modifies kernel parameters at run time

tload

Prints a graph of the current system load average

top

Displays a list of the most CPU intensive processes; it provides an ongoing look at processor activity in real time

uptime

Reports how long the system has been running, how many users are logged on, and the system load averages

vmstat

Reports virtual memory statistics, giving information about processes, memory, paging, block Input/Output (IO), traps, and CPU activity

w

Shows which users are currently logged on, where, and since when

watch

Runs a given command repeatedly, displaying the first screen-full of its output; this allows a user to watch the output change over time

libproc

Contains the functions used by most programs in this package