Welcome to Centmin Mod Community
Register Now

Beta Branch update config/motd/dmotd.sh add DMOTD_DEBUGSSHLOGIN variable in 123.0…

Discussion in 'Centmin Mod Github Commits' started by eva2000, Nov 7, 2016.

  1. eva2000

    eva2000 Administrator Staff Member

    30,563
    6,851
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,268
    Local Time:
    9:58 AM
    Nginx 1.13.x
    MariaDB 5.5
    update config/motd/dmotd.sh add DMOTD_DEBUGSSHLOGIN variable in 123.09beta01

    dmotd.sh symlinks to /usr/local/bin/dmotd which is triggered on each ssh login to also auto check for nginx and centmin mod git repo updates and alerts users if there's a new nginx version of updates available for Centmin Mod branch via github repo. Adding support for persistent config file variable DMOTD_DEBUGSSHLOGIN='y' enables debug mode for dmotd.sh so on ssh login more details stats are logged to a log file in /root/centminlogs to see where the time measured is spent particularly for git repo update checks for 'git fetch'

    Continue reading...

    123.09beta01 branch
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,563
    6,851
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,268
    Local Time:
    9:58 AM
    Nginx 1.13.x
    MariaDB 5.5
    example if you set DMOTD_DEBUGSSHLOGIN='y' in persistent config file /etc/centminmod/custom_config.inc and log into ssh session you'll see the following including a link to the log i.e. /root/centminlogs/cmm-login-git-checks_061116-160701.log
    Code (Text):
    ################ DMOTD DEBUG BEGIN ################
    DMOTD DEBUG: Ping test github.com
    PING github.com (192.30.253.113) 56(84) bytes of data.
    64 bytes from 192.30.253.113: icmp_seq=1 ttl=55 time=15.0 ms
    64 bytes from 192.30.253.113: icmp_seq=2 ttl=55 time=15.0 ms
    64 bytes from 192.30.253.113: icmp_seq=3 ttl=55 time=15.0 ms
    64 bytes from 192.30.253.113: icmp_seq=4 ttl=55 time=15.0 ms
    
    --- github.com ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 3004ms
    rtt min/avg/max/mdev = 15.002/15.015/15.031/0.122 ms
    
    DMOTD DEBUG: git fetch timings
    git fetch -v
    trace: built-in: git 'fetch' '-v'
    trace: run_command: 'git-remote-https' 'origin' 'https://github.com/centminmod/centminmod.git'
    packet:          git< # service=git-upload-pack
    packet:          git< 0000
    packet:          git< 7bc7ee315e25d59733e5f0380812408d783f402d HEAD\0multi_ack thin-pack side-band side-band-64k ofs-delta shallow no-progress include-tag multi_ack_detailed no-done symref=HEAD:refs/heads/master agent=git/2:2.6.5~peff-attributes-nofollow-1622-gbbc42c6
    packet:          git< 82965b0da7a6e65223a246efe212ea6b108d819c refs/heads/123.06stable
    packet:          git< fdbff5b7f0098c38114912d292c1f6affdcc41ca refs/heads/123.07stable
    packet:          git< ace353256d020342623c8879d853e8b6a90668e7 refs/heads/123.08beta03
    packet:          git< 3cac1205c62bf76e877963a13766c262f58ba54f refs/heads/123.08beta03-el7ffmpeg-fix
    packet:          git< 3003b45d3a8f90dffae6c780c56504e81739bec5 refs/heads/123.08beta03-rtmp
    packet:          git< 0ff748c6d935a7e425e5d72fe192b0a3f23b5d09 refs/heads/123.08beta03libressl
    packet:          git< 40048fa3d59372d1d3b26da2cc3ad2746186b9af refs/heads/123.08stable
    packet:          git< 9308c1cb70c331056a3e149c5b9f5a0fa750a4f4 refs/heads/123.08zerodown
    packet:          git< 5ad0d3a6b78d5f2753598337cdd173f213329266 refs/heads/123.09beta01
    packet:          git< 33bc44a3d15f7ae40092f8bd74c46fa9e7e4591f refs/heads/123.09beta01-gcc
    packet:          git< 525b36d283fe2ed51219ff2232e2c003cf9b4628 refs/heads/123.09beta01-gcc2
    packet:          git< f78191c9054801c7c7cb45d1fa876e3180fd53c1 refs/heads/123.09beta01le
    packet:          git< 3cfbe4f17ed98fbd2622a992e8a76b6416858517 refs/heads/123.09beta01le2
    packet:          git< 160e6c612c9b4b5548b6b3bc7182863d0dc1f625 refs/heads/123.09beta01le3
    packet:          git< ab21872b7a8329e6e0bcc98bbaf85f6e29d2b3ab refs/heads/123.09beta01le4
    packet:          git< d837dcb70b18ed66586f6204609af9c760d3371a refs/heads/123.09beta01le5
    packet:          git< 7bc7ee315e25d59733e5f0380812408d783f402d refs/heads/master
    packet:          git< 4b38cfbf5d77b7e504a3254398bf217848f7e1ca refs/pull/38/head
    packet:          git< 17561c82e9b94e0b19706ecdcabd1bab16b080c2 refs/pull/38/merge
    packet:          git< 9239dcb56747aed513e0f0916ea0091010ad8ca3 refs/pull/39/head
    packet:          git< bc649394f58a403276584f8f781d04f8c10ef4dc refs/pull/39/merge
    packet:          git< e84bcc69448e1a224a6cf54d1944cafb169482c7 refs/pull/43/head
    packet:          git< 5df8592659a3cf8144cd0a8dade43c2fca39c115 refs/pull/43/merge
    packet:          git< 918d2cf61a0345af451d2e65c2103ce850940264 refs/pull/46/head
    packet:          git< aaa7a984dd2b55107f1213347d8593757561a25b refs/pull/46/merge
    packet:          git< a4bea2ee9b6fe7394573b65fe6a3d99aec98e488 refs/pull/47/head
    packet:          git< 857a849c95e7e5cd8687a06d86e7b2b4f3503294 refs/pull/47/merge
    packet:          git< de85a479fbe3b66ad90420db9b789820c0fdb5a1 refs/pull/48/head
    packet:          git< f26bbd434377701dc74767d02af51f79c355d0ec refs/pull/48/merge
    packet:          git< 0def96da5af6bb7813c72def0ade082aef6d8435 refs/pull/50/head
    packet:          git< 34824624fb643dc3b874789a7049962f01de88df refs/pull/50/merge
    packet:          git< 7d9e4000f05ed61ead8b04cb38015a9acab69015 refs/pull/55/head
    packet:          git< 84d96bda504db4565f7a373b138deae305c8f62e refs/pull/55/merge
    packet:          git< 4bdd50542e2efd49518e66054dc16bab09d244bf refs/tags/123.06
    packet:          git< 388e6e81a5095352ff18cb76d4a3b16df79559c6 refs/tags/123.06^{}
    packet:          git< 21bc9e22eeb5e274307a7d5c5bc9c222268842d3 refs/tags/123.07
    packet:          git< 78df2f6663c04b4e2da3ab45bcbc4ea608000ec8 refs/tags/123.07^{}
    packet:          git< 0000
    trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
    trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all'
    trace: exec: 'git' 'rev-list' '--objects' '--stdin' '--not' '--all'
    trace: built-in: git 'rev-list' '--objects' '--stdin' '--not' '--all'
    From https://github.com/centminmod/centminmod
     = [up to date]      123.09beta01 -> origin/123.09beta01
    trace: run_command: 'gc' '--auto'
    trace: exec: 'git' 'gc' '--auto'
    trace: built-in: git 'gc' '--auto'
    real: 5.32s user: 0.06s sys: 0.07s cpu: 2% maxmem: 10640 KB cswaits: 1093
    
    ################  DMOTD DEBUG END  ################
    
    trace: built-in: git 'rev-parse' 'HEAD'
    trace: built-in: git 'rev-parse' '@{u}'
    ===============================================================================
     Centmin Mod local code is up to date at /usr/local/src/centminmod
     no available updates at this time...
    ===============================================================================
    
    DMOTD DEBUG: timings saved at:
    /root/centminlogs/cmm-login-git-checks_061116-160701.log