NAME
proc - print information about a live process or core image
SYNOPSIS
proc -[fhms] [-l lwpid] corefile|pid|procpath
DESCRIPTION
proc prints out information about the current state of a live process or about the state of a process at the time at which it generated a core image. The output can include information that is global to the entire process or information for one or more light-weight processes. A light-weight process is specified with the -l option, which takes as an argument an LWP id. Multiple -l options may be specified for each invocation. If no LWP ids are specified, proc will print out status information for the process.

corefile is the file name of a core image generated by a process due to a signal or as the result of an invocation of gcore(1).

pid is a process id for a live process. procpath is the pathname of a directory entry for a live process under /proc (see proc(4)). In either case, proc attempts to gain control of the process. proc, by default, does not attempt to halt a running process when printing information about its status. This can mean that information about multiple LWPs can have been retrieved at slightly different points in the process' lifetime. To ensure consistency of information, you can request that proc temporarily halt the process by specifying the -h option. The process will be resumed when proc exits.

The type of information printed by proc can be controlled using one or more of the following options:

-f
Full listing; proc prints process or LWP level status information. For the process level, this information includes the base name component of the exec'd program name and the first part of the argument list to the process (limited to PSARGSZ characters, defined in <sys/procfs.h>). The full listing for processes also includes information about the current signal, if the process has received a signal; process identifiers (process id, parent process id, process group id and session id); owner identifiers (effective, real and saved user and group ids as well as supplementary group ids); any pending signals; process status flags; the number of LWPs in the process; the size of the process; the controlling terminal; the starting time of the process; and process elapsed timing information.

For LWPs the full listing includes information about the current signal, if the LWP has received a signal; any pending or held signals; information about the last system call made; state of the LWP; scheduling and processor bind information; and the contents of the LWP's processor registers.

-m
proc prints a memory map for the process. For each segment this information includes the virtual address range, the size of the memory image, the memory protections and the object file (if any) from which the segment was mapped or the type of the segment for certain special segments (STACK or BREAK). For live processes, if the segment was memory mapped from a file, the file offset is provided. For core images, both a memory size and a file size are provided. The file size is zero if the contents of the segment were not actually dumped to the core file. Core images may also contain segments of type NOTE. These represent the status and context information added to a core file by the system and are not part of the process image.
-s
Short listing (default). proc prints a subset of the process or LWP level information provided by the full listing.
REFERENCES
a.out(4), core(4), debug(1), gcore(1), proc(4), ps(1), siginfo(5).