Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

From time to time, something happens to our website that makes it slow and unresponsive. Inevitably, this happens at like 3 AM, on a day when all the devs have gone to bed early.

Are there any good tools for taking a "snapshot" of the state of the webserver and the db server at that moment? I want to get an email with a full report -- what was the CPU doing? any process thrashing disks? ASP.NET worker process queue out of control? long-running db queries?

This is for a Windows Server 2008 R2 box running IIS, and a SQL Server 2008 R2 instance.

Basically, I want to be able to see enough stuff that I have some hope of figuring out what was making things slow.

share|improve this question
1  
How is it different from old good performance data collection?Snapshot assumes instant state but you would get much more understanding if you can see trends and historical data too. –  Sergei Dec 28 '11 at 16:22
    
I'm not opposed to getting historical data -- right now, I'm just looking for a tool that will get the data at all. –  Jesse Dec 28 '11 at 22:21
    
Could you please clarify what OS, DB and webserver you use? –  Sergei Dec 29 '11 at 13:55
    
Added details to description above. –  Jesse Dec 29 '11 at 23:23

4 Answers 4

My guess is that your CPUs go into sleep state. So try to monitor the state of the CPUs...

share|improve this answer
    
Thanks, Nils. I'm really looking for something that can collect more comprehensive data. –  Jesse Dec 28 '11 at 22:21

If you want a complete quiesced copy of your server the most obvious way to do this would be by making the machine run as a VM on a decent hypervisor, they all support snapshotting and this would be easy to do.

share|improve this answer

Sounds like you could use a monitoring program with trending information. I don't know what solution will work best for you in the Windows world, but I will describe in general terms how I would tackle a similar problem on a Linux box using a monitoring program called Zabbix (Zabbix can monitor Windows, but the server must run on Linux). The methods will be different for you, but the concepts will be the same and hopefully they can be useful to you as a guide.

First I could configure Zabbix to monitor the CPU load on my host, along with memory and so forth. I would consider having it monitor the syslog on the host as well, though I'm always able to review the syslog on the local system.

I would then set up a trigger which would activate when the cpu utilization rose above 90% after hours. I would associate an action with the trigger which was a remote command which would run a script on the remote host. The script would pull a dump of the currently running processes, along with some other text data, and push it to the Zabbix server. The data would be pushed into a log item specifically meant for trapping this data within the host context. Alternatively I could have the remote script do a larger dump of system data and email it to specific users.

share|improve this answer

The best way to approach this issue would be performance data collection, as boring as it may sound.
For Windows hosts, in my humble opinion, Perfmon still provides best way to do it.This is what I would do: Run perfmon with basic counters before and during problem period (few hours), this should include main counters for ram, disk, network and cpu.Use Performance Analys Tool PAL http://pal.codeplex.com/releases/view/51623 to analyze resulting logs.PAL report in shape of HTML page should give you some graphs and warn you if you have performance problems. PAL also has profile for SQL servers performance.
For better understnading perfmon results and fixing underlying problems, I suggest reading following articles:
http://www.grumpyolddba.co.uk/monitoring/monitoring.htm ( section about counters) http://www.brentozar.com/sql/sql-server-performance-tuning/ http://www.sqlservercentral.com/blogs/sqlmanofmystery/2009/09/14/the-fundamentals-of-storage-systems-introduction/

share|improve this answer
    
Perfmon counters are good, but still won't get me the kind of comprehensive what's-going-on-when-the-site-is-slow snapshot I want. I basically want to dump the everything the Resource Manager shows, plus the list of pending requests for each IIS worker process, plus SQL server's list of running queries, package it all up and email it automatically. –  Jesse Jan 5 '12 at 21:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.