Extracted from Pike v7.4 release 117 at 2004-07-26.
pike.ida.liu.se
[Top]
predef::

Method rusage()


Method rusage

array(int) rusage()

Description

Return resource usage.

Returns

Returns an array of ints describing how much resources the interpreter process has used so far. This array will have at least 29 elements, of which those values not available on this system will be zero.

The elements are as follows:

Array
int user_time

Time in milliseconds spent in user code.

int system_time

Time in milliseconds spent in system calls.

int maxrss

Maximum used resident size in kilobytes.

int ixrss

Quote from GNU libc: An integral value expressed in kilobytes times ticks of execution, which indicates the amount of memory used by text that was shared with other processes.

int idrss

Quote from GNU libc: An integral value expressed the same way, which is the amount of unshared memory used for data.

int isrss

Quote from GNU libc: An integral value expressed the same way, which is the amount of unshared memory used for stack space.

int minor_page_faults

Minor page faults, i.e. TLB misses which required no disk I/O.

int major_page_faults

Major page faults, i.e. paging with disk I/O required.

int swaps

Number of times the process was swapped out entirely.

int block_input_op

Number of block input operations.

int block_output_op

Number of block output operations.

int messages_sent

Number of IPC messsages sent.

int messages_received

Number of IPC messsages received.

int signals_received

Number of signals received.

int voluntary_context_switches

Number of voluntary context switches (usually to wait for some service).

int involuntary_context_switches

Number of preemptions, i.e. context switches due to expired time slices, or when processes with higher priority were scheduled.

int sysc

Number of system calls.

int ioch

?

int rtime

?

int ttime

?

int tftime

?

int dftime

?

int kftime

?

int ltime

?

int slptime

?

int wtime

?

int stoptime

?

int brksize

Heap size.

int stksize

Stack size.


The values will not be further explained here; read your system manual for more information.

Note

All values may not be present on all systems.

See also

time()