1. Web Service Configuration

There are 2 configuration parameters for the web service in the file generic.xml in the config directory, ws_port and sqlite_db. ws_port defines the port on which the service will run and sqlite_db defines the location of the SQLite database file where job related data is stored. By default a temporary file location is used by specifying TMP. If :memory: is used an in-memory SQLite database will be used, however the data in this location will not be stored after the webservice stops and is incompatible with functionality such as time profiling, for this reason an on-disk location is recommended.

   <sqlitedb>
        <sqlitedb_dir>TMP</sqlitedb_dir>
   </sqlitedb>

  <webservice>
   <ws_port>8080</ws_port> 
  </webservice>

The webservice can be configured under the GUI under the Jobs option.

Figure 10.1. Jobs Option

Jobs Option


Under Options you can Enable/Disable the Jobs interface. If disabled no Job related information will be stored in the SQLite database. When enabled you have the option to set the port that the Web Service will listen on and to start and stop the Web Service.

Figure 10.2. Jobs and Web Service Configuration

Jobs and Web Service Configuration

When running the Status button will show the Web Service environment.

Figure 10.3. Web Service Status

Web Service Status

The same commands can also be run from the CLI to enable or disable Jobs and to start/stop the Web Service.

hammerdb>wsport
Web Service Port set to 8080

hammerdb>wsstart
HammerDB Web Service v5.0
Copyright © HammerDB Ltd hosted by tpc.org 2019-2025
Type "help" for a list of commands
Starting HammerDB Web Service on port 8080

hammerdb>wsstatus
Web Service running: Service Environment

BASE_URL = http://localhost:8080
DOCUMENT_ROOT = {C:/Program Files/HammerDB-5.0}
HTTP_ACCEPT_ENCODING = gzip,deflate
HTTP_HOST = localhost:8080
HTTP_USER_AGENT = {Mozilla/5.0 (Windows; U; Windows NT 11.0) http/2.10.0 Tcl/9.0.1}
PATH_HEAD = env
PATH_INFO = /env
PATH_TAIL = {}
QUERY_STRING = {}
REMOTE_ADDR = ::1
REMOTE_PORT = 50668
REQUEST_METHOD = GET
REQUEST_URI = /env
SAME_ORIGIN = 0
SCRIPT_FILENAME = {C:/Program Files/HammerDB-5.0/wait}
SCRIPT_NAME = {}
SELF_URL = http://localhost:8080/env
WAPP_MODE = server
[pwd] = {C:/Program Files/HammerDB-5.0}

hammerdb>wsstop
Stopping HammerDB Web Service on port 8080

You can also start and stop the Web Service directly. With no arguments or the argument of wait the Web Service will wait in listening mode.

C:\Program Files\HammerDB-5.0>hammerdbws.exe
HammerDB Web Service v5.0
Copyright © HammerDB Ltd hosted by tpc.org 2019-2025
Type "help" for a list of commands
Starting HammerDB Web Service on port 8080

With the argument of nowait the Web Service will return a prompt. This allows you to manually interact with the Web Service API and return Job related html to the prompt.

