Using the Linux GPU PerfStudio Server

Starting the Linux Server

Unlike the Windows server, the Linux server does not support drag & drop and is run from the command line. The normal usage is to change directory to your game or application folder or the folder where your game is started from and start the GPU PerfStudio Linux server from there, providing the full path to the GPU PerfStudio server. A simple example would be:

cd <game or application folder>
<full Path to GPU PerfStudio server executable>/GPUPerfServer <path to app/game executable>

i.e. if your game or application is called 'myGame' and is in the current folder, use:

~/GPUPerfStudio/GPUPerfServer32 ./myGame

These examples use the 32 bit Server. To use the 64 bit server, simply remove the '32' from the server filename.

Linux Server Command Line Options

The Linux server adds a couple additional command line options to the options already available on the Windows server (see GPU PerfServer options for more information). The additional options are:

If your game contains very complex command line parameters, the easiest way to handle this is to create a text file which would contain your application name and its command line options, for example:

myGame -w 1024 -h 768

Typically this would be a shell script but it doesn't have to be; it can be any text file. The advantage of using a shell script is that it can be tested to make sure the app works by itself (assuming it has executable permissions: use chmod +x <script name> )

When starting the GPU PerfStudio Server, add a -S option followed by the file containing the command, for example:

~/GPUPerfStudio/GPUPerfServer32 -S myscript.txt<BR>

For most games and applications, the above methods of starting the server are sufficient. For more complex applications, the GPU PerfStudio server can be started in "remote launch" mode. This allows you to start the game manually from another terminal window, which can be very useful if the game or application to be debugged is started from a launcher or script. An example of this would be debugging Steam games. In this case, you specify the -R option with no executable name:

~/GPUPerfStudio/GPUPerfServer32 -R

The server will display a message informing that your application needs to be started manually with LD_PRELOAD to force the GLServer.so into memory.

LD_PRELOAD

The GPU PerfStudio server uses a 'plugin' or shared library which needs to injected into your game or application. This plugin redirects all OpenGL API calls and forwards them to the server, which then forwards them to the client. When games are run from complex scripts such as Steam titles, any executables started by the script need to be injected with the plugin so that the API calls can be intercepted. LD_PRELOAD performs this operation.

The plugins now reside in a 'Plugins' directory. As with the server naming, files ending with '32' are 32 bit plugins.

To run the game manually, open another terminal window and firstly cd to where the game is normally run from. Then type:

LD_PRELOAD=<full path to the GPU PerfStudio folder>/Plugins/GLServer32.so <game name>

i.e.

LD_PRELOAD=/home/user/GPUPerfStudio/Plugins/GLServer32.so steam steam://run/570 GPU PerfServer Options

NOTE: It is important to match up the architecture types when specifying the server and the plugin. Notice here that the server and the plugin are both using the 32 bit components.

Additional Files

A config file (GPUPerfServer.cfg) is provided for the GPU PerfStudio servers and behaves in the same way as the Windows version. See GPU PerfServer options for more information.

When run, the GPU PerfStudio server will dump out data to a log file which is saved to the temporary folder (usually in /tmp/GPUPerfStudio/). As in the Windows version, by default it's called pslog.txt.