Kiln »
KilnSupportScriptsPowershell Scripts to help monitor a Kiln environment. Contact Fog Creek support before using.Read More
Alias information
is an alias for .
Mercurial and Git clients can push and pull from this alias URL to interact with this repository. You can change to which repository an alias points by going to the Aliases link on the project page.
$g_backendUrl="http://localhost:56783/"$g_kilnRepositories="C:\KilnRepositories"functionGet-URL([string]$url){(New-Objectnet.webclient).DownloadString($url)}functionLogOrWrite($msg,$logFile=""){if($logFile-ne""){write"$(Get-Date -format o) $msg"|out-file-append$logFile}else{write$msg}}functionTest-KilnVersion(){try{$resp=Get-Url(($g_backendUrl+"version"))return($resp.length-gt0)}catch{return$False}}functionTest-KilnDiff([string]$sRepoGUID,[string]$sChangeset1,[string]$sChangeset2){try{$url=$g_backendUrl+"repo/"+$sRepoGUID+"/diff/"+$sChangeset1+":"+$sChangeset2+"?format=json&ignorews=True&maxsize=100000&timeout=10"$resp=Get-Url($url)return($resp.length-gt0)}catch{return$False}}functionGet-ProcessStats([string]$service,[string]$logFile){try{$measure=get-process$service-ErrorActionStop|Measure-ObjectWorkingSet-sumLogOrWrite"The process $service has $($measure.Count) instances with a total WorkingSet of: $($measure.Sum)"$logFile}catch{LogOrWrite"The process $service is not currently running."$logFile}}functionGet-MiniRedisSize([string]$kilnRepositoriesDir=$g_kilnrepositories,[string]$logFile=""){try{$kilnRepo=(Resolve-Path$kilnRepositoriesDir-ErrorActionStop).path }
catch {
LogOrWrite "Could not find Kiln Repositories Directory: $kilnRepositoriesDir" $logFile
+ return }
try {
$miniRedis = (Resolve-Path ($kilnRepo + "\miniredis.db") -ErrorAction Stop).path
}
catch {
LogOrWrite "Could not find miniredis.db file in $kilnRepo" $logFile
+ return }
$lenMiniRedis = (get-childitem -path $miniRedis).length
LogOrWrite "The size of miniredis.db is: $lenMiniRedis" $logFile
return$lenMiniRedis}functionCheck-KilnBackend([string]$sRepoGUID,[string]$sChangeset1,[string]$sChangeset2,[string]$logFile=""){if(-Not((Test-KilnVersion)-and(Test-KilnDiff$sRepoGUID$sChangeset1$sChangeset2))){#Restart the Kiln storage Service because something bad happenedLogOrWrite"Something is wrong. Restarting Kiln Storage Service"$logFileRestart-Service"KilnStorageService"return$False}else{LogOrWrite"Kiln backend is OK"$logFilereturn$True}}
Attach a Trello Card
Add a tag
Your session has expired
You are no longer logged in. Please log in and try your request again.
Filter RSS Feed
This RSS feed URL allows you to see the contents of your current filter using any feed reader.
This link includes a special authentication token. If you share the URL with anyone else, they can see this RSS feed's activity. You can disable these tokens when needed.
Your current filter is unsaved; changing it won't affect this RSS feed.