GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
GETRLIMITUSAGE(2) FreeBSD System Calls Manual GETRLIMITUSAGE(2)

getrlimitusageQuery usage of the current process' limited resources

Standard C Library (libc, -lc)

#include <sys/resource.h>

int
getrlimitusage(unsigned which, int flags, rlim_t *res);

The getrlimitusage system call allows the process to query current consumption of the resources limited by the setrlimit(2) call.

The which argument specifies the resource, same as for getrlimit(2) and setrlimit(2) calls, see their man page for the list of enforced resource types.

The flags argument modifies the behavior of the call in the following ways:

GETRLIMITUSAGE_EUID
Query the resource usage for user identified by effective UID of the process, instead of the real UID (which is default for accounting).

Upon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error.

The getrlimitusage() system call will fail if:

[]
The address specified for res is invalid.
[]
The resource specified to getrlimitusage() in the which argument is unknown.
[]
The resource specified to getrlimitusage() in the which argument is not accounted, but only enforced in specific situations. Examples of such resources are RLIMIT_FSIZE and RLIMIT_CORE.

procstat(1), getrlimit(2), setrlimit(2)

The getrlimitusage() system call appeared in 15.0BSD.

September 27, 2024 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 2 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.