BAT & Perfmon

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

BAT & Perfmon

Post by Eric »

Does anyone know if there is a way to use Batch files or CommandLine() to start performance monitoring (windows Run command perfmon)on the server, NOT TM1 Server with performance cubes. As always trying to see how many ways I can circumvent the IT department when executing new ETL's on Dev.
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
User avatar
Daniel Lennon
Posts: 6
Joined: Fri May 30, 2008 6:33 am
OLAP Product: TM1
Version: 9.1 SP2 Build 9.1.2.49
Excel Version: 2003 2007
Location: Sydney, Australia

Re: BAT & Perfmon

Post by Daniel Lennon »

Hi Eric,

You could always use VB in Excel...

Sub PerfMon()
Shell "perfmon", 1
End Sub

Kind Regards,
Daniel.
rossi
Posts: 29
Joined: Tue Jun 10, 2008 8:50 pm
Location: London UK

Re: BAT & Perfmon

Post by rossi »

Hi Daniel
Do you have an example of the VB please?
thank you
Paolo
prossi45@hotmail.com
User avatar
Daniel Lennon
Posts: 6
Joined: Fri May 30, 2008 6:33 am
OLAP Product: TM1
Version: 9.1 SP2 Build 9.1.2.49
Excel Version: 2003 2007
Location: Sydney, Australia

Re: BAT & Perfmon

Post by Daniel Lennon »

Sub PerfMon()
Shell "perfmon", 1
End Sub
Kind Regards,
Daniel.
rossi
Posts: 29
Joined: Tue Jun 10, 2008 8:50 pm
Location: London UK

Re: BAT & Perfmon

Post by rossi »

cheers for that
Paolo
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: BAT & Perfmon

Post by Eric »

I used the command line to open an excel file that when it opens it runs the perfmon shell and then closes the excel file. Works perfect thanks!

Ok dumb question time. :?

How do I stop the perfmon in VBA?
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
User avatar
Steve Rowe
Site Admin
Posts: 2416
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: BAT & Perfmon

Post by Steve Rowe »

A complete guess, did you try Shell "perfmon",0 ?
Andy Key
MVP
Posts: 351
Joined: Wed May 14, 2008 1:37 pm
OLAP Product: TM1
Version: 2.5 to PA
Excel Version: Lots
Location: Sydney
Contact:

Re: BAT & Perfmon

Post by Andy Key »

Eric,

If you want to use the same Excel approach you can use:

Code: Select all

Sub ClosePerfMon()
   AppActivate "Performance"
   SendKeys "%{F4}", True
End Sub
Note: "Performance" is the title of the PerfMon window under XP, check that it is the same under your server OS, and %{F4} translates to Alt F4.

You need to be aware though, that if you have other foreground applications running on that server and one of those grabs the focus between the AppActivate and the SendKeys it will get the Alt F4 sent to it rather than to PerfMon.
Andy Key
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: BAT & Perfmon

Post by Eric »

Awesome!

Think I can use the same methodology to kill winzip after a backup? (If anyone doesn't know. If you call winzip via TI it will zip everythin, but it will not close after it is completed.
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
Andy Key
MVP
Posts: 351
Joined: Wed May 14, 2008 1:37 pm
OLAP Product: TM1
Version: 2.5 to PA
Excel Version: Lots
Location: Sydney
Contact:

Re: BAT & Perfmon

Post by Andy Key »

Eric,

Can you not use the WinZip command line interface (WZZIP)?
Andy Key
User avatar
Mike Cowie
Site Admin
Posts: 482
Joined: Sun May 11, 2008 7:07 pm
OLAP Product: IBM TM1/PA, SSAS, and more
Version: Anything thru 11.x
Excel Version: 2003 - Office 365
Location: Alabama, USA
Contact:

Re: BAT & Perfmon

Post by Mike Cowie »

Just to add another command-line zipping utility to the list, I've had really good luck using 7ZIP, which is freeware:
http://www.7zip.com/

I haven't used it directly from TM1, but have done some extracting and zipping from other apps where a command-line EXE was needed.

Regards,
Mike Cowie
QueBIT Consulting, LLC

Are you lost without Print Reports in Planning Analytics for Excel (PAfE)? Get it back today, for free, with Print Reports for IBM Planning Analytics for Excel!
Post Reply