public class Resource extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Resource.rlimit |
static interface |
Resource.rusage
Structure which says how much of each resource has been used.
|
| Constructor and Description |
|---|
Resource() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getpriority(int which,
int who)
Return the highest priority of any process specified by WHICH and WHO (see above); if WHO is
zero, the current process, process group, or user (as specified by WHO) is used.
|
static int |
getrlimit(int resource,
Resource.rlimit rlimits)
Put the soft and hard limits for RESOURCE in *RLIMITS.
|
static int |
getrusage(int who,
Resource.rusage usage)
Return resource usage information on process indicated by WHO and put it in *USAGE.
|
static int |
PRIO_MAX()
Maximum priority a process can have.
|
static int |
PRIO_MIN()
Minimum priority a process can have.
|
static int |
PRIO_PGRP()
WHO is a process group ID.
|
static int |
PRIO_PROCESS()
WHO is a process ID.
|
static int |
PRIO_USER()
WHO is a user ID.
|
static int |
prlimit(int pid,
int resource,
Resource.rlimit new_limit,
Resource.rlimit old_limit)
Modify and return resource limits of a process atomically.
|
static long |
RLIM_INFINITY()
Value to indicate that there is no limit.
|
static int |
RLIM_NLIMITS() |
static long |
RLIM_SAVED_CUR() |
static long |
RLIM_SAVED_MAX()
We can represent all limits.
|
static int |
RLIMIT_AS()
Address space limit.
|
static int |
RLIMIT_CORE()
Largest core file that can be created, in bytes.
|
static int |
RLIMIT_CPU()
Per-process CPU limit, in seconds.
|
static int |
RLIMIT_DATA()
Maximum size of data segment, in bytes.
|
static int |
RLIMIT_FSIZE()
Largest file that can be created, in bytes.
|
static int |
RLIMIT_LOCKS()
Maximum number of file locks.
|
static int |
RLIMIT_MEMLOCK()
Locked-in-memory address space.
|
static int |
RLIMIT_MSGQUEUE()
Maximum bytes in POSIX message queues.
|
static int |
RLIMIT_NICE()
Maximum nice priority allowed to raise to.
|
static int |
RLIMIT_NLIMITS() |
static int |
RLIMIT_NOFILE()
Number of open files.
|
static int |
RLIMIT_NPROC()
Number of processes.
|
static int |
RLIMIT_OFILE() |
static int |
RLIMIT_RSS()
Largest resident set size, in bytes.
|
static int |
RLIMIT_RTPRIO()
Maximum realtime priority allowed for non-priviledged processes.
|
static int |
RLIMIT_SIGPENDING()
Maximum number of pending signals.
|
static int |
RLIMIT_STACK()
Maximum size of stack segment, in bytes.
|
static int |
RUSAGE_CHILDREN()
All of its terminated child processes.
|
static int |
RUSAGE_LWP()
Name for the same functionality on Solaris.
|
static int |
RUSAGE_SELF()
The calling process.
|
static int |
RUSAGE_THREAD()
The calling thread.
|
static int |
setpriority(int which,
int who,
int prio)
Set the priority of all processes specified by WHICH and WHO (see above) to PRIO.
|
static int |
setrlimit(int resource,
Resource.rlimit rlimits)
Set the soft and hard limits for RESOURCE to *RLIMITS.
|
public static int RLIMIT_CPU()
public static int RLIMIT_FSIZE()
public static int RLIMIT_DATA()
public static int RLIMIT_STACK()
public static int RLIMIT_CORE()
public static int RLIMIT_RSS()
public static int RLIMIT_NOFILE()
public static int RLIMIT_OFILE()
public static int RLIMIT_AS()
public static int RLIMIT_NPROC()
public static int RLIMIT_MEMLOCK()
public static int RLIMIT_LOCKS()
public static int RLIMIT_SIGPENDING()
public static int RLIMIT_MSGQUEUE()
public static int RLIMIT_NICE()
public static int RLIMIT_RTPRIO()
public static int RLIMIT_NLIMITS()
public static int RLIM_NLIMITS()
public static long RLIM_INFINITY()
public static long RLIM_SAVED_MAX()
public static long RLIM_SAVED_CUR()
public static int RUSAGE_SELF()
public static int RUSAGE_CHILDREN()
public static int RUSAGE_THREAD()
public static int RUSAGE_LWP()
public static int PRIO_MIN()
public static int PRIO_MAX()
public static int PRIO_PROCESS()
public static int PRIO_PGRP()
public static int PRIO_USER()
public static int prlimit(int pid,
int resource,
Resource.rlimit new_limit,
Resource.rlimit old_limit)
public static int getrlimit(int resource,
Resource.rlimit rlimits)
public static int setrlimit(int resource,
Resource.rlimit rlimits)
public static int getrusage(int who,
Resource.rusage usage)
public static int getpriority(int which,
int who)
public static int setpriority(int which,
int who,
int prio)