[Kst] stripchart question

Barth Netterfield netterfield at astro.utoronto.ca
Wed Nov 9 15:33:50 CET 2005

curfiles as used in BLAST:

In BLAST, there is a program called "defile" which reads from a data server 
over the net, and logs data to dirfiles.  The dirfile is <ctime>.x/ where 
<ctime> is the c-format time.  So, for example, it might be writing 
to /data/rawdir/1044243000.x/

So to read the last 1000 frames of fields GYRO1 and GYRO2 from this file we 
might run:

cbn at elrond ~ $  kst -y GYRO1 -y GYRO2 -n 1000 /data/rawdir/1044243000.x/

This will plot GYRO1 and GYRO2 in stripchart mode, scrolling as the data comes 

Now imagine defile is restarted, so that it is writing to a new file, 
say /data/rawdir/1044249000.x/  
The kst session we had been running will still be looking at the old file, and 
so will not be updating to new data any more.

To solve this, we use a curfile:
When defile starts writing to  /data/rawdir/1044243000.x/ it also creates a 
file /data/etc/defile.cur.  This file contains only the name of the dirfile 
it is writing to, "/data/rawdir/1044243000.x/"

Now when we run kst we would run

cbn at elrond ~ $  kst -y GYRO1 -y GYRO2 -n 1000 /data/etc/defile.cur

kst learns from reading /data/etc/defile.cur that it should be 
reading /data/rawdir/1044243000.x/.  When defile restarts and starts to write 
to  /data/rawdir/1044249000.x/, it also overwrites /data/etc/defile.cur, 
changing the contents to "/data/rawdir/1044249000.x/"

kst will notice this change, and begin to read 
from  /data/rawdir/1044249000.x/.

On November 7, 2005 07:28 am, Taco Walstra wrote:
> On Friday 04 November 2005 20:18, Barth Netterfield wrote:
> You are right, it's different than I thought. Especially the example by Ted
> Kisner was helpful in understanding these blast dirfiles. Perhaps anybody
> can tell me a few things connected with the previous question on
> autogeneration
> of stripcharts:
> > A second convenience item kst has is the concept of indirect (.cur)
> > files: the program which is logging data writes a file (logger.cur) which
> > just lists the directory of files we are logging to.  We refer to this
> > indirect file in kst. Then if the logger restarts, or changes its
> > directory, then kst automatically picks up the change.  This makes
> > deleting old logger files easy.
> I didn't find yet any information on this concept. Can you tell me more,
> because this is one the problems why I was looking for a dcop solution.
> Our experiment generates datastreams which can change (in BLAST concept: at
> certain times new directories with format files are created or stopped). I
> understand it is possible to let kst know to monitor certain directories
> listed in this cur file? So, changing such a file could automatically show
> the new stream and/or let other plots disappear?
> Apart from this, is there an easy way of passing characteristics such a
> plot like the number of samples, counting from the end etc. (I mean by
> already running kst and no user mouse clicking).
> TW
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst

More information about the Kst mailing list