[% META title = 'Resources » Process Status' meta_refresh = 60 -%] [% # PROCESS dumper.tt dump = data %]

Process status [[% cmd %]]

[% cfg = c.cfg('settings'); is_sysadmin = ( cfg.item('_centre') == cfg.sysadmin_centre ) ? 1 : 0; headers = [ 'user' 'pid' 'cpu' 'rss (KB)' 'vmem (KB)' 'start' 'time' 'process' ]; headers.push('kill') IF is_sysadmin; %] [% BLOCK tbl_row %] [% process.user %] [% process.pid %] [% process.cpu %] [% process.rss; '|'; process.percent; '%' %] [% process.vmem %] [% process.start %] [% process.time %] [% centre.upper; '|'; process.type %] [% IF is_sysadmin AND NOT process.type.match('parent') %] [% ELSE; '--'; END %] [% END %]
[% FOREACH h IN headers %] [% END %] [% FOREACH href IN data.pairs; centre = href.key; rows = href.value; # hashref FOREACH process IN rows; NEXT UNLESS process.type.match('parent'); # parent 1st INCLUDE tbl_row class = 'grey'; END; FOREACH process IN rows; # hashref NEXT IF process.type.match('parent'); INCLUDE tbl_row class = 'normal'; END; END %]
[% h %]
[% site.html.back_button %] [seconds until auto refresh: ] [% IF is_sysadmin %] kill selected: [% END %]

Definitions (man ps):

%cpu
cpu utilization of the process in "##.#" format. Currently, it is the CPU time used divided by the time the process has been running (cputime/realtime ratio), expressed as a percentage. It will not add up to 100% unless you are lucky.
%mem
ratio of the process's resident set size to the physical memory on the machine, expressed as a percentage.
vsv
virtual memory size of the process in KiB 1024-byte units). Device mappings are currently excluded; this is subject to change.
rss
resident set size, the non-swapped physical memory that a task has used (in kiloBytes).
vsz
virtual memory size. It includes all memory that the process can access, including memory that is swapped out and memory that is from shared libraries.
start
time the command started. If the process was started less than 24 hours ago, the output format is "HH:MM:SS", else it is " mmm dd" (where mmm is a three-letter month name).
time
cumulative CPU time, "[dd-]hh:mm:ss" format.