getrusage(3) php man page | unix.com

Man Page: getrusage

Operating Environment: php

Section: 3

GETRUSAGE(3)								 1							      GETRUSAGE(3)

getrusage - Gets the current resource usages

SYNOPSIS
array getrusage ([int $who])
DESCRIPTION
This is an interface to getrusage(2). It gets data returned from the system call.
PARAMETERS
o $who - If $who is 1, getrusage will be called with RUSAGE_CHILDREN.
RETURN VALUES
Returns an associative array containing the data returned from the system call. All entries are accessible by using their documented field names.
EXAMPLES
Example #1 getrusage(3) example <?php $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) ?>
CHANGELOG
+--------+---------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------+ | 7.0.0 | | | | | | | This function is now supported on Windows. | | | | +--------+---------------------------------------------+
NOTES
Note On Windows getrusage(3) will only return the following members: o "ru_stime.tv_sec" o "ru_stime.tv_usec" o "ru_utime.tv_sec" o "ru_utime.tv_usec" o "ru_majflt" (only if $who is RUSAGE_SELF) o "ru_maxrss" (only if $who is RUSAGE_SELF) If getrusage(3) is called with $who set to 1 ( RUSAGE_CHILDREN), then resource usage for threads are collected (meaning that inter- nally the function is called with RUSAGE_THREAD). Note on BeOS 2000, only the following members are returned: o "ru_stime.tv_sec" o "ru_stime.tv_usec" o "ru_utime.tv_sec" o "ru_utime.tv_usec"
SEE ALSO
Your system's man page on getrusage(2). PHP Documentation Group GETRUSAGE(3)
Related Man Pages
getrusage(2) - linux
vtimes(2) - centos
getrusage(2) - osx
getrusage(2) - centos
getrusage(2) - suse
Similar Topics in the Unix Linux Community
Error message
issue on reading the file and appending date
cut the some part in filename
ID incorrect field values in dat file and output to new file
Split a file using 2-D indexing system