Notification

Icon
Error

Performance REPORT:AVERAGE CPU, RAM & DISK USAGE IN %

Posted: Wednesday, January 13, 2021 3:57:47 PM(UTC)
MassimoAfros

MassimoAfros

Member Original PosterPosts: 4
0
Like
good morning.
I found these instructions for two separate reports, covering average CPU and RAM usage:

CPU:

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
Cast(Avg(tblPerformanceCountersScanMetric.Value) As int) As
[Average CPU usage in %],
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon,
Max(tblPerformanceCountersScan.ScanDateTime) As [Last scan]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblPerformanceCountersScan On tblAssets.AssetID =
tblPerformanceCountersScan.AssetId
Inner Join tblPerformanceCountersScanMetric On tblPerformanceCountersScan.Id =
tblPerformanceCountersScanMetric.PerformanceCountersScanId
Left Join tblPerformanceCountersScanMetricIdentifier On
tblPerformanceCountersScanMetricIdentifier.Id =
tblPerformanceCountersScanMetric.PerformanceCountersScanMetricIdentifierId
Inner Join tsysPerformanceCounterMetric On tsysPerformanceCounterMetric.Id =
tblPerformanceCountersScanMetric.Metric
Left Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where tsysPerformanceCounterMetric.[Group] = 'CPU' And tblAssetCustom.State = 1
Group By tblAssets.AssetID,
tblAssets.AssetName,
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10)
Having Max(tblPerformanceCountersScan.ScanDateTime) > GetDate() - 7
Order By [Average CPU usage in %] Desc


RAM:

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
Cast(Avg(tblPerformanceCountersScanMetric.Value) As int) As
[Avarage RAM usage in %],
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon,
Max(tblPerformanceCountersScan.ScanDateTime) As [Last scan]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblPerformanceCountersScan On tblAssets.AssetID =
tblPerformanceCountersScan.AssetId
Inner Join tblPerformanceCountersScanMetric On tblPerformanceCountersScan.Id =
tblPerformanceCountersScanMetric.PerformanceCountersScanId
Left Join tblPerformanceCountersScanMetricIdentifier On
tblPerformanceCountersScanMetricIdentifier.Id =
tblPerformanceCountersScanMetric.PerformanceCountersScanMetricIdentifierId
Inner Join tsysPerformanceCounterMetric On tsysPerformanceCounterMetric.Id =
tblPerformanceCountersScanMetric.Metric
Left Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where tsysPerformanceCounterMetric.Name = 'Used physical memory' And
tblAssetCustom.State = 1
Group By tblAssets.AssetID,
tblAssets.AssetName,
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10),
tsysPerformanceCounterMetric.Name
Having Max(tblPerformanceCountersScan.ScanDateTime) > GetDate() - 7
Order By [Avarage RAM usage in %] Desc


Please, does anyone know a way to merge these two reports in order to have a single report with the average usage of RAM and CPU (possibly even the disk please?)

Active Discussions

Lansweeper Uninstall All versions of a software
by  Michael White   Go to last post Go to first unread
Last post: Yesterday at 7:31:07 PM(UTC)
Lansweeper Lansweeper Server Services - Running as what User acount ??
by  miharix  
Go to last post Go to first unread
Last post: Yesterday at 5:28:23 PM(UTC)
Lansweeper Antivirus: No antivirus installed
by  MB@CC-IT   Go to last post Go to first unread
Last post: Yesterday at 3:20:56 PM(UTC)
Lansweeper Report GPO's
by  Stian  
Go to last post Go to first unread
Last post: Yesterday at 9:59:20 AM(UTC)
Lansweeper Customize asset fields
by  Giuliano   Go to last post Go to first unread
Last post: Yesterday at 9:11:49 AM(UTC)
Lansweeper Asset Radar to cover all subnets
by  FrankSc  
Go to last post Go to first unread
Last post: 1/21/2021 7:51:36 PM(UTC)
Lansweeper Bluetooth Info
by  Alexey   Go to last post Go to first unread
Last post: 1/21/2021 10:37:44 AM(UTC)
Lansweeper Use current user for scanning credentials?
by  miharix  
Go to last post Go to first unread
Last post: 1/21/2021 8:31:56 AM(UTC)