Finding out if a server is loaded and ready

Post Reply
sophie
Posts: 17
Joined: Wed Jul 07, 2010 10:05 am
OLAP Product: TM1
Version: 9.4
Excel Version: 11.8320.8221SP3

Finding out if a server is loaded and ready

Post by sophie »

Hi,

I am looking for some way to find if a TM1 server has finished loading after the recycle.
Right now, I keep refreshing my client every few minutes to check if a server is available.
I also periodically check the tm1server.log to verify "the server is ready" message.
I tried to write a script which will check the last line of the server log to confirm if the server has loaded. But that will not work if the server started running processes after it came up.
Is there a way to find this out through some other means?

Appreciate your help.

Sophie
anoops81
Posts: 101
Joined: Tue May 12, 2009 8:20 am
OLAP Product: TM1
Version: 9.5.2
Excel Version: Office 2010

Re: Finding out if a server is loaded and ready

Post by anoops81 »

Hi Sophie ,

We have an approximate time in mind for our server startup , it is about 20 minutes . So we check after 20 minutes once the server is restarted , The timing will be almost same if no significant changes like production move has been made .

I would like to hear from the tm1 experts also on this . Any suggestions are most welcome .


Regards
Anoop
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Finding out if a server is loaded and ready

Post by tomok »

In the logging directory of your TM1 server you will find a text file called tm1server.log. Scan this text file from the bottom up and look for a message that says "TM1 Server is ready" with a current date and time stamp.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Andy Key
MVP
Posts: 352
Joined: Wed May 14, 2008 1:37 pm
OLAP Product: TM1
Version: 2.5 to PA
Excel Version: Lots
Location: Sydney
Contact:

Re: Finding out if a server is loaded and ready

Post by Andy Key »

Easy! Just use the built in AfterStartup trigger to send you an alert!

Oh no, hang on, there isn't one is there...

Best suggestion I can come up with would be to create an API app that repeatedly grabs the list of servers from the admin server.

Haven't got the API doco here, but isn't the code to loop through the available servers one of the samples? Not suggesting it is a complete solution - it is an API example after all, but could be a good starting point.
Andy Key
sophie
Posts: 17
Joined: Wed Jul 07, 2010 10:05 am
OLAP Product: TM1
Version: 9.4
Excel Version: 11.8320.8221SP3

Re: Finding out if a server is loaded and ready

Post by sophie »

@ tomok - Yes, this is what we have been doing right now but it gets increasingly hectic as we have a long list of TM1 instances to check under different admin hosts.

@ Andy Key - Thanks for your suggestion. I do not have much idea about API but will go through the guides and let you know if I come across some way to do this.
afshin
Posts: 29
Joined: Sun Sep 05, 2010 2:45 am
OLAP Product: TM1
Version: 9.5
Excel Version: 2003

Re: Finding out if a server is loaded and ready

Post by afshin »

lookup PowerShell

and particular this website.

http://msmvps.com/blogs/richardsiddaway ... -file.aspx

cgywin is another option !!
sophie
Posts: 17
Joined: Wed Jul 07, 2010 10:05 am
OLAP Product: TM1
Version: 9.4
Excel Version: 11.8320.8221SP3

Re: Finding out if a server is loaded and ready

Post by sophie »

I tried out PowerShell, it looks like it cannot understand the "Tail-File" function and get the below error. Get-content works.

The term 'Tail-File' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the
name, or if a path was included, verify that the path is correct and try again.


I am looking for some way other than scanning through the server log because we never know how many lines we need to scan from the bottom of the file because, by the time we execute the command to check if our services are up, our scheduled processes might have started running and write into the server log.
ellissj3
Posts: 54
Joined: Tue Jun 15, 2010 1:43 pm
OLAP Product: Cognos TM1
Version: 9.0 - 10.2
Excel Version: 2010

Re: Finding out if a server is loaded and ready

Post by ellissj3 »

Sophie,

You could take a copy of the log files for each instance (as .txt file) and use a TI to scan the files for the record containing the below:

TM1.Server --------------------Session Start--------------------

Collect the Timestamp on the file (StartTime) and then scan for:

TM1.Server TM1 Server is ready

Collect the Timestamp on the file for this record (EndTime). I haven't tried this, but you should be able to then change both to serial time and do a difference between (endtime - starttime). See below formulas, as I got that decimal from another forum member on this site. You would have to do some work to add a counter if you were only interested in the logs from the start of the last service reboot.

ElapsedTime = ROUND ((EndTime - StartTime) / 0.000011574074074074) / 86400;
FormattedTime =TIMST(ElapsedTime, '\h:\i:\s');

Write the formatted time to a cube or kick it out to an ASCII file.
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Finding out if a server is loaded and ready

Post by David Usherwood »

@Sophie, I haven't done much handson with Powershell, but a quick google for Tail-file disclosed that it's another module (they call it a cmdlet - yech :) ).
But thinking more about what you want to do, I went looking for grep - a Unix (etc) pattern matching tool. Turns out this is done by findstr, which _is_ builtin. Think this approach will work better than using TI but yes, it does mean learning a new tool.
Post Reply