› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › tcl help to count no of messages and append to the top › Reply To: tcl help to count no of messages and append to the top
I’m still not quite
Does the log file continuously grow, with insufficient space for it locally? Log files can’t grow forever–how often does the log get ‘zeroed’ and a new log started? How reliable is the retrieval time? Does it happen at the same time every hour?
I’d think retrieving/processing a file via ftp in a tps would be too darned slow. I think what I’d do if there were no way around it would be a slight modification of what Michael suggested: generate your log file locally, and a separate file with the current count (the hci extensions have a set of Ctr* procs for manipulating counter files.) First you’d append the new messages to the message file, updating the count. Open your new log, write the count, then close it and cat
Now, you couldandifcopyun
If you can’t control when the file will be picked up, you can use clock
Whatever you do, for this kind of thing, you really need to build in a bunch of tests for not re-transmitting information that’s already been retrieved (I speak from bitter experience.) Never, ever have more than one copy of the data available for different entities to process. There is no way to guarantee things will be in sych if you do.