Apache 2.4 get request processing time in microseconds log

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1















Trying to add the %D and %T format string to my Apache log to see time for request processing but apparently not able to. Here are the LogFormat directives in my httpd.conf



[root@server01 admin_ad2]# grep LogFormat /etc/httpd/conf/httpd.conf
LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti"" combined
LogFormat "%h %l %u %t "%r" %>s %b" common
LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti" %I %O" combinedio
[root@server01 admin_ad2]# httpd -v
Server version: Apache/2.4.6 (Red Hat Enterprise Linux)
Server built: May 28 2018 16:19:32


Adding the format string a shown below and restarting the Apache service does not have any affect - still can't see the value in my /var/log/httpd/ssl_access_log



LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti" **%T/%D**" combined


What am I doing wrong ?










share|improve this question



















  • 1





    On RHEL, the httpd SSL configuration should be defined in a separate .conf file that also specifies log settings. Can you take a look inside the conf.d directory?

    – Haxiel
    Jan 17 at 6:49











  • @Haxiel Makes sense. So the LogFormat directive is not inherited from the main configuration file ? How would I declare it in ssl.conf? can't see any LogFormat directive in there ....

    – blablatrace
    Jan 17 at 7:25






  • 1





    The RPM I have shows a TransferLog directive for ssl_access_log. The linked page shows an example on how to define LogFormat for that directive.

    – Haxiel
    Jan 17 at 7:34











  • Thank you indeed it seams to work :) Please create an answer so that I can accept it for you :)! BTW do you know how would I convert the value in microseconds 18/18695953 to seconds ?

    – blablatrace
    Jan 17 at 7:56











  • I've added my answer :-). I didn't quite understand your question about converting the time value. Can you please clarify that with a little more detail?

    – Haxiel
    Jan 17 at 9:14















1















Trying to add the %D and %T format string to my Apache log to see time for request processing but apparently not able to. Here are the LogFormat directives in my httpd.conf



[root@server01 admin_ad2]# grep LogFormat /etc/httpd/conf/httpd.conf
LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti"" combined
LogFormat "%h %l %u %t "%r" %>s %b" common
LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti" %I %O" combinedio
[root@server01 admin_ad2]# httpd -v
Server version: Apache/2.4.6 (Red Hat Enterprise Linux)
Server built: May 28 2018 16:19:32


Adding the format string a shown below and restarting the Apache service does not have any affect - still can't see the value in my /var/log/httpd/ssl_access_log



LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti" **%T/%D**" combined


What am I doing wrong ?










share|improve this question



















  • 1





    On RHEL, the httpd SSL configuration should be defined in a separate .conf file that also specifies log settings. Can you take a look inside the conf.d directory?

    – Haxiel
    Jan 17 at 6:49











  • @Haxiel Makes sense. So the LogFormat directive is not inherited from the main configuration file ? How would I declare it in ssl.conf? can't see any LogFormat directive in there ....

    – blablatrace
    Jan 17 at 7:25






  • 1





    The RPM I have shows a TransferLog directive for ssl_access_log. The linked page shows an example on how to define LogFormat for that directive.

    – Haxiel
    Jan 17 at 7:34











  • Thank you indeed it seams to work :) Please create an answer so that I can accept it for you :)! BTW do you know how would I convert the value in microseconds 18/18695953 to seconds ?

    – blablatrace
    Jan 17 at 7:56











  • I've added my answer :-). I didn't quite understand your question about converting the time value. Can you please clarify that with a little more detail?

    – Haxiel
    Jan 17 at 9:14













1












1








1








Trying to add the %D and %T format string to my Apache log to see time for request processing but apparently not able to. Here are the LogFormat directives in my httpd.conf



[root@server01 admin_ad2]# grep LogFormat /etc/httpd/conf/httpd.conf
LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti"" combined
LogFormat "%h %l %u %t "%r" %>s %b" common
LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti" %I %O" combinedio
[root@server01 admin_ad2]# httpd -v
Server version: Apache/2.4.6 (Red Hat Enterprise Linux)
Server built: May 28 2018 16:19:32


Adding the format string a shown below and restarting the Apache service does not have any affect - still can't see the value in my /var/log/httpd/ssl_access_log



LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti" **%T/%D**" combined


What am I doing wrong ?










share|improve this question
















