Server Loaded and Ready

Post Reply
User avatar
Eric
MVP
Posts: 373
Joined: Wed May 14, 2008 1:21 pm
OLAP Product: TM1
Version: 9.4
Excel Version: 2003
Location: Chicago, IL USA

Server Loaded and Ready

Post by Eric »

OK This weekend our TM1 server decided to freeze up. I restarted the service and waited for 35 minutes for it to be back up and running. After 35 minutes, the time it has taken to restart for about a year, the TM1 Server was still not available. Checking the server everything was running fine, but data was still loading No big deal should be up any minute.

I found myself refreshing available servers every minute for 15 more minutes! :x
This annoyance lead me to a question. I currently have TI processes in place to send emails if there is an error. Is there some kind of flag or trigger in TM1 or in Windows that I can leverage to send an email when the server is loaded and ready?

*After I got it up and running I found that the culprit was a new cube with all kinds of calculations and feeders.
Regards,
Eric
Blog: http://tm1-tipz.blogspot.com
Articles: http://www.google.com/reader/shared/use ... /label/TM1


Production: 32 bit 9.0 SP2, Windows 2000 Advanced Server. Web: 32 bit 9.0 SP2, Windows 2000 Server. Excel 2003
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: Server Loaded and Ready

Post by rmackenzie »

Is there some kind of flag or trigger in TM1 or in Windows that I can leverage to send an email when the server is loaded and ready?
Unfortunately, the short answer is no.

I think you'd have to monitor the % processor usage of either the tm1s.exe or tm1sd.exe process and see when it dropped to zero to determine that the server was fully loaded and ready.
User avatar
Renaud MARTIAL
Posts: 25
Joined: Thu May 15, 2008 10:18 am
Location: Paris, France

Re: Server Loaded and Ready

Post by Renaud MARTIAL »

Hello,

we've managed to be notified when our TM1 Server is ready by a shell script (It's on an Unix box ...) that searches the string 'TM1 Server is ready' in the tm1smsg.log file, then displays a message.

The code looks like:

Code: Select all

bReady=0
sFile=/usr/local/tm1/logdir/tm1smsg.log
while [ "$bReady" = "0" ] ; do
  # wait 1 second ...
  sleep 1

  #   extract the last line from tm1smsg.log
  #  then search 'TM1 Server is ready'
  sLine=`tail -1 $sFile | grep -i 'TM1 Server is ready' `

  # Check if the string has been found.
  # if the resulting variable (sLine) contains  'TM1 Server is ready' , the server is started.
  # else, the string should be empty ("")
  if [ "$sLine" != "" ] ; then
     # ok, line has been found.
     # the server is ready
    bReady=1
  fi
done
echo "the server is ready"
(I don't know if it can be rewritten as a windows batch file ...)

Regards,
Renaud.
Last edited by Renaud MARTIAL on Mon Aug 25, 2008 1:17 pm, edited 1 time in total.
User avatar
Alan Kirk
Site Admin
Posts: 6606
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Server Loaded and Ready

Post by Alan Kirk »

Renaud MARTIAL wrote:Hello,

we've managed to be notified when our TM1 Server is ready by a shell script (It's on an Unix box ...) that searches the string 'TM1 Server is ready' in the tm1smsg.log file, then displays a message.

{Snip}

(I don't know if it can be rewritten as a windows batch file ...)
Mmm... fiendishly ingenious! I might see what can be done there with a little modification to a VB app that I once wrote. It was designed to check for the presence or absence of files, but also had snippets to sometimes read the contents of text files as well when it needed to. I haven't looked at it for ages.

The only problem is that I think that under Windows, that method will only work with later versions of TM1. If memory serves me correctly the earlier versions have the log files locked up tight and no outside app could access them. I seem to recall that they later changed that, but it wasn't until... 9.1? It was something that I read in the release notes, which I don't have to hand at present.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: Server Loaded and Ready

Post by rmackenzie »

The only problem is that I think that under Windows, that method will only work with later versions of TM1
From memory, that is the case pre 9.1. I had a situation where I needed to access the tm1smsg.log and I had to stop the server and take a copy of the file in order to get a look at it outside of Server Explorer.
Robin Mackenzie
User avatar
Eric
MVP
Posts: 373
Joined: Wed May 14, 2008 1:21 pm
OLAP Product: TM1
Version: 9.4
Excel Version: 2003
Location: Chicago, IL USA

Re: Server Loaded and Ready

Post by Eric »

Alan Kirk wrote:
Renaud MARTIAL wrote:Hello,

we've managed to be notified when our TM1 Server is ready by a shell script (It's on an Unix box ...) that searches the string 'TM1 Server is ready' in the tm1smsg.log file, then displays a message.

{Snip}

(I don't know if it can be rewritten as a windows batch file ...)
Mmm... fiendishly ingenious! {Snip}
I second that motion. Renaud gets the :ugeek: award!

I have never worked with Shell Script, but now I have a reason to take a peak.
Regards,
Eric
Blog: http://tm1-tipz.blogspot.com
Articles: http://www.google.com/reader/shared/use ... /label/TM1


Production: 32 bit 9.0 SP2, Windows 2000 Advanced Server. Web: 32 bit 9.0 SP2, Windows 2000 Server. Excel 2003
Post Reply