Redwood Documentation

Product Documentation

 

You are currently viewing the legacy RunMyJobs documentation site. This site will be taken down later this month.
All current and future RunMyJobs documentation, including versions 2023.3 and later, can be found here.
Please update your bookmarks. Use the version dropdown menu to select the documentation you need.

›Command Line Tools

RunMyJobsPlatform Agents

External Platforms

  • Connecting Redwood Server to External Platforms

Credentials

  • Storing Credentials
  • Credential Protocols

Platform Process Servers

  • On-site Platform Process Servers
  • Cloud Platform Agents
  • Using the Wizard to Create Process Servers
  • Configuring Platform Agents
  • Spool Host Agents
  • The Environment of Platform Agent OS Processes
  • Processing Platform Processes
  • Process Server Services
  • Configuring Agentless Process Servers
  • Automatically Updating Platform Agents
  • Enabling TLS
  • Creating Monitoring Checks
  • Configuring Load Balancing on Platform Agents
  • Platform Agent Registry Entries
  • Monitoring Servers with Platform Process Servers

UNIX Agents

  • UNIX Process Servers
  • UNIX Process Server Configuration Data
  • File Events on UNIX
  • Creating UNIX Process Servers (Advanced)
  • Choosing a User Switching Security Mode
  • Controlling Unix Platform Agents
  • Uninstalling Redwood Server Platform Agents from UNIX

Windows Agents

  • Creating a Microsoft Windows Process Server
  • File Events on Microsoft Windows Process Servers
  • Configuration of a Microsoft Windows Process Server
  • Managed Services
  • Configuring Platform Agents on Microsoft Windows
  • Automating Windows tasks that require a desktop window
  • Uninstalling Redwood Server from Microsoft Windows

Agent Definition Types

  • Using the BASH Definition Type
  • Using the KSH Definition Type
  • Using the CSH Definition Type
  • Using the Perl Definition Type
  • Using the Python Definition Type
  • Using the PowerShell Definition Type
  • Using the Visual Basic Script Definition Type
  • Using the CMD Definition Type
  • Using the R Process Definition Type
  • Using the DCL Definition Type
  • Using Platform Definition Types
  • Using the OS Native Definition Type
  • Microsoft Windows Definition Types
  • Using the SQLPLUS Definition Type
  • Using the FTP Definition Type
  • Using the Groovy Definition Type

Command Line Tools

  • Command Line System Tools
  • jtool
  • jcat
  • jdescription
  • jevent
  • jecho
  • jftp
  • JFTP Return Codes
  • jgetcredential
  • jgetfile
  • jgetpar
  • jjoin
  • jlink
  • jlog
  • jmail
  • jmessage
  • jmonitor
  • jputfile
  • jregister
  • jrfc
  • jscp
  • jtool screenshot
  • jscript
  • jsecret
  • jsleep
  • jsplit
  • api-tool.jar

OpenVMS Process Servers

  • Creating HP OpenVMS Process Servers
  • Installing the Platform Agent on HP OpenVMS
  • Configuring HP OpenVMS Process Servers
  • File Events on HP OpenVMS
  • HP OpenVMS Definition Types

AS/400 Connector

  • IBM AS/400 Connector Architecture
  • Setting up the IBM AS/400 Connector
  • Creating an IBM AS/400 Process Server
  • Files on AS/400 Raise Events
  • Using the AS/400 Definition Type
  • Redwood Server OS Support
  • IBM z/OS Definition Types
  • Using the JCL_FTP Definition Type
  • IBM z/OS System Tools

Reference

  • Balancing the Load
  • Credential Protocols
← jmessagejputfile →

jmonitor, jtool monitor

A platform agent tool used to send monitor data values from within OS processes.

This tool cannot be used outside job-context; the -j or -job-context parameter is implied.

The Java server creates monitor nodes, checks and values automatically if needed.

Since a monitor value can only be set on a MonitorValue, and a MonitorValue needs to have a MonitorCheck as its parent node, and a MonitorCheck node must have a MonitorNode as its parent, the path that is passed needs to contain at least three levels, for example /RootNode[/ChildNode...]/Check/Value.

note

Although you are free to use any path, it is highly recommended to store the values under /System/ProcessServer/${process_server}/Custom/; you can create child nodes there to group specific values.

Syntax

jmonitor [-h|-?|-help] [-l <loglevel>] [-f <logfile>] -j|-job-context <path>=<value> ...
ArgumentDescription
-h,-?,-helpShow this help and exit.
-l <loglevel>Set the logging level.
-f <logfile>Log to file instead of stdout/stderr.
-j, -job-contextRun the command in job-context
<path>A monitor path.
<value>The new value for the monitor node.

Example

Ping Statistics