Trying to add the %D and %T format string to my Apache log to see time for request processing but apparently not able to. Here are the LogFormat directives in my httpd.conf



[root@server01 admin_ad2]# grep LogFormat /etc/httpd/conf/httpd.conf
LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti"" combined
LogFormat "%h %l %u %t "%r" %>s %b" common
LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti" %I %O" combinedio
[root@server01 admin_ad2]# httpd -v
Server version: Apache/2.4.6 (Red Hat Enterprise Linux)
Server built: May 28 2018 16:19:32


Adding the format string a shown below and restarting the Apache service does not have any affect - still can't see the value in my /var/log/httpd/ssl_access_log



LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti" **%T/%D**" combined


What am I doing wrong ?







apache-httpd logs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 16 at 19:17









Rui F Ribeiro

39.8k1479133




39.8k1479133










asked Jan 16 at 19:09









blablatraceblablatrace

617




617







  • 1





    On RHEL, the httpd SSL configuration should be defined in a separate .conf file that also specifies log settings. Can you take a look inside the conf.d directory?

    – Haxiel
    Jan 17 at 6:49











  • @Haxiel Makes sense. So the LogFormat directive is not inherited from the main configuration file ? How would I declare it in ssl.conf? can't see any LogFormat directive in there ....

    – blablatrace
    Jan 17 at 7:25






  • 1





    The RPM I have shows a TransferLog directive for ssl_access_log. The linked page shows an example on how to define LogFormat for that directive.

    – Haxiel
    Jan 17 at 7:34











  • Thank you indeed it seams to work :) Please create an answer so that I can accept it for you :)! BTW do you know how would I convert the value in microseconds 18/18695953 to seconds ?

    – blablatrace
    Jan 17 at 7:56











  • I've added my answer :-). I didn't quite understand your question about converting the time value. Can you please clarify that with a little more detail?

    – Haxiel
    Jan 17 at 9:14












  • 1





    On RHEL, the httpd SSL configuration should be defined in a separate .conf file that also specifies log settings. Can you take a look inside the conf.d directory?

    – Haxiel
    Jan 17 at 6:49











  • @Haxiel Makes sense. So the LogFormat directive is not inherited from the main configuration file ? How would I declare it in ssl.conf? can't see any LogFormat directive in there ....

    – blablatrace
    Jan 17 at 7:25






  • 1





    The RPM I have shows a TransferLog directive for ssl_access_log. The linked page shows an example on how to define LogFormat for that directive.

    – Haxiel
    Jan 17 at 7:34











  • Thank you indeed it seams to work :) Please create an answer so that I can accept it for you :)! BTW do you know how would I convert the value in microseconds 18/18695953 to seconds ?

    – blablatrace
    Jan 17 at 7:56











  • I've added my answer :-). I didn't quite understand your question about converting the time value. Can you please clarify that with a little more detail?

    – Haxiel
    Jan 17 at 9:14







1




1





On RHEL, the httpd SSL configuration should be defined in a separate .conf file that also specifies log settings. Can you take a look inside the conf.d directory?

– Haxiel
Jan 17 at 6:49





On RHEL, the httpd SSL configuration should be defined in a separate .conf file that also specifies log settings. Can you take a look inside the conf.d directory?

– Haxiel
Jan 17 at 6:49













@Haxiel Makes sense. So the LogFormat directive is not inherited from the main configuration file ? How would I declare it in ssl.conf? can't see any LogFormat directive in there ....

– blablatrace
Jan 17 at 7:25





@Haxiel Makes sense. So the LogFormat directive is not inherited from the main configuration file ? How would I declare it in ssl.conf? can't see any LogFormat directive in there ....

– blablatrace
Jan 17 at 7:25




1




1





The RPM I have shows a TransferLog directive for ssl_access_log. The linked page shows an example on how to define LogFormat for that directive.

– Haxiel
Jan 17 at 7:34





The RPM I have shows a TransferLog directive for ssl_access_log. The linked page shows an example on how to define LogFormat for that directive.

– Haxiel
Jan 17 at 7:34













Thank you indeed it seams to work :) Please create an answer so that I can accept it for you :)! BTW do you know how would I convert the value in microseconds 18/18695953 to seconds ?

– blablatrace
Jan 17 at 7:56





Thank you indeed it seams to work :) Please create an answer so that I can accept it for you :)! BTW do you know how would I convert the value in microseconds 18/18695953 to seconds ?

