You are on page 1of 2

Automatic Batch Sage X3 Server Activation on Linux

In order to script a batch server startup you will first need to get the environmental variables the batch
server runs with, and the command line used to fire it, as these could vary from system to system. The
best way to do this is to start a batch server and view the process’s parameters from the /proc
filesystem.

1. Fire up the Batch Server from X3 and get the Process ID.

2. Open up a command line session on the linux application server. Change directory to
/proc/{PROCCESS ID} in this case /proc/31819

3. Run xargs –null –max-args=1 < cmdline


a. This will give you a readable format of the cmdline pseudo-file which will show you the
command line and arguments that the batch server was run with. In this case the
command line would be: adonix -a -s 1807 -l ENG SERVX3

4. Run xargs –null –max-args=1 < environ


a.

b. This will give you all the environmental variables (it will be a long list) the script was run
with. Open notepad and start a bash script with the traditional #!/bin/sh
c. Copy in the environmental variables and place an ‘export’ before each variable, I also
deleted any variables that were blank, and the last one
_=/opt/Sage/X3V7/runtime/bin/adonix

This is the full path to the adonix command, add the full path adonix command at the
end of your notepad script with the command line options from above.
5. The Finished Script:

6. Make the script executable, and you can now run it. I would not run it as root, use the sage
user. The sage user on my system is sagex3. If you don’t know your sage user, a quick ls –la in
the /proc/{PROCCESS ID} directory will show you who the process is running as.

You might also like