|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tomcat.jni.OS
public class OS
OS
Field Summary | |
---|---|
static boolean |
IS_BSD
|
static boolean |
IS_LINUX
|
static boolean |
IS_MACOSX
|
static boolean |
IS_NETWARE
|
static boolean |
IS_SOLARIS
|
static boolean |
IS_UNIX
|
static boolean |
IS_WIN32
|
static boolean |
IS_WIN64
|
static int |
LOG_DEBUG
|
static int |
LOG_EMERG
|
static int |
LOG_ERROR
|
static int |
LOG_INFO
|
static int |
LOG_NOTICE
|
static int |
LOG_WARN
|
Constructor Summary | |
---|---|
OS()
|
Method Summary | |
---|---|
static java.lang.String |
defaultEncoding(long pool)
Get the name of the system default character set. |
static java.lang.String |
expand(java.lang.String str)
Expand environment variables. |
static int |
info(long[] inf)
Gather system info. |
static java.lang.String |
localeEncoding(long pool)
Get the name of the current locale character set. |
static int |
random(byte[] buf,
int len)
Generate random bytes. |
static void |
syslog(int level,
java.lang.String message)
Log message. |
static void |
sysloginit(java.lang.String domain)
Initialize system logging. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LOG_EMERG
public static final int LOG_ERROR
public static final int LOG_NOTICE
public static final int LOG_WARN
public static final int LOG_INFO
public static final int LOG_DEBUG
public static final boolean IS_UNIX
public static final boolean IS_NETWARE
public static final boolean IS_WIN32
public static final boolean IS_WIN64
public static final boolean IS_LINUX
public static final boolean IS_SOLARIS
public static final boolean IS_BSD
public static final boolean IS_MACOSX
Constructor Detail |
---|
public OS()
Method Detail |
---|
public static java.lang.String defaultEncoding(long pool)
pool
- the pool to allocate the name from, if neededpublic static java.lang.String localeEncoding(long pool)
pool
- the pool to allocate the name from, if neededpublic static int random(byte[] buf, int len)
buf
- Buffer to fill with random byteslen
- Length of buffer in bytespublic static int info(long[] inf)
On exit the inf array will be filled with: inf[0] - Total usable main memory size inf[1] - Available memory size inf[2] - Total page file/swap space size inf[3] - Page file/swap space still available inf[4] - Amount of shared memory inf[5] - Memory used by buffers inf[6] - Memory Load inf[7] - Idle Time in microseconds inf[8] - Kernel Time in microseconds inf[9] - User Time in microseconds inf[10] - Process creation time (apr_time_t) inf[11] - Process Kernel Time in microseconds inf[12] - Process User Time in microseconds inf[13] - Current working set size. inf[14] - Peak working set size. inf[15] - Number of page faults.
inf
- array that will be filled with system information.
Array length must be at least 16.public static java.lang.String expand(java.lang.String str)
str
- String to expand
public static void sysloginit(java.lang.String domain)
domain
- String that will be prepended to every messagepublic static void syslog(int level, java.lang.String message)
level
- Log message severity. See LOG_XXX enums.message
- Message to log
|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |