EcoStruxure Geo SCADA Expert Forum
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-23 12:15 PM . Last Modified: 2023-05-02 11:46 PM
Has anyone had to deal with Thinfinity (part of VVX) logs filling up their hard drive when they are enabled?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-23 12:17 PM
Here is a powershell scrip that can be used to clean up Thinfinity log files older than a week so that the logs don't fill the hard drive. Trigger it with Windows Task Scheduler. This script assumes the location of the logs was customized to C:\Geo SCADA\Logs.
#
#
# Clean-up script for removing logs older than '$cutoff' days from a folder
# This script is recursive and will get files inside subfolders as well
# Built by: Dustin Symes
# Date: February 5, 2023
# With assistance from ChatGPT
#
#
$folder = "C:\Geo SCADA\Logs"
$cutoff = (Get-Date).AddDays(-3)
# Use this line to print the file names to console
#Get-ChildItem $folder -Recurse | Where-Object { $_.LastWriteTime -lt $cutoff -and $_.PSIsContainer -eq $False } | Select-Object -ExpandProperty Name
# Use this line to delete the files
Get-ChildItem $folder -Recurse | Where-Object { $_.LastWriteTime -lt $cutoff -and $_.PSIsContainer -eq $False } | Remove-Item
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-23 12:17 PM
Here is a powershell scrip that can be used to clean up Thinfinity log files older than a week so that the logs don't fill the hard drive. Trigger it with Windows Task Scheduler. This script assumes the location of the logs was customized to C:\Geo SCADA\Logs.
#
#
# Clean-up script for removing logs older than '$cutoff' days from a folder
# This script is recursive and will get files inside subfolders as well
# Built by: Dustin Symes
# Date: February 5, 2023
# With assistance from ChatGPT
#
#
$folder = "C:\Geo SCADA\Logs"
$cutoff = (Get-Date).AddDays(-3)
# Use this line to print the file names to console
#Get-ChildItem $folder -Recurse | Where-Object { $_.LastWriteTime -lt $cutoff -and $_.PSIsContainer -eq $False } | Select-Object -ExpandProperty Name
# Use this line to delete the files
Get-ChildItem $folder -Recurse | Where-Object { $_.LastWriteTime -lt $cutoff -and $_.PSIsContainer -eq $False } | Remove-Item
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.