Want to subscribe to topics you're interested in?
Become a Member

Checking for yum updates every time you exit

Discussion in 'Other Centmin Mod Installed software' started by BamaStangGuy, Feb 8, 2018.

  1. BamaStangGuy

    BamaStangGuy Active Member

    494
    142
    43
    May 25, 2014
    Ratings:
    +187
    Local Time:
    1:49 AM
    Can this be disabled or moved to an option? Sometimes it just sits there for well over a minute, if not longer than 2 minutes hanging before it finally does something.

    This adds up if you are working on a new server and constantly inside centmin.sh
     
  2. eva2000

    eva2000 Administrator Staff Member

    32,250
    7,165
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,892
    Local Time:
    5:49 PM
    Nginx 1.13.x
    MariaDB 5.5
    • Maybe you have slow yum mirrors ? Tried
      Code (Text):
      yum clean all
    • Do you get hangs on initial login to server as well?
    • Do you get hangs when you initially run centmin.sh as well?
    • When there's hangs on centmin.sh menu exit, are there actually yum updates available or no updates listed? If there's a correlation with hangs and having yum package updates available and listed, then one way to minimise the problem is to setup yum-cron for automatically nightly updates as then the chances of having package updates detected on centmin.sh menu exit are lessened due to yum-cron already having installed the updates Automatic nightly YUM updates with yum-cron
    You can try running centmin.sh menu option 24 in debug mode logged to debug.txt text file in /root/centminlogs directory by running these 3 commands paying attention on 2nd command's run as to what text is displayed on the screen during any hangs you may experience.
    Code (Text):
    cd /usr/local/src/centminmod
    echo 24 | bash -x centmin.sh 2>&1 | awk '{ print strftime("%Y-%m-%d %H:%M:%S"), $0; fflush(); }' | tee /root/centminlogs/debug.txt && echo "debug log saved at /root/centminlogs/debug.txt"
    sed -i "s|$(hostname)|hostname|g" /root/centminlogs/debug.txt
    

    Then copy the contents of /root/centminlogs/debug.txt into a pastebin.com or gist.github.com shared link - with an sensitive info masked. At least server hostname will be replaced with word hostname instead via last sed replacement line.
     
  3. pamamolf

    pamamolf Well-Known Member

    2,974
    274
    83
    May 31, 2014
    Ratings:
    +484
    Local Time:
    9:49 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    For me it takes a few seconds as needed.....

    Do you have the same delay when you manually check for updateds?

    Maybe some dns issues?
     
  4. Jon Snow

    Jon Snow Active Member

    260
    39
    28
    Jun 30, 2017
    Ratings:
    +59
    Local Time:
    3:49 AM
    Nginx 1.13.4
    MariaDB 10.1.26
    Same here.
     
  5. Sunka

    Sunka Well-Known Member

    949
    250
    63
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +411
    Local Time:
    8:49 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    10-15 seconds here
     
  6. eva2000

    eva2000 Administrator Staff Member

    32,250
    7,165
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,892
    Local Time:
    5:49 PM
    Nginx 1.13.x
    MariaDB 5.5
    using above 3 commands, longest part for me is ~13 seconds for yum check-update which is normal
    Code (Text):
    2018-02-08 21:53:16 + echo ' checking for YUM updates... please wait...'
    2018-02-08 21:53:16  checking for YUM updates... please wait...
    2018-02-08 21:53:16 + [[ -f /etc/yum.repos.d/remi.repo ]]
    2018-02-08 21:53:16 ++ /usr/bin/yum --disableplugin=priorities,versionlock -e 0 -d 0 check-update --enablerepo=remi,city-fan.org '--exclude=nginx* php* mysql*'
    2018-02-08 21:53:29 ++ echo 100
    2018-02-08 21:53:29 + UPDATE_CHECK=100
    

    if you don't use varnish cache, you can disable the varnish repo to speed up the check
    Code (Text):
    yum-config-manager --disable varnishcache_varnish41 varnishcache_varnish41-source | grep enabled
    

    ~4 seconds with varnish repo disabled
    Code (Text):
    2018-02-08 21:57:25 + echo ' checking for YUM updates... please wait...'
    2018-02-08 21:57:25  checking for YUM updates... please wait...
    2018-02-08 21:57:25 + [[ -f /etc/yum.repos.d/remi.repo ]]
    2018-02-08 21:57:25 ++ /usr/bin/yum --disableplugin=priorities,versionlock -e 0 -d 0 check-update --enablerepo=remi,city-fan.org '--exclude=nginx* php* mysql*'
    2018-02-08 21:57:29 ++ echo 100
    2018-02-08 21:57:29 + UPDATE_CHECK=100
    
     
  7. pamamolf

    pamamolf Well-Known Member

    2,974
    274
    83
    May 31, 2014
    Ratings:
    +484
    Local Time:
    9:49 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Yes i have it also disabled :)
     
  8. BamaStangGuy

    BamaStangGuy Active Member

    494
    142
    43
    May 25, 2014
    Ratings:
    +187
    Local Time:
    1:49 AM
    Disabling Varnish check has made it much more bearable.
     
    • Like Like x 1
  9. eva2000

    eva2000 Administrator Staff Member

    32,250
    7,165
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,892
    Local Time:
    5:49 PM
    Nginx 1.13.x
    MariaDB 5.5
    how much better time wise ?