Page 1 of 1
Calculate Time taken for a TM1 server between start and be ready
Posted: Fri Apr 28, 2017 3:26 pm
by LutherPaul
Hi All,
We want to create a share point page to display how long it takes to start a TM1 server. As we all know the process (TM1SD.exe) starts but server actually ready after loading all the cubes into memory.
Can anyone suggest a way to record the process start time into a database table? I don't want to read the log file from a TI process as the file grows large, the system gets hung. Server Ready Time can be obtained using startup chore. Ideally, I want a process within TM1 so it gets easy to manage.
Thanks,
Paul.
Re: Calculate Time taken for a TM1 server between start and be ready
Posted: Fri Apr 28, 2017 4:20 pm
by declanr
I can't think of anyway to do that in TM1 itself without reading the log file. In fact the only way I could think of getting that time when someone told the service to start, without using the log file; would be to actually record it as its started e.g. run the net start from a batch file that also records the time somewhere.
TM1 obviously cant do that as it hasn't started yet (unless you used another TM1 service to start it.)
There is also certainly a way you could get the info from windows process logs but I don't know them well enough to provide guidance on that.
Re: Calculate Time taken for a TM1 server between start and be ready
Posted: Fri Apr 28, 2017 4:27 pm
by tomok
It's fairly easy to get the time when the service is ready, just create a process that writes the current time to the database and put in a chore that runs every minute. Once the service is up it will run. Just put a flag in the database to hold the fact that it has already been run so the process can be halted afterwards. It's getting the start time of the server load. The current service cannot do it because it isn't ready. However, you could trigger the service from a different TM1 service and use that service to write to the database. Not the most elegant way but it should work.
Re: Calculate Time taken for a TM1 server between start and be ready
Posted: Fri Apr 28, 2017 6:54 pm
by Paul Segal
Powershell is your friend here: start the TM1 service using a powershell script which writes a time-stamp to a file, then performs a start-service on your tm1server. Once the server is up read the file with the time-stamp into TM1 as part of the startup chore as outlined by Tom and you have your answer.
Re: Calculate Time taken for a TM1 server between start and be ready
Posted: Fri Apr 28, 2017 7:35 pm
by jim wood
You could start the service with a batch file that creates a file containing the current date and time. Then within Tom's chore that runs every miunte check to see if the file exists. If it does load the details then delete the file,
Jim.
Re: Calculate Time taken for a TM1 server between start and be ready
Posted: Fri Apr 28, 2017 7:54 pm
by BrianL
You could also try using the
StartupChores config option to run your chore as the very last step in server startup. This would eliminate the need to schedule the chore to run every minute.