Products Downloads


French version


 

It is possible to check certain Job manager functions using a command line: For example, you can stop the Job manager or start an agent in batch mode.

The command enables notifications to be sent to the Job manager.

To use this command, you must have administrator permissions for the Job manager.

 

The syntax of the command is as follows:

 

gsnotify.exe <IniEnvironmentFile> [<IniUserFile>] [ d<logical_server>] [ u<user>  p<password>] " nnotification" ....

 

The parameters are as follows:

 

Parameter name

Description

<EnvironmentFile>

The parameter file of the Job manager.

<UserFile>

User parameter file (optional).

-d<logical_server>

Logical server for the connection.

-u<user>

User name.

-p<password>

User password.

-n<notification>

Notification to be sent.

...

Additional parameters specific to notifications.

 

In general, notifications and their parameters (Job manager name, agent name, etc.) are case sensitive.

The status of the command can be checked by referring to the error level ("errorlevel"):

  • errorlevel 0: No errors have occurred.
  • errorlevel 1: Warnings occurred, the process was completed.
  • errorlevel 2: An error occurred, the process was interrupted.

 

Recognised notifications are listed below.

 

<activate_queue> notification

This notification allows you to check whether or not the Job manager queues are activated. Warning: the queue is put on hold immediately.

The parameters are as follows:

 

Parameter name

Description

-s<JM_list>

List of the Job managers to be notified (for example: -sJM1;JM2).

Default value: *ALL (all active Job managers).

-q<queue_list>

List of queue IDs (for example: -q1;2).

Default value: *ALL (all queues).

-a<0|1>

Queue activation.

Default value: -a1.

 

For example:

  • To globally deactivate the queues:
    gsnotify -nactivate_queue -a0

 

  • To activate queues 1 and 2 on JM1 and JM2:
    gsnotify -nactivate_queue -sJM1;JM2 -q1;2 -a1

 

<stop_service> notification

This notification is used to force the Job managers that were specified as a parameter to stop.

The parameters are as follows:

 

Parameter name

Description

-s<JM_list>

List of the Job managers to be notified (for example: -sJM1;JM2).

Default value: *ALL (all active Job managers).

 

For example:

  • To stop all Job managers:
    gsnotify -nstop_service

 

  • To stop Job managers JM1 and JM2:
    gsnotify -nstop_service -sJM1;JM2

 

<kill_job> notification

This notification is used to force specific jobs to stop.

The parameters are as follows:

 

Parameter name

Description

-j<job_ID_list>

List of the job IDs that you want to stop (for example: -j2236;2238).

No default value.

 

For example:

  • To stop jobs 2336 and 2337:
    gsnotify -nkill_job -j2336;2337

 

<start_agent> notification

This notification is used to run the agents that were specified as a parameter.

The parameters are as follows:

 

Parameter name

Description

-a<agent_list>

List of agents (for example: -aagent1;agent2).

Default value: *ALL (all agents that have not been started or that are not deactivated).

 

For example:

  • To start the "test 1" and "test 2" agents:
    gsnotify -nstart_agent "-atest 1;test 2"

 

  • To start all agents:
    gsnotify -nstart_agent

 

<stop_agent> notification

This notification is used to stop all agents that were specified as a parameter.

The parameters are as follows:

 

Parameter name

Description

-a<agent_list>

List of agents (for example: -aagent1;agent2).

Default value: *ALL (all agents that have not been started or that are not deactivated).

-t<timeout>

Time allowed for the agent to stop (for example: -t30s).

Default value: 0 (indefinite wait time).

The possible values are as follows:

-1 immediate stop (equivalent to kill command),

0 indefinite wait time,

>0 specified stop time. The agent will be killed if it does not stop within the specified time.

The default unit is minutes (-t5 = 5 minutes, but it is possible to specify a different unit (h/m/s): -t5h = 5 hours, -t5s = 5 seconds).

-wait

The command checks that the notifications have been taken into account before returning control.

In this case, the command returns control if:

the specified agents have finished running,

the relevant Job managers are no longer responding (detection can take up to a minute),

an error occurs when querying the status of the agents.

 

For example:

  • To stop the "test 1" and "test 2" agents with an indefinite wait time:
    gsnotify -nstop_agent "-atest 1;test 2" -wait

 

  • To stop all agents with a timeout of 5 minutes, with a wait time applying before the notifications are taken into account and return of control:
    gsnotify -nstop_agent -t5m -wait

 

 

Top of page


  • Aucune étiquette