Everpure VSS Hardware Provider Log Truncation

Microsoft Platform Guide

Audience
Public
Source Type
Documentation

The Pure VSS Hardware Provider logs details about each VSS transaction that is performed against the FlashArray. Currently there is no auto-truncation of the PureVSSHardwareProvider.log file. This file is located at C:\ProgramData\PureStorage\PureVSSHardwareProvider.log. Below is an example of what the log file contains.


May 26 16:51:38.584 1D70 I Pure.Logger >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ==== ( LOG SESSION STARTED ) ==== <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
May 26 16:51:38.588 1D70 I Pure.Logger LogLevel: 4, LogFileName: C:\ProgramData\PureStorage\PureVSSHardwareProvider.log.
May 26 16:51:38.591 1D70 I Pure.Logger Version: 1.1.0. BUILD: .8.8 (64-bit Release). OS: 6.2
May 26 16:51:38.595 1D70 I Pure.PureProvider Service Starting : ProcessID=00001274. Running As: SYSTEM on Machine:SERVER01
May 26 16:51:38.599 1D70 I Pure.VssProvider ENTERING : ParseCommandLine()
May 26 16:51:38.611 1D70 I Pure.VssProvider ENTERING: RegisterPureProvider()
May 26 16:51:38.676 1D70 I Pure.VssProvider PURESTORAGE INFORM: Registration return code: 0
May 26 16:51:38.677 1D70 I Pure.VssProvider EXITING: RegisterPureProvider()
May 26 16:51:38.680 1D70 I Pure.VssProvider ENTERING : AddEventSource()
May 26 16:51:38.682 1D70 I Pure.VssProvider EXITING: AddEventSource()
May 26 16:51:38.682 1D70 I Pure.Logger <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ==== ( LOG SESSION ENDED ) ==== >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

The example below using Window PowerShell will check the length of the log file and based on that determine if it should be truncated. The sample value that is used is set to 150. In order for the script to reset the log file set the value of 150 to a value of your choosing as a threshold. This can be used as part of a Windows Task Schedule or run manually. A backup of the log file will be created before it is truncated.


$File = 'C:\ProgramData\PureStorage\PureVSSHardwareProvider.log'
Copy-Item -Path $File -Destination "C:\ProgramData\PureStorage\PureVSSHWProvider_log-$(Get-Date -Format mm.dd.yy.ss).bak"
If ((Get-Item $File).Length/1Kb -gt 150)
{
Stop-Service -Name PureProvider -Force
Remove-Item $File
Start-Service -Name PureProvider
}