AquaQ setup help

Hello All,

I am fairly new to kdb+ and I am having trouble setting up AquaQ and loading the torq.q in windows os.  

I have set up the environment variables correctly.  I have changed the process.csv to include my computer name.  

| host | port | proctype | procname |
|
|
|
|
|
| hoffmanpc | 5013 | hdb | hdb2 |

Then I start q, open port 5013. (ie q) \p 5013)

and then try and load torq.q ( ie. q) \l c:\TORQFULL\TORQ\srs\torq.q )

from there the AquaQ banner is displayed with a message ‘could not create alias in windows os’ and I get an error log

2014.12.30D20:31:39.905744000|hoffmanpc|hdb2|ERR|fileload|failed to load C:\TORQFULL\TORQ\src\code/handlers/logusage.q : c: No such host is known.

Any ideas?

Hi Roni

I think the problem is how the environment variables are set up.  q expects paths to always be / separated regardless of OS, so it looks like you’ve set up the env variables on windows with .  TorQ doesn’t try to automatically correct that (though we’ll change that in the next version).  You should switch the env vars to be / separated.  The “could not create alias” message is fine - it should just be letting you know that it can’t. 

The usual way to run TorQ is to load it from the command line with a set of start up options.  The start up options and a bit of info can be seen if you run 

q torq.q -usage

So normally to run a script within TorQ you would do 

q torq.q -p 5013 -load myfile1.q [myfile2.q … myfileN.q]

(or you can use loaddir to load a whole directory of scripts in a specific order as well)

Probably also useful is the -debug flag e.g. 

q torq.q -p 5013 -load myfile1.q [myfile2.q … myfileN.q] -debug

as otherwise all output will be directed to out/error logs which is good in production but not so great for development. 

You can also load TorQ from an already running process/script in the same way that you are doing, but you would need to pass in the command line flags (e.g. -debug) to the outer script. 

Let us know if you have any other questions

Thanks 

Jonny

Thank you so much Johnny, it was the \ / in the env variables that was causing it.  I do have another quick question.  

I am running just a small test script with a simple table in it, and I am inserting and querying the table, but I don’t see anything in the log files other than heartbeats.  I haven’t changed or overwritten anything so it was my understanding that all logging is on by default.  Am I missing something?

Hi Roni

No problem. 

For the test script, how are you inserting the data?  In the default set up, if the message comes in async and is any of (upd;.u.upd;”upd”;”.u.upd”) then it does not get logged.  This is how kdb+ tick passes messages around and the idea is to avoid logging all these updates. 

If you want to modify it, there are two places that you can look at changing in the config script (config/settings/default.q or a specific config script for your process).  .zpsignore defines the function patterns that will completely bypass any async message handler checks (logging, permissioning etc.).  The default setup is

\d .zpsignore

enabled:1b                                      // whether its enabled

ignorelist:(upd;"upd";.u.upd;“.u.upd”)        // list of functions to ignore 

The second place is specific to the logging functionality.  Only (`upd;”upd”) are ignored by default:

// Configuration used by the usage functions - logging of client interaction

\d .usage

enabled:1b                      // whether the usage logging is enabled

logtodisk:1b                    // whether to log to disk or not

logtomemory:1b                  // write query logs to memory

ignore:1b                       // check the ignore list for functions to ignore

ignorelist:(`upd;“upd”)         // the list of functions to ignore in async calls

flushtime:1D00                  // default value for how long to persist the in-memory logs. Set to 0D for no flushing

suppressalias:0b                // whether to suppress the log file alias creation

logtimestamp:{.z.d}           // function to generate the log file timestamp suffix

LEVEL:3                         // log level. 0=none;1=errors;2=errors+complete queries;3=errors+before a query+after

logroll:1b                      // Whether or not to roll the log file automatically (on a daily schedule)

(it’s overkill to do it in both places, but it’s there for the usage logging in case the zpsignore is disabled)

If you want to test it from the process itself you can pass it through the 0 handle, which goes through .z.ps e.g. 

0(upd;mytable;(data))

Also, the heartbeating is logged as the timer is invoked through the 0 handle by default.  To switch that off, change .timer.logcall. 

Thanks 

Jonny