The Power of the SeeShell – PowerShell


I’m having the opportunity to test the SeeShell , a tool from Code Owls LLC (read Jim Christopher (@beefarino), created. I can say that so far I’m impressed. I will do some posts but for now I want to show a bit about the power of this tool (guys,you did not see the real-time display counters. it is AMAZING !!! I will show that in our PASS VC PowerShell meeting tomorrow )

I have a module to gathering the performance counters,it is easy to use and scale to n servers , in asynchronous mode using background jobs, with a command line .

In this module I have the option to store into a SQL Server table :

image

 

You can see that just for some test, I am using the counters Buffer Cache Hit Ratio and % Processor Time.

Obvious that is not the case in here, but we know that on SQL Server mostly  counters cannot be checked alone. So let´s say, just for test, that I need to check out this 2 counters, in a graphical mode.

First I need to aggregate my data by date :

   1: $ServerName = "Obiwan"                

   2: $Query = "

   3: with CTEPerfCounters_$($ServerName) ([date] ,[Buffer cache hit ratio],[%_Processor_Time])

   4: as

   5: (

   6:     select    substring(convert(varchar(10),[datetime],111),1,10) as Date,

   7:             avg([$($ServerName)_SQLServer:Buffer Manager_Single Instance_Buffer cache hit ratio]) ,

   8:             avg([$($ServerName)_Process_sqlservr_% Processor Time])

   9:     from    PerfCounters_$($ServerName)

  10:     group by substring(convert(varchar(10),[datetime],111),1,10)

  11:  

  12:  

  13: )

  14: select * from CTEPerfCounters_$($ServerName);"

  15: $Data = Invoke-Sqlcmd2 -Query $Query -Database SQLServerRepository    

Then  with a command line I can See..Shell Alegre

   1: $Data | out-chart -name 'SQL Server Counters - ObiWan' -type column -plot '%_Processor_time','Buffer cache hit ratio' -by date

 

image

 

Or If I want just the CPU History :

   1: $Data | out-chart -name 'CPU History - ObiWan' -type column -plot '%_Processor_time' -by date

 

image

 

What AWESOMESAUCE tool !!!! (that is a bit that we can do with SeeShell)

As Jim says….SeeShell….Show, Don’t Tell  Alegre

#PowerShellLIfeStyle

About Laerte Junior

Laerte Junior Laerte Junior is a SQL Server specialist and an active member of WW SQL Server and the Windows PowerShell community. He also is a huge Star Wars fan (yes, he has the Darth Vader´s Helmet with the voice changer). He has a passion for DC comics and living the simple life. "May The Force be with all of us"
This entry was posted in Powershell, SQL SERVER EM GERAL, Virtual Pass BR. Bookmark the permalink.

1 Response to The Power of the SeeShell – PowerShell

  1. Pingback: PowerShell – Diversas « Alex Souza

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s