– blablatrace
Jan 17 at 7:56













I've added my answer :-). I didn't quite understand your question about converting the time value. Can you please clarify that with a little more detail?

– Haxiel
Jan 17 at 9:14





I've added my answer :-). I didn't quite understand your question about converting the time value. Can you please clarify that with a little more detail?

– Haxiel
Jan 17 at 9:14










1 Answer
1






active

oldest

votes


















1














The RHEL version of Apache HTTP server defines the SSL configuration in a separate configuration file, which is located at /etc/httpd/conf.d/ssl.conf.



This configuration file also defines the log file for the SSL virtual host using the TransferLog directive:



# Use separate log files for the SSL virtual host; note that LogLevel
# is not inherited from httpd.conf.
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel warn


The TransferLog directive uses the log format defined by the most recent LogFormat directive, which does not have a nickname. As a result, the format can be controlled by defining it just prior to the TransferLog directive:



LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti" **%T/%D**"
TransferLog /var/log/httpd/ssl_access_log





share|improve this answer






















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f494905%2fapache-2-4-get-request-processing-time-in-microseconds-log%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    The RHEL version of Apache HTTP server defines the SSL configuration in a separate configuration file, which is located at /etc/httpd/conf.d/ssl.conf.



    This configuration file also defines the log file for the SSL virtual host using the TransferLog directive:



    # Use separate log files for the SSL virtual host; note that LogLevel
    # is not inherited from httpd.conf.
    ErrorLog logs/ssl_error_log
    TransferLog logs/ssl_access_log
    LogLevel warn


    The TransferLog directive uses the log format defined by the most recent LogFormat directive, which does not have a nickname. As a result, the format can be controlled by defining it just prior to the TransferLog directive:



    LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti" **%T/%D**"
    TransferLog /var/log/httpd/ssl_access_log





    share|improve this answer



























      1














      The RHEL version of Apache HTTP server defines the SSL configuration in a separate configuration file, which is located at /etc/httpd/conf.d/ssl.conf.



      This configuration file also defines the log file for the SSL virtual host using the TransferLog directive:



      # Use separate log files for the SSL virtual host; note that LogLevel
      # is not inherited from httpd.conf.
      ErrorLog logs/ssl_error_log
      TransferLog logs/ssl_access_log
      LogLevel warn


      The TransferLog directive uses the log format defined by the most recent LogFormat directive, which does not have a nickname. As a result, the format can be controlled by defining it just prior to the TransferLog directive:



      LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti" **%T/%D**"
      TransferLog /var/log/httpd/ssl_access_log





      share|improve this answer

























        1












        1








        1







        The RHEL version of Apache HTTP server defines the SSL configuration in a separate configuration file, which is located at /etc/httpd/conf.d/ssl.conf.



        This configuration file also defines the log file for the SSL virtual host using the TransferLog directive:



        # Use separate log files for the SSL virtual host; note that LogLevel
        # is not inherited from httpd.conf.
        ErrorLog logs/ssl_error_log
        TransferLog logs/ssl_access_log
        LogLevel warn


        The TransferLog directive uses the log format defined by the most recent LogFormat directive, which does not have a nickname. As a result, the format can be controlled by defining it just prior to the TransferLog directive:



        LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti" **%T/%D**"
        TransferLog /var/log/httpd/ssl_access_log





        share|improve this answer













        The RHEL version of Apache HTTP server defines the SSL configuration in a separate configuration file, which is located at /etc/httpd/conf.d/ssl.conf.



        This configuration file also defines the log file for the SSL virtual host using the TransferLog directive:



        # Use separate log files for the SSL virtual host; note that LogLevel
        # is not inherited from httpd.conf.
        ErrorLog logs/ssl_error_log
        TransferLog logs/ssl_access_log
        LogLevel warn


        The TransferLog directive uses the log format defined by the most recent LogFormat directive, which does not have a nickname. As a result, the format can be controlled by defining it just prior to the TransferLog directive:



        LogFormat "%h %l %u %t "%r" %>s %b "%Refereri" "%User-Agenti" **%T/%D**"
        TransferLog /var/log/httpd/ssl_access_log






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 17 at 9:12









        HaxielHaxiel

        2,3001812




        2,3001812



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f494905%2fapache-2-4-get-request-processing-time-in-microseconds-log%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown






            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay