Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#3586 - adding target & total memory counters to server info section. Closes #3586. #3596

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Documentation/sp_Blitz_Checks_by_Priority.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Before adding a new check, make sure to add a Github issue for it first, and hav

If you want to change anything about a check - the priority, finding, URL, or ID - open a Github issue first. The relevant scripts have to be updated too.

CURRENT HIGH CHECKID: 265.
If you want to add a new one, start at 266.
CURRENT HIGH CHECKID: 266.
If you want to add a new one, start at 267.

| Priority | FindingsGroup | Finding | URL | CheckID |
|----------|-----------------------------|---------------------------------------------------------|------------------------------------------------------------------------|----------|
Expand Down Expand Up @@ -301,6 +301,7 @@ If you want to add a new one, start at 266.
| 250 | Server Info | Drive Space | | 92 |
| 250 | Server Info | Full-text Filter Daemon is Currently Offline | | 168 |
| 250 | Server Info | Hardware | | 84 |
| 250 | Server Info | Hardware - Memory Counters | https://www.BrentOzar.com/go/target | 266 |
| 250 | Server Info | Hardware - NUMA Config | | 114 |
| 250 | Server Info | Instant File Initialization Enabled | https://www.BrentOzar.com/go/instant | 193 |
| 250 | Server Info | Locked Pages in Memory Enabled | https://www.BrentOzar.com/go/lpim | 166 |
Expand Down
30 changes: 30 additions & 0 deletions sp_Blitz.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9970,6 +9970,36 @@ IF @ProductVersionMajor >= 10 AND NOT EXISTS ( SELECT 1
END;
END; /* CheckID 261 */


IF NOT EXISTS ( SELECT 1
FROM #SkipChecks
WHERE DatabaseName IS NULL AND CheckID = 266 )
BEGIN
INSERT INTO #BlitzResults
( CheckID ,
Priority ,
FindingsGroup ,
Finding ,
URL ,
Details
)
SELECT 266 AS CheckID ,
250 AS Priority ,
'Server Info' AS FindingsGroup ,
'Hardware - Memory Counters' AS Finding ,
'https://www.brentozar.com/go/target' AS URL ,
N'Target Server Memory (GB): ' + CAST((CAST((pTarget.cntr_value / 1024.0 / 1024.0) AS DECIMAL(10,1))) AS NVARCHAR(100))
+ N' Total Server Memory (GB): ' + CAST((CAST((pTotal.cntr_value / 1024.0 / 1024.0) AS DECIMAL(10,1))) AS NVARCHAR(100))
FROM sys.dm_os_performance_counters pTarget
INNER JOIN sys.dm_os_performance_counters pTotal
ON pTotal.object_name LIKE 'SQLServer:Memory Manager%'
AND pTotal.counter_name LIKE 'Total Server Memory (KB)%'
WHERE pTarget.object_name LIKE 'SQLServer:Memory Manager%'
AND pTarget.counter_name LIKE 'Target Server Memory (KB)%'
END



END; /* IF @CheckServerInfo = 1 */
END; /* IF ( ( SERVERPROPERTY('ServerName') NOT IN ( SELECT ServerName */

Expand Down
Loading