Operation Commands
This page includes the following:
get_system_check_info()
Get information on the server's status, as an internal Java object. Possible messages that can indicate system issues look like:
WARNING: The Job Converter for Scheduler ENGAUTOSYSR11-03 is late. A run was expected by Sat Jul 11 04:31:02 MDT 2015 (last run was at Fri Jul 10 02:07:02 MDT 2015). WARNING: the last run of the Statistics Generator at 2015/07/13 02:00:04.115 MDT did not finish successfully WARNING: scheduler ENGAUTOSYSR11-02 cannot connect to database.
Parameters:
- None
Dependencies:
- Must be logged in
- Must be connected to a server
Result:
- An internal SystemCheckData Java object representing the server's status, see SystemCheckData
Example get_system_check_info() command line usage:
>>> info = get_system_check_info() com.termalabs.dto.system.SystemCheckData@225062d9 >>> info.getInfoMessages() [Server Mb total: 1843, Server Mb free: 554, Server Mb max: 1843, Server Mb warning threshold: 90, Server start time: Mon Aug 03 11:25:47 MDT 2015, Deleted job count: 26, Statistics Generator last actual run time: Mon Aug 10 09:25:23 MDT 2015, Statistics Generator last run OK: true, Statistics Generator interval: 1 day, 0:00:00, Statistics Generator delay warning threshold: 1.1, Job Converter interval: 1 day, 0:00:00, Job Converter delay warning threshold: 1.1, Jammer Interval: 0:00:20, Jammer delay warning threshold: 10.0, Type: Evaluation Days Remaining: 143, Scheduler tidal53 last jammer run at: Mon Aug 10 13:56:46 MDT 2015, Scheduler CA7 last converter run at: Mon Aug 10 13:29:02 MDT 2015 last jammer run at: Mon Aug 10 13:56:49 MDT 2015, Scheduler autosys45 last converter run at: Mon Aug 10 01:01:43 MDT 2015 last jammer run at: Mon Aug 10 13:56:29 MDT 2015, Scheduler CLI - API - cm03 is offline.]
Example get_system_check_info() script usage:
import sys from jaws import * login() print 'begin output' try: info = get_system_check_info() messages = info.getInfoMessages() for m in messages: print m print 'end output' finally: logout()
invoke_mbean_operation()
Invoke an operation on the server via JMX.
This is an internal interface, contact Broadcom Technical Support for more information.
Parameters:
-
name - full name of the service
-
operation - name of the operation (method) to invoke
-
params (optional) - a list of parameters being passed to the method
Default: None
-
signature (optional) - a list of strings defining the class of each parameter
Default: None
Dependencies:
- None
Result:
- The result of the operation, if any
Example invoke-mbean_operation() command line usage:
>>> invoke_mbean_operation(name='jaws:service=Statistics Generator', operation='setLowPriority', params=[java.lang.Boolean.TRUE], signature=['boolean']) >>> invoke_mbean_operation(name='jaws:service=Statistics Generator',
operation='run')
Example invoke-mbean_operation() script usage:
import sys from jaws import * login() print 'begin' try: invoke_mbean_operation(name='jaws:service=Statistics Generator', operation='run') print 'end' finally: logout()
recalculate_averages()
Run the Statistics Generator to recalculate averages and frequencies for all jobs and jobstreams.
Parameters:
-
name - full name of the service
-
operation - name of the operation (method) to invoke
-
params (optional) - a list of parameters being passed to the method
Default: None
-
signature (optional) - a list of strings defining the class of each parameter
Default: None
Dependencies:
- Must be logged in as admin
- Call fails if the Statistics Generator is already running
Example recalculate_averages() command line usage:
>>> recalculate_averages() recalculate averages done
Example recalculate_averages() script usage:
import sys from jaws import * login() print 'begin' try: recalculate_averages() print 'end' finally: logout()