[ts-gen] where are the ticks?

R P Herrold herrold at owlriver.com
Tue Dec 12 18:50:41 EST 2006


On Tue, 12 Dec 2006, our APAC Debian user wrote:

> Anyway, to cut to the chase, just where exactly is the tick 
> data supposed to be written?  I was under the impression 
> that it was written to /var/log/messages (or redirected to 
> another file by editing /etc/syslog.conf ) but I'm not seeing 
> any more lines with symbols (not even YM, which was present 
> before); only a couple lines of numbers which appear during 
> startup (e.g. Dec 12 10:20:53 vigil : 
> shim|real|0.26|16370|37252| 1074261|4|100|5|# |4|100|5) and 
> then nothing.

That is customary startup content.

> This is especially baffling because before I DID see 
> multiple lines with the YM symbol and you made a comment 
> that strongly implied that I was indeed looking at YM's 
> price action (or lack thereof.)

Yes indeed -- you are going to groan when I tell you what is 
probably happening.

> So where are these tick events being sent?  Why aren't they 
> being sent to /var/log/messages anymore when I haven't even 
> changed shim versions?  Were they ever sent to messages or 
> am I suffering from some colossal misunderstanding?

I think the answer is much simpler -- The contract may have 
rolled and a new front month has appeared;  this will result 
in a new ContractID, and an old subscription just never gets 
any more ticks, because it is ... expired.  There are no ticks 
on an expired contract.

> Just to be clear, I'm starting TWS and running shim --data 
> and that's it.  I just tried the latest version of the shim 
> with the same results.

Do this first as an approach on diagnostics; as a general 
rule, it is always the first ting to do, and to make sure is 
working, as it is done by us hundreds of times in a week.  It 
should _always_ work -- Here is what I do, (I have wrapped up 
this in a script so I can do it trivially):

1. Pull and make the shim, having patched to taste for your 
database and TWS specics

 	$ make shim

2. For this pass, we will refer to this step later in this 
email.

3. Run the self tests -- if your database is not up to version 
"current shim dbms version 1.17", you may need to reload it

 	$ make test

I publish a transcript of what you should see in a session 
at:
 	http://www.trading-shim.org/faq/?example

4.  For this pass, we will refer to this step later in this
email.

5. Optionally test the trading functions:

 	$ bin/unsafe

> On a somewhat-related note, the 'pipe' option doesn't seem 
> to work (or am I incorrect in assuming that usage would be 
> as simple as ./shim --data pipe > shimlog.txt ?) Nothing is 
> written to the log.

Yes -- That pipe is not the pipe I have refered to in past 
email -- pipes are generally useful files for transient data, 
as one does not need to clean up after them, and at times they 
can be left unnamed.

Particularly, in our case without steps 2 and 4 above, you 
should find a file 'ShimBits' right next to the shim binary 
which is a pipe.  It should be possible to 'cat' it just like 
any other file; _once_, as that 'empties' the pipe


At step 2, do this BEFORE running 'make test':

$ touch ShimBits
$ chmod 755 ShimBits

and then at step 4, you can 'less' through the file at your 
leisure.  That pair of commands had the effect of 
making "ShimBits" a conventional file, which is 
acceptable to the shim when it goes to open and 
append to it.

Remember to empty it out before another session or it will 
confuse you ;)

$ > ShimBits

Good luck -- as always, we w
elcome reports and questions

-- Russ Herrold


More information about the ts-general mailing list