getrusage

getrusage

getrusage

getrusage
- It gets the current resource usages

Syntax:

array getrusage ( [int who])

This is an interface to getrusage(2). It returns an associative array containing the data returned from the system call. If who is 1, getrusage will

be called with RUSAGE_CHILDREN.

All entries are accessible by using their documented field names. Example 1. Getrusage Example

Example:

$dat = getrusage();
echo $dat[”ru_nswap”];         # number of swaps
echo $dat[”ru_majflt”];        # number of page faults
echo $dat[”ru_utime.tv_sec”];  # user time used (seconds)
echo $dat[”ru_utime.tv_usec”]; # user time used (microseconds)

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.