Command-line System Tools

Platform Agents for UNIX, Windows, and OpenVMS ship with a set of command-line system tools. There are two primary tools:

  • jtool: A tool that lets you use a variety of utility functions. jtool is useful as a standalone tool, but it can also install separate command-line tools for each of its capabilities.

  • apitool: A JAR that lets you raise events and run scripts.

File Paths

If you want to use these utilities outside of RunMyJobs processes, consider the following. Because the path to the bin directory contains version information, and thus changes when a new version is installed, Redwood recommends using the latest/ symbolic link on UNIX and environment variables on Windows and OpenVMS to specify the version that your scripts should use. Alternatively, you can use symbolic links on Windows Vista or later. Re-parse points/junctions on earlier versions of Windows (XP, 2003), and Logicals on OpenVMS.

The recommended path on UNIX is:

PATH=/opt/redwood/agent/latest/bin:$PATH

Here is example DCL code for finding the latest jtool on OpenVMS.

Copy
$!
$loop3:
$   x = f$search("[.agent.9*.bin]jtool.exe;")
$   if x .eqs. "" then goto stop3
$   bindir = f$parse(x,,,"DEVICE") + f$parse(x,,,"DIRECTORY")
$   write sys$output "- Found agent directory ''bindir' for JTOOL"
$   jtool=="$''bindir'jtool.exe"
$   goto loop3
$stop3:

You can copy any files that do not require a process context to another system and use them from there. Note, however, that these files are platform-specific. For example, a HP-UX IA64 version of jsleep will not run on Windows or on GNU/Linux, even if you are using the IA64 version of the operating system.

Running Command-line Tools

Some tools are suited to communicating with the central RunMyJobs server over HTTP. This is useful when you want to run commands from outside of the RunMyJobs environment (for example, from a computer where you have not installed a Platform Agent). You can do this by copying the jtool binary to a different machine and running it from there.

Note: Tools that connect to the central RunMyJobs server require a connection file, which can be created using jsecret.

Job Context

Some tools are meant for use within a RunMyJobs OS process executed by the Platform Agent. This is called running in job context. Such tools use the -j or -job-context argument to verify that you understand that they must be called in job context.

Proxy Settings

The following environment variables are used to retrieve proxy server connection details:

  • HTTP_PROXY: The URL of the proxy server. For example: https://proxy.example.com:3128.
  • PROXY_USER: The user for the proxy server. This is ignored if HTTP_PROXY is not set.
  • PROXY_PASSWORD: The password for the proxy user. This is ignored if HTTP_PROXY is not set.
  • NO_PROXY: Enforces a direct connection.

Logging

All tools, including Platform Agents themselves, use a common logging format and use the same arguments to overrule the default logging settings. For more information, see Agent Logging Settings.

z/OS Availability

On z/OS, most of these tools are not available.

  • Because z/OS jobs run as JES jobs, there is no job context. Consequently, system tools that depend on the job context are not supported.
  • jftp has not been ported to function properly in an EBCDIC environment.

Specific instructions on how to use the system tools on z/OS are documented in z/OS System Tools.