The following is a basic KSH script that is designed to run Linux and report ping statistics for the server defined in parameter P_SERVER, the update interval is defined in P_TIME; it sets the value to 9999 when the ping command times out or returns invalid data.

prc=`jtool getpar ProcessServer -l info || echo "Could not determine process server name.";exit 2`

while (true)
do
ms= `ping -c1 $P_SERVER | head -n 2 | tail -n 1 | sed 's/.*=//;s/\.//;s/ .*//'`

[ $input -ge 0 ] || ms= 9999
jmonitor /System/ProcessServer/$prc/Custom/PingStat=$ms
sleep $P_TIME
done

UNIX/Windows Perl Script for Disk Space Statistics

The following example shows the script source of a Perl script that runs on Microsoft Windows and UNIX systems with a GNU-like df binary. It finds out how much free space exists on the fixed disk drives / partitions and stores that data in the monitor tree.

use strict;

my $processServer = `jtool getpar ProcessServer -l info` or die "Cannot determine process server name";
$processServer =~ s/\s+$//;
my $cmd = "jtool monitor -l debug";
my $MonitorPath = " /System/ProcessServer/".$processServer."/Custom/Diskspace";

if ($^O eq "MSWin32")
{
  require Win32::OLE;

  my $server = Win32::NodeName();
  my $FIXED_DRIVE = 3;
  my $NETWORK_DRIVE = 4;

  my $locatorObj = Win32::OLE->new('WbemScripting.SWbemLocator') || die "Error creating locator object: ".Win32::OLE->LastError()."\n";
  $locatorObj->{Security_}->{impersonationlevel} = 3;
  my $serverObj = $locatorObj->ConnectServer($server,'root\cimv2',"","") || die "Error connecting to $server: ".Win32::OLE->LastError()."\n";

  printf "Free diskspace on $server:\n\n";
  printf "%-14s %-14s %-14s %-4s\n","Drive","Size","Free", "Perc";
  printf "%-14s %-14s %-14s %-4s\n","-" x 5,"-" x 14,"-" x 14, "-" x 4;

  foreach my $drive (Win32::OLE::Enum->All($serverObj->InstancesOf("Win32_LogicalDisk")))
  {
    next if ($drive->{DriveType} != $FIXED_DRIVE);

    my $dr = $drive->{DeviceID};
    my $fs = $drive->{FileSystem};
    my $sz = $drive->{Size};
    my $fb = $drive->{FreeSpace};
    my $perc = $fb / $sz * 100.0;
    printf "%-14s %-14.0f %-14.0f %-2.1f%%\n",$dr,$sz,$fb, $perc;
    $cmd .= $MonitorPath . "/" . $dr . "/Size=" . $sz;
    $cmd .= $MonitorPath . "/" . $dr . "/Free=" . $fb;
    $cmd .= $MonitorPath . "/" . $dr . "/PctFree=" . $perc;
  }
}
else
{
  # Assume UNIX with Gnu DF, for now
  open DF, "df -l -B1 |" or die "Cannot execute 'df': $!";
  printf "Free diskspace on `hostname`:\n\n";
  printf "%-14s %-14s %-14s %-4s\n","Drive","Size","Free", "Perc";
  printf "%-14s %-14s %-14s %-4s\n","-" x 14,"-" x 14,"-" x 14, "-" x 4;

  while (<DF>)
  {
    my ($fs, $sz, $us, $fb, $perc, $mount) = split /\s+/, $_;
    if ($mount =~ m/^\// && $sz > 1024 && $sz != $fb)
    {
      my $perc = $fb / $sz * 100.0;
      $mount =~ s/\//./g;
      $mount =~ s/\//./g;
      $mount =~ s/^\.//;
      $mount =~ s/^$/root/;
      printf "%-8s %-14.0f %-14.0f %-2.1f%%\n",$mount,$sz,$fb, $perc;
      $cmd .= $MonitorPath . "/" . $mount . "/Size=" . $sz;
      $cmd .= $MonitorPath . "/" . $mount . "/Free=" . $fb;
      $cmd .= $MonitorPath . "/" . $mount . "/PctFree=" . $perc;
    }
  }
  close DF;
}

print `$cmd`;

See Also

  • Command Line System Tools
← jmessagejputfile →
  • Syntax
  • Example
    • Ping Statistics
    • UNIX/Windows Perl Script for Disk Space Statistics
  • See Also
Docs
Getting StartedInstallationFinance InstallationConcepts
TroubleshootingArchiving
Learn and Connect
Support Portal
BlogEventsResources
ISO/ IEC 27001 Information Security Management
Automate to be human

2023 All Rights Reserved |

Terms of Service | Policies | Cookies | Glossary | Third-party Software | Contact | Copyright | Impressum |