[SERVER-27354] Use performance counter ids instead of localized names in FTDC Created: 09/Dec/16  Updated: 13/Nov/20  Resolved: 13/Nov/20

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: 3.4.0
Fix Version/s: 4.9.0

Type: Bug Priority: Minor - P4
Reporter: Jan S. Assignee: Mark Benvenuto
Resolution: Done Votes: 5
Labels: move-sec
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: JPEG File Снимок.JPG    
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Security 2020-11-16
Participants:

 Description   

If you start Mongo 3.4 on a Windows system that uses a language other than English the performance counter \Memory\Available Bytes is not available which leads to the following error message on the console when starting Mongo:

[initandlisten] Failed to initialize Performance Counters for FTDC: WindowsPdhError: PdhExpandCounterPathW failed with 'Das angegebene Objekt wurde nicht auf dem Computer
gefunden.' for counter '\Memory\Available Bytes'.

(translated: The specified object was not found on your computer)

The language independent way to access performance counters seems to use "ID numbers" instead of names (or to retrieve the local names via PdhLookupPerfNameByIndex using those IDs). If I am not wrong the ID for "Memory" is 4 and the ID for "Available Bytes" is 24.



 Comments   
Comment by Githook User [ 13/Nov/20 ]

Author:

{'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com', 'username': 'markbenvenuto'}

Message: SERVER-27354 Use Language neutral API to resolve performance counters
Branch: master
https://github.com/mongodb/mongo/commit/3251ffe481e2c981e16e9bbf166cb2de7a493e0b

Comment by Ramon Fernandez Marina [ 11/Dec/16 ]

Thanks for reporting this issue mango, we're discussing internally how to address this behavior. Updates will be posted to this ticket.

Regards,
Ramón.

Generated at Thu Feb 08 04:14:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.