Bug 785905

Summary: [RFE] DEBUG timestamps should offer higher precision
Product: Red Hat Enterprise Linux 6 Reporter: Stephen Gallagher <sgallagh>
Component: sssdAssignee: Stephen Gallagher <sgallagh>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: grajaiya, jgalipea, kbanerje, prc, sgoveas
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sssd-1.8.0-2.el6.beta2 Doc Type: Enhancement
Doc Text:
Cause: SSSD debug messages offer precision down to the wallclock second Consequence: When debugging performance issues, users want higher precision in the timestamps. Change: SSSD added an option 'debug_microseconds' to enable microsecond-level precision in debug messages. Result: Users of SSSD now have the option to enable microsecond precision in debug log messages.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 11:54:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stephen Gallagher 2012-01-30 21:04:07 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/sssd/ticket/956

Currently, our DEBUG timestamps offer precision only to the nearest second. In some cases it can be useful to know time at a higher precision (such as milliseconds). This should be a configurable option in sssd.conf

Comment 1 Jenny Severance 2012-02-01 21:47:22 UTC
What is this new option and how do you use it?

Comment 2 Jenny Severance 2012-02-01 21:49:35 UTC
       --debug-microseconds=mode

           1: Add microseconds to the timestamp in debug messages

           0: Disable microseconds in timestamp

           Default: 0

Comment 5 Steeve Goveas 2012-04-05 10:56:37 UTC
Running sssd with --debug-microseconds=1

[root@wheeljack ~]# sssd --debug-microseconds=1 --debug-to-files; tail -f /var/log/sssd/sssd_lab.eng.pnq.redhat.com.log /var/log/sssd/sssd.log

==> /var/log/sssd/sssd.log <==
(Thu Apr  5 04:03:45:335679 2012) [sssd] [monitor_quit] (0x0020): Child [pam] exited gracefully

==> /var/log/sssd/sssd_lab.eng.pnq.redhat.com.log <==
(Thu Apr  5 04:03:45:336435 2012) [sssd[be[lab.eng.pnq.redhat.com]]] [sbus_remove_watch] (0x2000): 0x2485160/0x249a560

"debug_microseconds = true" works for [sssd] and the domain section when enabled under the respective section in sssd.conf file

[root@wheeljack ~]# cat /etc/sssd/sssd.conf 
[domain/lab.eng.pnq.redhat.com]
 
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = lab.eng.pnq.redhat.com
id_provider = ipa
auth_provider = ipa
debug_level = 9
debug_microseconds = true
access_provider = ipa
chpass_provider = ipa
ipa_server = wheeljack.lab.eng.pnq.redhat.com
ldap_tls_cacert = /etc/ipa/ca.crt

[sssd]
services = nss, pam, ssh
debug_level = 9
config_file_version = 2
 
domains = lab.eng.pnq.redhat.com

[root@wheeljack ~]# /etc/init.d/sssd start; tail -f /var/log/sssd/sssd_lab.eng.pnq.redhat.com.log /var/log/sssd/sssd.log
Starting sssd:                                             [  OK  ]

==> /var/log/sssd/sssd.log <==
(Thu Apr  5 06:41:30 2012) [sssd] [monitor_quit] (0x0020): Child [pam] exited gracefully

==> /var/log/sssd/sssd_lab.eng.pnq.redhat.com.log <==
(Thu Apr  5 06:41:30:264243 2012) [sssd[be[lab.eng.pnq.redhat.com]]] [sbus_remove_watch] (0x2000): 0xf3f600/0xf3d910


Verified in Version sssd-1.8.0-17.el6.x86_64

Comment 6 Kaushik Banerjee 2012-04-26 15:47:56 UTC
Verified in version:
# rpm -qi sssd | head
Name        : sssd                         Relocations: (not relocatable)
Version     : 1.8.0                             Vendor: Red Hat, Inc.
Release     : 23.el6                        Build Date: Fri 20 Apr 2012 11:30:39 PM IST
Install Date: Wed 25 Apr 2012 07:28:48 PM IST      Build Host: x86-003.build.bos.redhat.com
Group       : Applications/System           Source RPM: sssd-1.8.0-23.el6.src.rpm
Size        : 7874744                          License: GPLv3+
Signature   : (none)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://fedorahosted.org/sssd/
Summary     : System Security Services Daemon

Comment 7 Stephen Gallagher 2012-06-12 14:05:11 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: SSSD debug messages offer precision down to the wallclock second

Consequence: When debugging performance issues, users want higher precision in the timestamps.

Change: SSSD added an option 'debug_microseconds' to enable microsecond-level precision in debug messages.

Result: Users of SSSD now have the option to enable microsecond precision in debug log messages.

Comment 9 errata-xmlrpc 2012-06-20 11:54:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0747.html