Kiln » KilnSupportScripts Powershell Scripts to help monitor a Kiln environment. Contact Fog Creek support before using.
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

Merge

Changeset 082ee7713ada

Parents 36a36e047661

Parents 96ef3069d0e0

by Profile picture of User 476Ben McCormack <benm@fogcreek.com>

Changes to 3 files · Browse files at 082ee7713ada Showing diff from parent 36a36e047661 96ef3069d0e0 Diff from another changeset...

Change 1 of 1 Show Entire File .hgignore Stacked
 
1
2
3
 
 
 
 
1
2
3
4
5
 
@@ -1,3 +1,5 @@
 syntax: glob    checkBackend.log +*.csv +*.xls* \ No newline at end of file
Change 1 of 1 Show Entire File checkBackend.ps1 Stacked
 
39
40
41
42
43
 
 
44
45
46
 
47
48
49
 
39
40
41
 
 
42
43
44
45
46
47
48
49
50
@@ -39,11 +39,12 @@
  if (-Not ((Test-KilnVersion) -and (Test-KilnDiff $sRepoGUID $sChangeset1 $sChangeset2))){   #Restart the Kiln storage Service because something bad happened   write "$(Get-Date -format o) Something is wrong. Restarting Kiln Storage Service" | out-file -append $logFile - sc.exe stop "KilnStorageService" - sc.exe start "KilnStorageService" + Restart-Service "KilnStorageService" + return False   }   else {   write "$(Get-Date -format o) Kiln backend is OK" | out-file -append $logFile + return True   }  }  
Change 1 of 1 Show Entire File tools.ps1 Stacked
 
 
 
 
 
 
1
2
3
 
@@ -0,0 +1,3 @@
+function Get-BackendMemoryFromLog([string]$logFile){ + cat $logFile | Select-String "service backend" | foreach{"`"$(($_ -split ' ')[0])`"`t$([int](($_ -split ":")[-1]))`t$([int](($_ -split ":")[-1])/1024/1024)"} +} \ No newline at end of file