System Data Archiver和System-Insights

2022-09-29 15:19:12 浏览数 (1)

我平时几乎用不上System Data Archiver和System-Insights,这里特意整理一篇文档,主要是释疑,因为在分析系统日志时,System Data Archiver挺碍事,去掉System Data Archiver分析日志会容易一些。

System Data Archiver:Provides services to collect and archive Windows Server system data.

System-Insights:实现对CPU/硬盘/卷/网络的资源利用预测

CPU capacity forecasting – Forecasts CPU usage.

Networking capacity forecasting – Forecasts network usage for each network adapter.

Total storage consumption forecasting – Forecasts total storage consumption across all local drives.

Volume consumption forecasting – Forecasting storage consumption for each volume.

System Data Archiver是System-Insights的必要条件

在C:WindowsSystem32winevtLogs 会看到Microsoft-Windows-SystemDataArchiverMiagnostic.evtx,它包含的event条目很多,用fulleventlogview分析日志时,SystemDataArchiver是比较干扰的,建议不要带它,可以把C:WindowsSystem32winevtLogs文件夹复制出来,把Microsoft-Windows-SystemDataArchiverMiagnostic.evtx删除后再指定路径分析,会容易一些。

https://www.thomasmaurer.ch/2018/09/windows-server-2019-system-insights

https://blog.51cto.com/wzde2012/2167010

https://learn.microsoft.com/en-us/powershell/module/systeminsights

安装System-Insights

https://github.com/MicrosoftDocs/windowsserverdocs/blob/main/WindowsServerDocs/manage/system-insights/overview.md

代码语言:javascript复制
#Install-WindowsFeature System-Insights
#Install-WindowsFeature System-Insights -IncludeManagementTools
Add-WindowsFeature System-Insights -IncludeManagementTools

光执行Install-WindowsFeature System-Insights是不行的,必须包含管理工具,至于安装完是否需要重启机器,建议重启

Install-WindowsFeature System-Insights -IncludeManagementTools或Add-WindowsFeature System-Insights -IncludeManagementTools

否则执行其他相关命令会报错

https://github.com/MicrosoftDocs/windowsserverdocs/blob/main/WindowsServerDocs/manage/system-insights/managing-capabilities.md

安装后获取项的命令:

代码语言:javascript复制
Get-InsightsCapability

CPU capacity forecasting – Forecasts CPU usage.

Networking capacity forecasting – Forecasts network usage for each network adapter.

Total storage consumption forecasting – Forecasts total storage consumption across all local drives.

Volume consumption forecasting – Forecasting storage consumption for each volume.

CPU 容量预测 – 预测 CPU 使用率

网络容量预测——预测每个网络适配器的网络使用情况

总存储消耗预测——预测所有本地驱动器的总存储消耗

卷消耗预测 – 预测每个卷的存储消耗

安装后启用命令示例:

代码语言:javascript复制
Enable-InsightsCapability -Name "CPU capacity forecasting"

安装后关闭命令示例:

代码语言:javascript复制
Disable-InsightsCapability -Name "Networking capacity forecasting"

启用后查看命令示例(安装后等6天才可做出预测):

# Specify the History parameter to see the last 30 prediction results.

代码语言:javascript复制
Get-InsightsCapabilityResult -Name "CPU capacity forecasting" -History

# Use the Output field to locate and then show the results of "CPU capacity forecasting."

代码语言:javascript复制
$Output = Get-Content (Get-InsightsCapabilityResult -Name "CPU capacity forecasting").Output -Encoding UTF8 | ConvertFrom-Json
$Output.ForecastingResults

https://github.com/MicrosoftDocs/windowsserverdocs/blob/main/WindowsServerDocs/manage/system-insights/overview.md

https://github.com/MicrosoftDocs/windowsserverdocs/blob/main/WindowsServerDocs/manage/system-insights/managing-capabilities.md

https://learn.microsoft.com/en-us/answers/questions/746428/what-is-the-purpose-of-the-system-data-archiver-fe.html

https://www.thomasmaurer.ch/2018/09/windows-server-2019-system-insights

https://serverfault.com/questions/972272/what-is-the-purpose-of-the-system-data-archiver-feature

0 人点赞