httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Flowering Weeds <>
Subject [users@httpd] Charting web stats or whatever
Date Sat, 07 Mar 2009 21:46:34 GMT


Charting all types of Windows information.


Here one uses Log Parser, a Windows free data parser, great for
parsing Apache and IIS log files, plus tons of other data parsing,
and as shown here, as a chart maker for Windows PowerShell data.


Windows PowerShell (like grep, bash, and more but all in one process)
is the Windows .NET admin's automation tool. So by using Log Parser 
and PowerShell one can chart all web server process stats, web server 
log information, web site usage stats and much more! But here one charts 
notepad handles counts, so all Windows users can play along.


Start two notepad processes then


The below can be put into a name.ps1 file


PS > .\name.ps1


or enter each line on a PowerShell prompt line.


$lp = (Get-Command LogParser.exe).FileVersionInfo.FileName


$theProcesses = gps note*




$workStr = "Handles,PID`n" +
  "$($theProcesses[0].Handles),$($theProcesses[0].Id)`n" +


$title = "$($theProcesses[0].Name.ToUpper()) " +
  "Handle Counts`n(shown by pid)"


$workStr | & $lp "SELECT TO_STRING(Pid), Handles
  INTO testChart.png
  FROM STDIN " -i csv -o chart -stats off `
  -chartTitle "$title" -chartType columnClustered `
  -legend on -values on


invoke-item testChart.png




Sure one can change all the chart fonts and
colors and backgrounds and etc.!


Also be aware that .NET 3.5 SP1 includes a
Microsoft Chart Control class, so one can
also chart Apache and IIS Windows PowerShell
obtained data without calling Log Parser (but
web server people need Log Parser anyway).


Remember, if one uses AD, Exchange, IIS and etc.
alone or with other OS web servers, one will need 
to know .NET Windows PowerShell (for best usage).


Perhaps later someone will show some .NET charting
with only PowerShell too.




Windows Liveā„¢ Contacts: Organize your contact list.!503D1D86EBB2B53C!2285.entry?ocid=TXT_TAGLM_WL_UGC_Contacts_032009
View raw message