Qorus Integration Engine
3.0.4.p7
|
Contents of this section:
Use the ocmd command to call a system service method. Using this command, parameters can also be easily passed to the service method as well. If the service is not already loaded, then it is loaded and initialized before the method is called.
The syntax is as follows:
unixprompt% ocmd omq.system.service.<name>.<method> [params]
The command’s output is dependent on the service method being called. Here is the output for the omq.system.service.omqmap.reload() method:
OK
If an error message appears, see the following section for causes.
Error: No Such Service
ERROR: OMQ-NO-SERVICE: system service "<name>" does not exist
Possible Cause | Action to Take |
The service name is incorrect | Check the service name and type and try the command again. |
Error: No Such Method
ERROR: OMQ-SERVICE-NO-METHOD: system service <name>/<ver> has not registered method "<method>" (available methods: <list>)
Possible Cause | Action to Take |
The method name is incorrect | Check the method name against the list returned in the error message, and try the command again. |
Error: Communication, Authentication, and Environment Error
See Common Client Errors for more information. These errors could affect any network client, including Qorus command-line tools.
Calling a user service is just like calling a system service, except the word “system" is replaced with “user" in the command line. If the service is not already loaded, then it is loaded and initialized before the method is called.
The syntax is as follows:
unixprompt% ocmd omq.user.service.<name>.<method> [params]
The command’s output is dependent on the service method being called. Here is example output for a hypothetical user method that gives no output but returns success:
OK
If an error message appears, see the following section for causes.
Error: No Such Service
ERROR: OMQ-NO-SERVICE: user service "<name>" does not exist
Possible Cause | Action to Take |
The service name is incorrect | Check the service name and type and try the command again. |
Error: No Such Method
ERROR: OMQ-SERVICE-NO-METHOD: user service <name>/<ver> has not registered method "<method>" (available methods: <list>)
Possible Cause | Action to Take |
The method name is incorrect | Check the method name against the list returned in the error message, and try the command again. |
Error: Communication, Authentication, and Environment Error
See Common Client Errors for more information. These errors could affect any network client, including Qorus command-line tools.
To stop a system service, it must be deleted from the Qorus service cache by calling the omq.system.delete-service() API method with the service’s name as the only parameter as follows:
unixprompt% ocmd [omq.system.]delete-service <service>
If the service is currently loaded, then it will be deleted. If it is running, it will be stopped before it’s deleted. The output should look as follows:
OK
If an error message appears, see the following section for causes.
Error: No Such Service
ERROR: OMQ-NO-SERVICE: system service "<name>" does not exist
Possible Cause | Action to Take |
The service name is incorrect | Check the service name and type and try the command again |
The service is not currently loaded | Take no action, because the service has either already been unloaded or was never loaded |
Error: Communication, Authentication, and Environment Error
See Common Client Errors for more information. These errors could affect any network client, including Qorus command-line tools.
Stopping a user service is very similar to stopping a system service. To stop a user service, call the omq.user.delete-service() API method with the service’s name as the only parameter as follows:
unixprompt% ocmd omq.user.delete-service <service>
If the service is currently loaded, then it will be deleted. If it is running, it will be stopped before it’s deleted. The output should look as follows:
OK
If an error message appears, see the following section for causes.
Error: No Such Service
ERROR: OMQ-NO-SERVICE: user service "<name>" does not exist
Possible Cause | Action to Take |
The service name is incorrect | Check the service name and type and try the command again |
The service is not currently loaded | Take no action, because the service has either already been unloaded or was never loaded |
Error: Communication, Authentication, and Environment Error
See Common Client Errors for more information. These errors could affect any network client, including Qorus command-line tools.
Upgrading a service involves the following steps:
Use the ostatus –sv command to verify that the correct version of the service is loaded.
For instance if user service “service" version 1.0 is being replaced with “service" version 1.1, then the following commands will perform a live upgrade of the service:
unixprompt% oload @service-release-1.1.qrf ... unixprompt% ocmd omq.user.reset-service service OK