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 Driver vendor
by  miharix   Go to last post Go to first unread
Last post: Today at 3:04:54 PM(UTC)
Lansweeper SSH Scanning Credentials
by  BastiOn  
Go to last post Go to first unread
Last post: Today at 9:22:46 AM(UTC)
Lansweeper lansweeperuser sql database permissions
by  FrankSc   Go to last post Go to first unread
Last post: Today at 8:54:22 AM(UTC)
Lansweeper Software not showing install date
by  Rocher Vincent  
Go to last post Go to first unread
Last post: Today at 8:18:30 AM(UTC)
Lansweeper LSAgent Rescan Asset
by  marck1024   Go to last post Go to first unread
Last post: Yesterday at 6:46:48 PM(UTC)
Lansweeper Windows 10 20H2 issue
by  Mikey!  
Go to last post Go to first unread
Last post: Yesterday at 2:49:26 PM(UTC)
Lansweeper Use case for MSSP
by  CHTSjohn   Go to last post Go to first unread
Last post: 3/1/2021 10:49:11 PM(UTC)