Query: getrusage
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
GETRUSAGE(3) 1 GETRUSAGE(3) getrusage - Gets the current resource usagesSYNOPSISarray getrusage ([int $who])DESCRIPTIONThis is an interface to getrusage(2). It gets data returned from the system call.PARAMETERSo $who - If $who is 1, getrusage will be called with RUSAGE_CHILDREN.RETURN VALUESReturns an associative array containing the data returned from the system call. All entries are accessible by using their documented field names.EXAMPLESExample #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. | | | | +--------+---------------------------------------------+NOTESNote 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 ALSOYour system's man page on getrusage(2). PHP Documentation Group GETRUSAGE(3)
Related Man Pages |
---|
getrusage(2) - bsd |
vtimes(2) - debian |
getrusage(2) - ultrix |
getrusage(2) - suse |
getrusage(2) - freebsd |
Similar Topics in the Unix Linux Community |
---|
Pls correct the "if" syntax |
Inserting a file into another file above a specified location |
How to add spaces to test.dat file in unix?? |
cut the some part in filename |
Concatenating |