hammerws>jobs
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link href="http://localhost:8080/style.css" rel="stylesheet">
<title>HammerDB Results</title>
</head>
<body>
<p><img src='[wapp-param BASE_URL]/logo.png' width='347' height='60'></p><h3 class="title">TPROC-C</h3><div class='hammerdb' data-title='TPROC-C'><div><ol style='column-width: 20ex;'>
<br><table>
<th>Jobid</th><th>Database</th><th>Date</th><th>Workload</th><th>NOPM</th><th>Status</th>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FCE0332EBC03E233833393&amp;index'>67FCE0332EBC03E233833393</a></td><td>MSSQLServer</td><td>2025-04-14 11:15:15</td><td>Benchmark Run</td><td>114933</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FCE28C952103E233638313&amp;index'>67FCE28C952103E233638313</a></td><td>MSSQLServer</td><td>2025-04-14 11:25:16</td><td>Benchmark Run</td><td>200793</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FCE4E6FBD803E203830323&amp;index'>67FCE4E6FBD803E203830323</a></td><td>MSSQLServer</td><td>2025-04-14 11:35:18</td><td>Benchmark Run</td><td>304053</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FCE741632603E283939313&amp;index'>67FCE741632603E283939313</a></td><td>MSSQLServer</td><td>2025-04-14 11:45:21</td><td>Benchmark Run</td><td>523579</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FCE99DCB1103E283432303&amp;index'>67FCE99DCB1103E283432303</a></td><td>MSSQLServer</td><td>2025-04-14 11:55:25</td><td>Benchmark Run</td><td>652453</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FCEBFC34C903E253436393&amp;index'>67FCEBFC34C903E253436393</a></td><td>MSSQLServer</td><td>2025-04-14 12:05:32</td><td>Benchmark Run</td><td>595501</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FCEE5C9FB403E253138363&amp;index'>67FCEE5C9FB403E253138363</a></td><td>MSSQLServer</td><td>2025-04-14 12:15:40</td><td>Benchmark Run</td><td>720003</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FCF0BFBD5903E223635363&amp;index'>67FCF0BFBD5903E223635363</a></td><td>MSSQLServer</td><td>2025-04-14 12:25:51</td><td>Benchmark Run</td><td>907883</td><td><img src='http://localhost:8080/star.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FCF640535803E203131313&amp;index'>67FCF640535803E203131313</a></td><td>MSSQLServer</td><td>2025-04-14 12:49:20</td><td>Benchmark Run</td><td>--</td><td><img src='http://localhost:8080/nostatus.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FCF6837B5803E263138393&amp;index'>67FCF6837B5803E263138393</a></td><td>MSSQLServer</td><td>2025-04-14 12:50:27</td><td>Benchmark Run</td><td>--</td><td><img src='http://localhost:8080/nostatus.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FCF6C7A3A603E243034343&amp;index'>67FCF6C7A3A603E243034343</a></td><td>MSSQLServer</td><td>2025-04-14 12:51:35</td><td>Benchmark Run</td><td>--</td><td><img src='http://localhost:8080/nostatus.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FCF70BCC9203E233437323&amp;index'>67FCF70BCC9203E233437323</a></td><td>MSSQLServer</td><td>2025-04-14 12:52:43</td><td>Benchmark Run</td><td>--</td><td><img src='http://localhost:8080/cross.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FCFAC9746E03E263236333&amp;index'>67FCFAC9746E03E263236333</a></td><td>MSSQLServer</td><td>2025-04-14 13:08:41</td><td>Benchmark Run</td><td>708605</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FCFCF04FB603E243333373&amp;index'>67FCFCF04FB603E243333373</a></td><td>MSSQLServer</td><td>2025-04-14 13:17:52</td><td>Benchmark Run</td><td>--</td><td><img src='http://localhost:8080/nostatus.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD036A2C5603E203036343&amp;index'>67FD036A2C5603E203036343</a></td><td>MSSQLServer</td><td>2025-04-14 13:45:30</td><td>--</td><td>--</td><td><img src='http://localhost:8080/nostatus.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD036F2EE703E293236373&amp;index'>67FD036F2EE703E293236373</a></td><td>MSSQLServer</td><td>2025-04-14 13:45:35</td><td>Benchmark Run</td><td>--</td><td><img src='http://localhost:8080/nostatus.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD04DB800803E253230373&amp;index'>67FD04DB800803E253230373</a></td><td>MSSQLServer</td><td>2025-04-14 13:51:39</td><td>Benchmark Run</td><td>839906</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD204460F303E253236303&amp;index'>67FD204460F303E253236303</a></td><td>MSSQLServer</td><td>2025-04-14 15:48:36</td><td>--</td><td>--</td><td><img src='http://localhost:8080/nostatus.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD204460F303E253239333&amp;index'>67FD204460F303E253239333</a></td><td>MSSQLServer</td><td>2025-04-14 15:48:36</td><td>Benchmark Run</td><td>497658</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD2477E1E703E223433393&amp;index'>67FD2477E1E703E223433393</a></td><td>MSSQLServer</td><td>2025-04-14 16:06:31</td><td>Schema Build</td><td>--</td><td><img src='http://localhost:8080/cross.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD2488EBAE03E213935323&amp;index'>67FD2488EBAE03E213935323</a></td><td>MSSQLServer</td><td>2025-04-14 16:06:48</td><td>Schema Delete</td><td>--</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD24A6FDB403E253438393&amp;index'>67FD24A6FDB403E253438393</a></td><td>MSSQLServer</td><td>2025-04-14 16:07:18</td><td>Schema Build</td><td>--</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD27F5F66603E293838383&amp;index'>67FD27F5F66603E293838383</a></td><td>MSSQLServer</td><td>2025-04-14 16:21:25</td><td>Benchmark Run</td><td>--</td><td><img src='http://localhost:8080/nostatus.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD28A55F8F03E223834333&amp;index'>67FD28A55F8F03E223834333</a></td><td>MSSQLServer</td><td>2025-04-14 16:24:21</td><td>Benchmark Run</td><td>264796</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD2A43565C03E223637343&amp;index'>67FD2A43565C03E223637343</a></td><td>MSSQLServer</td><td>2025-04-14 16:31:15</td><td>Benchmark Run</td><td>306939</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD2E49BBF103E223533373&amp;index'>67FD2E49BBF103E223533373</a></td><td>MSSQLServer</td><td>2025-04-14 16:48:25</td><td>Benchmark Run</td><td>121771</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD2E86E09203E203633373&amp;index'>67FD2E86E09203E203633373</a></td><td>MSSQLServer</td><td>2025-04-14 16:49:26</td><td>Benchmark Run</td><td>177765</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD2EC458F103E213535323&amp;index'>67FD2EC458F103E213535323</a></td><td>MSSQLServer</td><td>2025-04-14 16:50:28</td><td>Benchmark Run</td><td>198787</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD306A130D03E223736383&amp;index'>67FD306A130D03E223736383</a></td><td>MSSQLServer</td><td>2025-04-14 16:57:30</td><td>Benchmark Run</td><td>92488</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD30A8263E03E293139363&amp;index'>67FD30A8263E03E293139363</a></td><td>MSSQLServer</td><td>2025-04-14 16:58:32</td><td>Benchmark Run</td><td>207184</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD30E64B0303E273435373&amp;index'>67FD30E64B0303E273435373</a></td><td>MSSQLServer</td><td>2025-04-14 16:59:34</td><td>Benchmark Run</td><td>248089</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD338BDEB103E213738303&amp;index'>67FD338BDEB103E213738303</a></td><td>MSSQLServer</td><td>2025-04-14 17:10:51</td><td>Benchmark Run</td><td>--</td><td><img src='http://localhost:8080/nostatus.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD37FE858303E283337393&amp;index'>67FD37FE858303E283337393</a></td><td>MSSQLServer</td><td>2025-04-14 17:29:50</td><td>Benchmark Run</td><td>--</td><td><img src='http://localhost:8080/nostatus.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD381F98BF03E293831313&amp;index'>67FD381F98BF03E293831313</a></td><td>MSSQLServer</td><td>2025-04-14 17:30:23</td><td>Benchmark Run</td><td>533119</td><td><img src='http://localhost:8080/tick.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD3BCDCA9503E263436333&amp;index'>67FD3BCDCA9503E263436333</a></td><td>MSSQLServer</td><td>2025-04-14 17:46:05</td><td>--</td><td>--</td><td><img src='http://localhost:8080/cross.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD3BE0D61603E283130383&amp;index'>67FD3BE0D61603E283130383</a></td><td>MSSQLServer</td><td>2025-04-14 17:46:24</td><td>--</td><td>--</td><td><img src='http://localhost:8080/cross.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD3BFAE53403E243839353&amp;index'>67FD3BFAE53403E243839353</a></td><td>MSSQLServer</td><td>2025-04-14 17:46:50</td><td>--</td><td>--</td><td><img src='http://localhost:8080/cross.png'></td></tr>
<tr><td><a href='http://localhost:8080/jobs?jobid=67FD3C792EF803E253533323&amp;index'>67FD3C792EF803E253533323</a></td><td>MSSQLServer</td><td>2025-04-14 17:48:57</td><td>Benchmark Run</td><td>400301</td><td><img src='http://localhost:8080/tick.png'></td></tr>
</table>
</ol></div>
<h3 class="title">TPROC-C Performance Profiles</h3><div><ol style='column-width: 20ex;'>
<br><table>
<th>Profile ID</th><th>Jobs</th><th>Database</th><th>Max Job</th><th>Max NOPM</th><th>Max TPM</th><th>Max AVU</th>
<tr><td><a href='http://localhost:8080/jobs?profileid=1'>Profile 1</a></td><td>21</td><td>MSSQLServer</td><td><a href='http://localhost:8080/jobs?jobid=67FCF0BFBD5903E223635363&amp;index'>67FCF0BFBD5903E223635363</a></td><td>907883</td><td>2111880</td><td>24</td></td></tr>
</table>
</ol></div>
<h3 class="title">TPROC-H</h3><div class='hammerdb' data-title='TPROC-H'><div><ol style='column-width: 20ex;'>
<br><table>
<th>Jobid</th><th>Database</th><th>Date</th><th>Workload</th><th>Geomean</th><th>Status</th>
</table>
No TPROC-H jobs found in database file C:&#92;temp&#92;hammer.DB</ol></div>
<h3 class="title">Env</h3><br><div><ol style='column-width: 20ex;'>
<table>
<th>SQLite</th><th>Size (bytes)</th><th>Web Service</th>
<tr><td>C:&#92;temp&#92;hammer.DB</td><td>372,736</td></td><td><a href='http://localhost:8080/env'>Configuration</a></td></tr>
</table>
<br>
</body>
</html>