# Starting kdb+ tick setup

**URL:** https://forum.kx.com/t/starting-kdb-tick-setup/11633
**Category:** Community Support
**Tags:** kdb-and-q
**Created:** [November 6, 2017, 9:51pm UTC](https://forum.kx.com/t/starting-kdb-tick-setup/11633 "2017-11-06T21:51:00Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![21sumitkhanna](https://avatars.discourse-cdn.com/v4/letter/2/f14d63/32.png) [@21sumitkhanna](https://forum.kx.com/u/21sumitkhanna)
#### Post date: [November 6, 2017, 9:51pm UTC](https://forum.kx.com/t/starting-kdb-tick-setup/11633/1 "2017-11-06T21:51:00Z")

</div>

My current setup: Server\_1: Linux 3.10 x86\_64 Server\_2: windows server 2008 Kdb+tick setup on Server\_1 -StartTickerplant.sh: q tick.q sym log -p 5010 -startRDB.sh: q tick/r.q :5010 :5012 -p 5011 -startHDB.sh: q log/sym -p 5012 Steps to start tickerplant, rdb ,hdb: \* From server\_2 open 3 putty sessions to server\_1. \* Putty 1 : ./startTickerPlant.sh \* Putty 2 : ./startRDB.sh \* Putty 3 : ./startHDB.sh Everything is going well but if the putty session terminates(may be due to network connectivity issue or something else) the q process dies. Question: is the above approach correct? How do I run this properly? Thanks, Sumit

---

<div class="post-metadata">

### Author: ![effbiae](https://avatars.discourse-cdn.com/v4/letter/e/ecae2f/32.png) [@effbiae](https://forum.kx.com/u/effbiae)
#### Post date: [November 7, 2017, 12:06am UTC](https://forum.kx.com/t/starting-kdb-tick-setup/11633/2 "2017-11-07T00:06:00Z")

</div>

the “nohup” Linux command might help:

&nbsp; $ nohup&nbsp;q tick.q…

check the docs - it helps make sure a process (here, q) doesn’t terminate when the shell exits.

---

<div class="post-metadata">

### Author: ![hzadonis](https://avatars.discourse-cdn.com/v4/letter/h/87869e/32.png) [@hzadonis](https://forum.kx.com/u/hzadonis)
#### Post date: [November 8, 2017, 4:42am UTC](https://forum.kx.com/t/starting-kdb-tick-setup/11633/3 "2017-11-08T04:42:00Z")

</div>

Maybe need a “&” for every command, such as: ./startTickerPlant.sh&

? 2017?11?7??? UTC+8??5:53:15?21sumi…@gmail.com???

> My current setup:  
> Server\_1: Linux 3.10 x86\_64  
> Server\_2: windows server 2008
> 
> Kdb+tick setup on Server\_1  
> -StartTickerplant.sh:  
> q tick.q sym log -p 5010
> 
> -startRDB.sh:  
> q tick/r.q :5010 :5012 -p 5011
> 
> -startHDB.sh:  
> q log/sym -p 5012
> 
> Steps to start tickerplant, rdb ,hdb:  
> \* From server\_2 open 3 putty sessions to server\_1.  
> \* Putty 1 : ./startTickerPlant.sh  
> \* Putty 2 : ./startRDB.sh  
> \* Putty 3 : ./startHDB.sh
> 
> Everything is going well but if the putty session terminates(may be due to network connectivity issue or something else) the q process dies.
> 
> Question: is the above approach correct?  
> How do I run this properly?
> 
> Thanks,  
> Sumit

---

<div class="post-metadata">

### Author: ![michael\_mcparla](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@michael\_mcparla](https://forum.kx.com/u/michael_mcparla)
#### Post date: [November 8, 2017, 11:04am UTC](https://forum.kx.com/t/starting-kdb-tick-setup/11633/4 "2017-11-08T11:04:00Z")

</div>

Hi Sumit,

Typically speaking when I start a production process I use a combination of nohup (as mentioned below), redirect and &&nbsp;operators.

“nohup” (no hang up)&nbsp;gives a&nbsp;processes the potential to stay alive and running after the parent session/terminal has terminated or disconnected.

A useful link to these commands is given below which explains the individual parts better than I can.

https://stackoverflow.com/questions/10408816/how-do-i-use-the-nohup-command-without-getting-nohup-out

Typically, I also direct the standard error and standard out to a seperate file as well, so that any logging information is also available.

A typical start line would look something like:

nohup q&nbsp; myscript.q -p 1234&nbsp;\</dev/null \>mylog.txt 2\>&1 &

Im far from an expert here, and really only copying the work from some of the frameworks available online at github (google kdb+ framework) but&nbsp;one tip I can share is that if&nbsp;a q session started with the syntax above isnt given a port to listen on the session, it will terminate. [“It has no reason to live”]

Michael

---

<div class="post-metadata">

### Author: ![21sumitkhanna](https://avatars.discourse-cdn.com/v4/letter/2/f14d63/32.png) [@21sumitkhanna](https://forum.kx.com/u/21sumitkhanna)
#### Post date: [December 31, 2017, 8:57pm UTC](https://forum.kx.com/t/starting-kdb-tick-setup/11633/5 "2017-12-31T20:57:00Z")

</div>

Thanks for the reply.  
Sumit
