proced-grammar-alist
proced-grammar-alist is a variable defined in `
proced.el
'.
Its value is shown
below.
Documentation:
Alist of rules for handling Proced attributes.
Each element has the form
(KEY NAME FORMAT JUSTIFY PREDICATE REVERSE SORT-SCHEME REFINER).
Symbol KEY is the car of a process attribute.
String NAME appears in the header line.
FORMAT specifies the format for displaying the attribute values. It can
be a string passed to `format'. It can be a function called with one
argument, the value of the attribute. The value nil means take as is.
If JUSTIFY is an integer, its modulus gives the width of the attribute
values formatted with FORMAT. If JUSTIFY is positive, NAME appears
right-justified, otherwise it appears left-justified. If JUSTIFY is 'left
or 'right, the field width is calculated from all field values in the listing.
If JUSTIFY is 'left, the field values are formatted left-justified and
right-justified otherwise.
PREDICATE is the predicate for sorting and filtering the process listing
based on attribute KEY. PREDICATE takes two arguments P1 and P2,
the corresponding attribute values of two processes. PREDICATE should
return 'equal if P1 has same rank like P2. Any other non-nil value says
that P1 is "less than" P2, or nil if not.
If PREDICATE is nil the attribute cannot be sorted.
PREDICATE defines an ascending sort order. REVERSE is non-nil if the sort
order is descending.
SORT-SCHEME is a list (KEY1 KEY2 ...) defining a hierarchy of rules
for sorting the process listing. KEY1, KEY2, ... are KEYs appearing as cars
of `proced-grammar-alist'. First the PREDICATE of KEY1 is evaluated.
If it yields non-equal, it defines the sort order for the corresponding
processes. If it evaluates to 'equal the PREDICATE of KEY2 is evaluated, etc.
REFINER can be a list of flags (LESS-B EQUAL-B LARGER-B) used by the command
`proced-refine' (see there) to refine the listing based on attribute KEY.
This command compares the value of attribute KEY of every process with
the value of attribute KEY of the process at the position of point
using PREDICATE.
If PREDICATE yields non-nil, the process is accepted if LESS-B is non-nil.
If PREDICATE yields 'equal, the process is accepted if EQUAL-B is non-nil.
If PREDICATE yields nil, the process is accepted if LARGER-B is non-nil.
REFINER can also be a list (FUNCTION HELP-ECHO).
FUNCTION is called with one argument, the PID of the process at the position
of point. The function must return a list of PIDs that is used for the refined
listing. HELP-ECHO is a string that is shown when mouse is over this field.
If REFINER is nil no refinement is done.
You can customize this variable.
Value:
((euid "EUID" "%d" right proced-< nil
(euid pid)
(nil t nil))
(user "User" nil left proced-string-lessp nil
(user pid)
(nil t nil))
(egid "EGID" "%d" right proced-< nil
(egid euid pid)
(nil t nil))
(group "Group" nil left proced-string-lessp nil
(group user pid)
(nil t nil))
(comm "Command" nil left proced-string-lessp nil
(comm pid)
(nil t nil))
(state "Stat" nil left proced-string-lessp nil
(state pid)
(nil t nil))
(ppid "PPID" "%d" right proced-< nil
(ppid pid)
((lambda
(ppid)
(proced-filter-parents proced-process-alist ppid))
"refine to process parents"))
(pgrp "PGrp" "%d" right proced-< nil
(pgrp euid pid)
(nil t nil))
(sess "Sess" "%d" right proced-< nil
(sess pid)
(nil t nil))
(ttname "TTY" proced-format-ttname left proced-string-lessp nil
(ttname pid)
(nil t nil))
(tpgid "TPGID" "%d" right proced-< nil
(tpgid pid)
(nil t nil))
(minflt "MinFlt" "%d" right proced-< nil
(minflt pid)
(nil t t))
(majflt "MajFlt" "%d" right proced-< nil
(majflt pid)
(nil t t))
(cminflt "CMinFlt" "%d" right proced-< nil
(cminflt pid)
(nil t t))
(cmajflt "CMajFlt" "%d" right proced-< nil
(cmajflt pid)
(nil t t))
(utime "UTime" proced-format-time right proced-time-lessp t
(utime pid)
(nil t t))
(stime "STime" proced-format-time right proced-time-lessp t
(stime pid)
(nil t t))
(time "Time" proced-format-time right proced-time-lessp t
(time pid)
(nil t t))
(cutime "CUTime" proced-format-time right proced-time-lessp t
(cutime pid)
(nil t t))
(cstime "CSTime" proced-format-time right proced-time-lessp t
(cstime pid)
(nil t t))
(ctime "CTime" proced-format-time right proced-time-lessp t
(ctime pid)
(nil t t))
(pri "Pr" "%d" right proced-< t
(pri pid)
(nil t t))
(nice "Ni" "%3d" 3 proced-< t
(nice pid)
(t t nil))
(thcount "THCount" "%d" right proced-< t
(thcount pid)
(nil t t))
(start "Start" proced-format-start 6 proced-time-lessp nil
(start pid)
(t t nil))
(vsize "VSize" "%d" right proced-< t
(vsize pid)
(nil t t))
(rss "RSS" "%d" right proced-< t
(rss pid)
(nil t t))
(etime "ETime" proced-format-time right proced-time-lessp t
(etime pid)
(nil t t))
(pcpu "%CPU" "%.1f" right proced-< t
(pcpu pid)
(nil t t))
(pmem "%Mem" "%.1f" right proced-< t
(pmem pid)
(nil t t))
(args "Args" proced-format-args left proced-string-lessp nil
(args pid)
(nil t nil))
(pid "PID" "%d" right proced-< nil
(pid)
((lambda
(ppid)
(proced-filter-children proced-process-alist ppid))
"refine to process children"))
(tree "Tree" proced-format-tree left nil nil nil nil))