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 :
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 ![]()
1: $Data | out-chart -name 'SQL Server Counters - ObiWan' -type column -plot '%_Processor_time','Buffer cache hit ratio' -by date
Or If I want just the CPU History :
1: $Data | out-chart -name 'CPU History - ObiWan' -type column -plot '%_Processor_time' -by date
What AWESOMESAUCE tool !!!! (that is a bit that we can do with SeeShell)
As Jim says….SeeShell….Show, Don’t Tell ![]()
#PowerShellLIfeStyle




Pingback: PowerShell – Diversas « Alex Souza