[SERVER-21231] Better logging for FTDC system when when 'diagnosticDataCollectionEnabled=false' and when FTDC is toggled Created: 30/Oct/15  Updated: 17/Nov/15  Resolved: 06/Nov/15

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: 3.2.0-rc1
Fix Version/s: 3.2.0-rc3

Type: Improvement Priority: Minor - P4
Reporter: Steve Briskin (Inactive) Assignee: Mark Benvenuto
Resolution: Done Votes: 0
Labels: FTDC
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Minor Change
Sprint: Platform C (11/20/15)
Participants:

 Description   

Starting 3.2.0-rc1 with '--setParameter diagnosticDataCollectionEnabled=false' does not disable diagnostics data collection

Started mongod with '--setParameter diagnosticDataCollectionEnabled=false'. Note "[initandlisten] Starting full-time diagnostic data capture with directory './diagnostic.data'" in the log.

$ mongod --dbpath . --port 21000 --setParameter diagnosticDataCollectionEnabled=false
2015-10-30T16:25:04.141-0400 I -        [initandlisten] Detected data files in . created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2015-10-30T16:25:04.142-0400 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=9G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2015-10-30T16:25:05.291-0400 I CONTROL  [initandlisten] MongoDB starting : pid=72122 port=21000 dbpath=. 64-bit host=Steves-MacBook-Pro-3.local
2015-10-30T16:25:05.291-0400 I CONTROL  [initandlisten] db version v3.2.0-rc1
2015-10-30T16:25:05.292-0400 I CONTROL  [initandlisten] git version: beabb900fa05c3b090fc62e887d41d9c43562b3f
2015-10-30T16:25:05.292-0400 I CONTROL  [initandlisten] allocator: system
2015-10-30T16:25:05.292-0400 I CONTROL  [initandlisten] modules: none
2015-10-30T16:25:05.292-0400 I CONTROL  [initandlisten] build environment:
2015-10-30T16:25:05.292-0400 I CONTROL  [initandlisten]     distarch: x86_64
2015-10-30T16:25:05.292-0400 I CONTROL  [initandlisten]     target_arch: x86_64
2015-10-30T16:25:05.292-0400 I CONTROL  [initandlisten] options: { net: { port: 21000 }, setParameter: { diagnosticDataCollectionEnabled: "false" }, storage: { dbPath: "." } }
2015-10-30T16:25:05.308-0400 I NETWORK  [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
2015-10-30T16:25:05.308-0400 I FTDC     [initandlisten] Starting full-time diagnostic data capture with directory './diagnostic.data'
2015-10-30T16:25:05.311-0400 I NETWORK  [initandlisten] waiting for connections on port 21000
2015-10-30T16:33:16.094-0400 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:60705 #1 (1 connection now open)
2015-10-30T16:33:31.420-0400 I NETWORK  [conn1] end connection 127.0.0.1:60705 (0 connections now open)
^C2015-10-30T16:33:45.783-0400 I CONTROL  [signalProcessingThread] got signal 2 (Interrupt: 2), will terminate after current cmd ends
2015-10-30T16:33:45.783-0400 I FTDC     [signalProcessingThread] Stopping full-time diagnostic data capture
2015-10-30T16:33:45.786-0400 I CONTROL  [signalProcessingThread] now exiting
2015-10-30T16:33:45.786-0400 I NETWORK  [signalProcessingThread] shutdown: going to close listening sockets...
2015-10-30T16:33:45.786-0400 I NETWORK  [signalProcessingThread] closing listening socket: 5
2015-10-30T16:33:45.786-0400 I NETWORK  [signalProcessingThread] closing listening socket: 6
2015-10-30T16:33:45.786-0400 I NETWORK  [signalProcessingThread] removing socket file: /tmp/mongodb-21000.sock
2015-10-30T16:33:45.786-0400 I NETWORK  [signalProcessingThread] shutdown: going to flush diaglog...
2015-10-30T16:33:45.786-0400 I NETWORK  [signalProcessingThread] shutdown: going to close sockets...
2015-10-30T16:33:45.787-0400 I STORAGE  [signalProcessingThread] WiredTigerKVEngine shutting down
2015-10-30T16:33:45.939-0400 I STORAGE  [signalProcessingThread] shutdown: removing fs lock...
2015-10-30T16:33:45.940-0400 I CONTROL  [signalProcessingThread] dbexit:  rc: 0

diagnostics.data directory:

[16:33:51][stevebriskin:~/temp/tmpdb/diagnostic.data]$ ls -ltr
total 8
-rw-r--r--+ 1 stevebriskin  staff  2598 Oct 30 16:33 metrics.2015-10-30T20-25-05Z-00000



 Comments   
Comment by Githook User [ 06/Nov/15 ]

Author:

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

Message: SERVER-21231: Improve logging messages, and prevent FTDC from writting to disk when not enabled.
Branch: master
https://github.com/mongodb/mongo/commit/7ed2f9786e541d7df22660a09f8a86668e667d60

Comment by Ramon Fernandez Marina [ 30/Oct/15 ]

Both the diagnostics directory and the data file get created, but no diagnostics data is actually collected. This is desirable to simplify things later when users toggle data capture on and off – but the log messages should be more informative to this respect.

Mark points out that we should also log the toggling of the data capture.

Generated at Thu Feb 08 03:56:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.