Synopsis
[Windows]
jobschmsgevent message event name [:project name[/job net name]] [host name|-f: file name] [-t:type] [-p param [-c suffix]] [-sys {all | subsystem-number}](*1)
[UNIX]
jobschmsgevent message event name [:project name[/job net name] [message text]] [-h host name] [-t:type] [-p param [-c suffix]] [-sys {all | subsystem-number}](*1)
[-sys {all | subsystem-number}] is the option of Systemwalker Operation Manager EE.
Description
The jobschmsgevent command generates a message event.
If a message event is generated by this command, the message event of "nnnn message event has occurred" (message text, where nnnn is a message event name) is output in the event log, along with the source name "MpJobsch" and event ID "2301". A message event is generated to local host if both host name and file name are not specified. [Windows]
The message event generated by this command becomes valid for all job nets of all projects if the project name is omitted.
If both host name and file name are omitted, this command generates a message event on the local host. [Windows]
Options
message event name
Specify the name of message event that you want to generate within 12 bytes.
project name
Specify this option when you want to generate the message event only for the job nets in a particular project.
job net name
Specify this option when you want to generate the message event only for a particular job net.
message text [UNIX]
Specify any text string.
host name [Windows]
-h host name [UNIX]
Specifies the host name of the server where message events are generated. Specify it within 64 bytes using alphanumeric characters. If omitted, the message event is generated on a local host.
-f: file name [Windows]
Specifies the file name containing a list of host names of servers where message events are generated
-t: type [Windows]
Specifies the type of the message event to be generated, when is output to the event log.
If omitted, the default is "-t:INFO".
Specify one of the following:
"Information" is output.
"Warning" is output.
"Error" is output.
-p param
Specify the variable parameter to be passed to each job in the job net started by the message event. If this option is specified, the "@.VPARAM@" variables in the job definitions will be replaced with the specified variable parameter when the job net starts as a result of receiving the message event.
Specify the variable parameter using a string that is no more than 200 bytes long. The variable parameter should not include user-defined characters.
The variable parameter can be omitted. In this case, the "@.VPARAM@" variables in the job definitions will be replaced with an empty string before the jobs start.
Only job nets that wait for a single message event and job nets that wait for only one of several message events can receive the variable parameter specified by this option.
The variable parameter is also passed to job nets in the second and lower levels of nested job nets (child job nets).
This option can only be specified once.
-c suffix
Use a string of up to 30 bytes long to specify the suffix that is attached to the names of job nets that are copied and started. If this option is specified, the target job nets that are started with a variable parameter specified will be copied to a job net whose name has the specified suffix appended, and the copied job net will be started. For nested job nets, job nets at the second and lower levels are also copied.
Alphanumeric characters and hyphens (-) can be used, but only alphanumeric characters can be used for the first character. Be sure to specify this option together with (but after) the "-p" option.
The job net names and job net comments of copy destination job nets become "copy source job net name (or comment) + underscore (_) + string specified by the suffix option".
Copying takes place when the job net starts (or, for nested job nets, when the parent job net starts). Copy destination job nets are overwritten the next time a job net with the same name is copied.
Note that this option is invalid for job nets in groups.
-sys {all|subsystem-number}
In the system with multiple subsystems, this option is used to specify a subsystem as operating target. If omitted, the default is subsystem 0.
However, if the job is executed as a Jobscheduler job in a subsystem environment, the number of this subsystem will be assumed.
All subsystems are targeted for operation.
Specify the operation target subsystem number using a range of 0 to 9.
Command Location
Windows | Systemwalker Operation Manager installation directory\MpWalker.JM\bin |
Solaris | /usr/bin |
Cautions
The user ID used to execute this command is also required for the host on which message events are generated.
If the job net waiting for message event is in any of the following states, the message event cannot be recognized when it has occurred.
The job net is in a running state. (*1)
The job net is in a warning state. (*1) (*2)
The job net is in a disabled state.
The job net is in an abended state. (*3)
The job net is in a cancelled state. (*4)
The count of cumulative message occurrence exceeded 255 times. (*5)
The job net waiting for a message event falls on the unscheduled day. (*6)
The [Once in a day] option for [Start only when message event has occurred] is selected as the execution condition and the job net has already been started. (*7)
The message event can be recognized if the "Valid during job net execution" is selected in the Message sheet of the Job Net Properties window. The job net will be started the same number of times as the number of message events that have occurred while the job net is running. Note that the job nets are not started at the same time.
Only a job net with the Job Execution Control attribute can be in a warning state.
The message event can be recognized if the job net belongs to a group. Job nets that do not belong to a group are also recognized if the Validate job net confirmation checkbox in the Advanced Settings for Verification window has not been selected.
The message event can be recognized if the job net belongs to a group. Job nets that do not belong to a group are also recognized if the Check canceled checkbox in the Advanced Settings for Verification window has not been selected.
If the execution condition of job net is specified as [Start only when message event has occurred], it internally retains the count of message events occurrence. This occurrence count refers to the cumulative occurrence count. This occurrence count is incremented by one as a message event occurs, while it is decreased by one as the job net is executed when a message has occurred. Note that the cumulative occurrence count of message events should not exceed 255.
The message event can be recognized if the "Valid only on startup days" is not selected.
The message event can be recognized again after the [Reinstate] operation has been performed.
When writing a list of host names, enter one host name within 64 bytes per line.[Windows]
In the host name list, the first host name must be specified in column 1. No comments are allowed in the file. [Windows]
The server function of Systemwalker Operation Manager for Windows must be installed on the host where message events are generated. [Windows]
The Server service for Windows must be started in advance on the host where message events are generated. [Windows]
The jobschmsgevent command functions to record events to the application event log of the specified host. Due to this, note the following: [Windows]
It is necessary that the host where message events are generated is able to authenticate the user ID used to execute the jobschmsgevent command.
For example, when executing the command as a job of Systemwalker Operation Manager, confirm that the target server can authenticate the logon account of the Systemwalker MpMjes service.
If the event log reaches full, events cannot be written and the execution of the jobschmsgevent command may fail.
Before starting system operation, increase the size of log on the properties of the application event log or specify "Overwrite Events as Needed" to avoid capacity shortage.
NetBIOS interfaces are used for recording the event log. Therefore, when you establish firewall among servers that have message link to restrict ports of NetBIOS interfaces, message event notification cannot be executed correctly. In this case, do not specify the host name with the jobschmsgevent command, and execute it as a network job.
If you wish to generate message events to a different host, you must execute this command as an administrator user.
Using a network job eliminates the need to consider which user executes the command. Therefore, use a network job to generate message events on the request host. (However, this does not apply to cases where the user who executed the command belongs to the Guests group. Refer to the cautions below.) [Windows]
If message events are generated on the local host and the user ID which issues the jobschmsgevent command belongs to the Guests group, the message events may fail to occur. Issue the jobschmsgevent command with a user ID that is not a member of the Guests group. [Windows]
When you specify a host name by using the "-h host name" option, the UNIX version of the Systemwalker Operation Manager server function must be installed. However, if you do not want to generate a message event on the local host (namely, when you do not specify the "-h host name" option), you need not to install the Job Execution Control function on the local host.[UNIX]
Execute the following script when generating a message event from Systemwalker Operation Manager EE to Systemwalker Operation Manager SE.
[Windows]
set JOBSCH_SUB_SYSTEM= jobschmsgevent %* setecode.exe %ERRORLEVEL%
The following example shows the command field for the job to execute the above script:
Drive name:\Path name\jobschmsgevent.bat MsgA HostName |
[UNIX]
#!/bin/csh unsetenv JOBSCH_SUB_SYSTEM jobschmsgevent $* exit $status
The following example shows the command field for the job to execute the above script.
/Path name/jobschmsgevent.sh MsgA -h HostName |
Note the following points if a variable parameter is specified using the -p option.
For the variable parameter, specify a string that does not exceed the maximum number of characters and does not contain any invalid characters for the definition item that replaces the @.VPARAM@ variable in the job definitions for the job net to be started. If the job definitions become invalid as a result of replacing the variable parameters, the job will not execute and will terminate abnormally with completion code 245 or 246.
Do not generate message events by specifying this option for job nets that cannot receive variable parameters.
This option cannot be specified if the host where the message event is generated is running a version prior to V13.2.0.
An underscore (_) and a suffix are appended to the name and comment of the destination job net. Make sure that the lengths of the source job net name, source job net comment, and suffix are such that the lengths of name and comment for the job net that is created by copying do not exceed the maximum lengths. If any of the maximum lengths is exceeded, the job net fails to be copied and started.
For the Enterprise Edition, there is no limit to the number of job nets that can be registered, but if a large number of job nets are copied then thorough performance tests should be conducted to check that job nets start on schedule without any problems. For details, refer to "Tuning of Performance" in the Systemwalker Operation Manager User's Guide and "Reference Information (Know-how, etc.)" in the Systemwalker Operation Manager Technical Guide.