Friday, April 10, 2009

Getting (a) PAL in two minutes – The Busy Dev’s Guide to the Performance Analysis of Logs (PAL) tool

Ask the Performance Team - Two Minute Drill: Performance Analysis of Logs Tool (PAL)

“Today’s post comes to us from Priyanka Rotti and Sudha N – two of our Support Engineers on the Performance team.  Reviewing Performance Monitor Logs can be one of the most daunting tasks for an administrator, especially if it’s not something that you do on a regular basis.  The Performance Analysis of Logs (PAL) tool can read Performance Monitor counter logs and analyzes them based on some pre-defined thresholds.  PAL includes threshold definitions for most of the major Microsoft products such as IIS, SQL Server, BizTalk Server, Exchange Server and Active Directory.  PAL isn’t intended to replace traditional performance analysis – but, it can help to cut down on some of the analysis time.  So, let’s dig right in

Once the analysis completes, an Internet Explorer window opens that displays the results of the analysis.  The data in this next section is generated from the sample Performance Monitor log file that is provided with the PAL tool.

1

Navigation through the report is fairly straightforward via the table of contents at the top of the page.  Each counter in the contents lists the number of alerts for that counter.  For our demonstration, let’s take a look at the Processor Utilization Analysis (the first one on our list):

2

As you can see, not only is there a description of what we are measuring, but also a visual representation of the counter (scaled for viewing ease!).  Just below that is the breakout of the values with some additional analysis (Std Deviation, Hourly Trend etc)

3

Each counter generates a similar report – making finding areas to investigate that much easier.  Remember, though that this tool is not designed to eliminate the analysis, rather it facilitates it.  Because we don’t have any contextual references or a baseline to compare our sample data to, there may not actually be anything to be concerned about with this system.

With that, it’s time to wrap up this Two Minute Drill.  We hope you enjoyed our post!

…”

I don’t PerfMon enough anymore to really be any good at it anymore (not that I was all the good to begin with, but at least I was comfortable with it…) so any help analyzing a log is help I’ll take.

Thursday, April 09, 2009

PowerShell, OpenXML, WMI and the PowerTools for OpenXML = Doc generation for our inner geek

OpenXMLDeveloper.org - Generating a document using PowerTools for Open XML and PowerShell

“In this article I have a go at creating an Open XML Document using Microsoft’s excellent PowerShell command-line environment. To do so I use PowerTools for Open XML, recently updated on CodePlex (http://www.codeplex.com/PowerTools).

As you’ll see it makes an otherwise difficult task really quite easy.

The scenario

To demonstrate this I’ve come up with what I think might be a reasonably real-world scenario. If not, hopefully it’s enough to get the concept across.

The scenario I chose is one of an SLA (service level agreement) type report. Imagine you’re a company providing an agreed level of service on servers for various clients. It’s quite likely you’d want to send your client details on how well you are fulfilling the SLA.

Here are the basic requirements for this report:

  • Create a PowerShell script that can be run for a specified client and computer name, and produces a single Word document.

  • The beginning of the output document will be tailored for the particular client.

  • The middle will be built up from 1 or more SLA metrics, using WMI information.

    • For simplicity’s sake I’m going to use simple WMI metrics for Processor Time % and Disk Time %

    • Depending on these metrics the appropriate Pass/Fail content will be output.

  • The end will be standard for all clients.

Getting Started

All going well you should end up with an output.docx file in the current directory looking like this...

untitled

Conclusion

Thanks to the PowerTools for Open XML we have a simple, but powerful way of building up a document using PowerShell.

PowerShell is very powerful in its own right, but I do believe it would have been a fairly painful to achieve this result without the PowerTools for Open XML.

…”

For whatever reason I find OpenXML doc gen via PowerShell weirdly attractive (like a moth to flame? ;)

(via US ISV Developer Evangelism Team - Generate a Server-side Documents Using PowerTools for OpenXML)

 

Related Past Post XRef:
Because it’s a PowerShell kind of day… PowerTools for Open XML V1.1 Released
OpenXML PowerTools updated – Cell your Excel via PowerShell
Powering into OpenXML with PowerShell

“Illustrated C# 2008” Free as in eBook curtsey of Red Gate

redgate - Boost your .NET expertise and performance at work

image

“…

Download your free ebook

Illustrated C# 2008
If you're a C++ or VB programmer migrating to C# 2008, this book is well worth reading. The author, Daniel Solis offers a very visual approach – with lots of figures, diagrams and code samples – that will help you get to work with C# fast.”

Because a week without a free ebook is a… well… um… what ever… ;)

image

(via Scattered Notes - Free "Illustrated C# 2008" ebook)

Monday, April 06, 2009

Sharing the Glow - Using TextGlow to display Word documents on SharePoint

Muhimbi - Displaying MS-Word files in a SharePoint Web Part using TextGlow and Silverlight

“…

This article shows you how to embed TextGlow into SharePoint and use it to display content stored in a Document Library. It is assumed that you are familiar with the Content Editor Web Part, if not then check out Todd Bleeker’s excellent resource on this topic.

TextGlow[5]

OK, let’s get started

  1. Make sure you have a copy of Silverlight 2.0 installed on your system
  2. Navigate to an existing or create a new SharePoint site collection.
  3. Download the TextGlow Silverlight viewer, unzip and copy the TextGlow folder (including the folder) to a document Library named ‘Shared Documents’
  4. Add a new Content Editor Web Part (CEWP) to a page of your choice and set the height to something suitable (I used 700 pixels),

…”

Okay, that’s just cool! And it looks like a no coding or server side tweaking solution. Will have to try this as soon as I get a few minutes…

(via James Newton-King - TextGlow SharePoint Web Part)

 

Related Past Post XRef:
See your OpenXML documents glow in Sliverlight via the newly open sourced TextGlow

Applying distance measuring, range finding magic to your digital picture collection – Range Finder

CodeProject - Range Finder

Rangefinder

Introduction

After a trip and when you are looking at your travel photos, sometimes you want to know some distances or sizes of objects in there. It’s somehow possible.

If you can find some objects in your photos which you know their sizes, you can measure their distances and if you know the distance of an object, you can find the size of it. For example if you know the height of a special building (e.g. Pharos or a tower) and you are kilometers far from it, you can measure your distance by a simple photo. Sometimes it is funny!

test7

test8

I don’t know the exact size of flag, but I guess it must be about 150 cm (5 feet), if so, I type 150 in the object size box and press enter. The program calculate the distance as about 3 Km.

test10

Points of Interest

Even with low accuracy of this program, I think it is sometimes good and you can have some fun with your photos. At least I hope so.

…”

That’s pretty neat…