Function: process-attributes
process-attributes is a function defined in process.c.
Signature
(process-attributes PID)
Documentation
Return attributes of the process given by its PID, a number.
If default-directory is remote, PID is regarded as process
identifier on the respective remote host.
Value is an alist where each element is a cons cell of the form
(KEY . VALUE)
If this functionality is unsupported, the value is nil.
See list-system-processes for getting a list of all process IDs.
The KEYs of the attributes that this function may return are listed below, together with the type of the associated VALUE (in parentheses). Not all platforms support all of these attributes; unsupported attributes will not appear in the returned alist. Unless explicitly indicated otherwise, numbers can have either integer or floating point values.
euid -- Effective user User ID of the process (number)
user -- User name corresponding to euid (string)
egid -- Effective user Group ID of the process (number)
group -- Group name corresponding to egid (string)
comm -- Command name (executable name only) (string)
state -- Process state code, such as "S", "R", or "T" (string)
ppid -- Parent process ID (number)
pgrp -- Process group ID (number)
sess -- Session ID, i.e. process ID of session leader (number)
ttname -- Controlling tty name (string)
tpgid -- ID of foreground process group on the process's tty (number)
minflt -- number of minor page faults (number)
majflt -- number of major page faults (number)
cminflt -- cumulative number of minor page faults (number)
cmajflt -- cumulative number of major page faults (number)
utime -- user time used by the process, in current-time format
stime -- system time used by the process (current-time)
time -- sum of utime and stime (current-time)
cutime -- user time used by the process and its children (current-time)
cstime -- system time used by the process and its children (current-time)
ctime -- sum of cutime and cstime (current-time)
pri -- priority of the process (number)
nice -- nice value of the process (number)
thcount -- process thread count (number)
start -- time the process started (current-time)
vsize -- virtual memory size of the process in KB's (number)
rss -- resident set size of the process in KB's (number)
etime -- elapsed time the process is running (current-time)
pcpu -- percents of CPU time used by the process (floating-point number)
pmem -- percents of total physical memory used by process's resident set
(floating-point number)
args -- command line which invoked the process (string).
Probably introduced at or before Emacs version 23.1.
Source Code
// Defined in /usr/src/emacs/src/process.c
{
Lisp_Object handler
= Ffind_file_name_handler (BVAR (current_buffer, directory),
Qprocess_attributes);
if (!NILP (handler))
return calln (handler, Qprocess_attributes, pid);
return system_process_attributes (pid);
}