getrusage

array getrusage([int who]) 

Returns an array of resource usage.

Returns:

Associative array

Description:

This function is based on the UNIX getrusage system function. getrusage is used to get resource limits. Using the optional who parameter, the RUSAGE_CHILDREN flag will be used, which returns additional resource information. The default is RUSAGE_SELF. While a more complete description can be found in the UNIX man page for getrusage, the following table presents a summary.

Flag Description
ru_utime.tv_usec User time used (microseconds)
ru_utime.tv_sec User time used (seconds)
ru_stime.tv_usec System time used (microseconds)
ru_stime.tv_sec System time used (seconds)
ru_maxrss Maximum resident shared size
ru_ixrss Integral shared ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.