99 lines
4.9 KiB
HTML
99 lines
4.9 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE html
|
||
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html lang="en-us" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow" />
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="DC.Type" content="reference" />
|
||
|
<meta name="DC.Title" content="SystemStatus classes" />
|
||
|
<meta name="abstract" content="" />
|
||
|
<meta name="description" content="" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="systats" />
|
||
|
<meta name="DC.Language" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
|
<title>SystemStatus classes</title>
|
||
|
</head>
|
||
|
<body id="systats"><a name="systats"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">SystemStatus classes</h1>
|
||
|
<div><p></p>
|
||
|
<div class="section"><p>The <a href="javadoc/com/ibm/as400/access/SystemStatus.html#NAVBAR_TOP"> SystemStatus</a> classes allow you to retrieve
|
||
|
system status information and to retrieve and change system pool information.
|
||
|
The SystemStatus object allows you to retrieve system status information including
|
||
|
the following:</p>
|
||
|
<ul><li><a href="javadoc/com/ibm/as400/access/SystemStatus.html#GETUSERSCURRENTSIGNEDON()"> getUsersCurrentSignedOn()</a>: Returns the
|
||
|
number of users currently signed on the system</li>
|
||
|
<li><a href="javadoc/com/ibm/as400/access/SystemStatus.html#GETUSERSTEMPORARILYSIGNEDOFF()"> getUsersTemporarilySignedOff()</a>: Returns
|
||
|
the number of interactive jobs that are disconnected</li>
|
||
|
<li><a href="javadoc/com/ibm/as400/access/SystemStatus.html#GETDATEANDTIMESTATUSGATHERED()"> getDateAndTimeStatusGathered()</a>: Returns
|
||
|
the date and time when the system status information was gathered</li>
|
||
|
<li><a href="javadoc/com/ibm/as400/access/SystemStatus.html#GETJOBSINSYSTEM()"> getJobsInSystem()</a>: Returns the total number
|
||
|
of user and system jobs that are currently running</li>
|
||
|
<li><a href="javadoc/com/ibm/as400/access/SystemStatus.html#GETBATCHJOBSRUNNING()"> getBatchJobsRunning()</a>: Returns the number
|
||
|
of batch jobs currently running on the system</li>
|
||
|
<li><a href="javadoc/com/ibm/as400/access/SystemStatus.html#GETBATCHJOBSENDING()"> getBatchJobsEnding()</a>: Returns the number
|
||
|
of batch jobs that are in the process of ending</li>
|
||
|
<li><a href="javadoc/com/ibm/as400/access/SystemStatus.html#GETSYSTEMPOOLS()"> getSystemPools()</a>: Returns an enumeration
|
||
|
containing a SystemPool object for each system pool</li>
|
||
|
</ul>
|
||
|
<p>In addition to the methods within the SystemStatus class, you also
|
||
|
can access <a href="syspool.htm#syspool">SystemPool</a> through SystemStatus.
|
||
|
SystemPool allows you to get information about system pools and change system
|
||
|
pool information.</p>
|
||
|
</div>
|
||
|
<div class="section"><p><strong><span class="synph" id="systats__systatzexample1"><a name="systats__systatzexample1"><!-- --></a><span class="kwd"></span></span>Example</strong></p>
|
||
|
<div class="note"><span class="notetitle">Note:</span> Read
|
||
|
the <a href="codedisclaimer.htm#codedisclaimer">Code example disclaimer</a> for
|
||
|
important legal information.</div>
|
||
|
<p>This example shows you how to use caching
|
||
|
with the SystemStatus class:</p>
|
||
|
<div class="p"><pre>AS400 system = new AS400("MyAS400");
|
||
|
SystemStatus status = new SystemStatus(system);
|
||
|
|
||
|
// Turn on caching. It is off by default.
|
||
|
status.setCaching(true);
|
||
|
|
||
|
// This will retrieve the value from the system.
|
||
|
// Every subsequent call will use the cached value
|
||
|
// instead of retrieving it from the system.
|
||
|
int jobs = status.getJobsInSystem();
|
||
|
|
||
|
|
||
|
// ... Perform other operations here ...
|
||
|
|
||
|
|
||
|
// This determines if caching is still enabled.
|
||
|
if (status.isCaching())
|
||
|
{
|
||
|
// This will retrieve the value from the cache.
|
||
|
jobs = status.getJobsInSystem();
|
||
|
}
|
||
|
|
||
|
// Go to the system next time, regardless if caching is enabled.
|
||
|
status.refreshCache();
|
||
|
|
||
|
// This will retrieve the value from the system.
|
||
|
jobs = status.getJobsInSystem();
|
||
|
|
||
|
// Turn off caching. Every subsequent call will go to the system.
|
||
|
status.setCaching(false);
|
||
|
|
||
|
// This will retrieve the value from the system.
|
||
|
jobs = status.getJobsInSystem();</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</body>
|
||
|
</html>
|