Want more timely Centmin Mod News Updates?
Become a Member

Glances a top command alternative

Discussion in 'Centmin Mod Insights' started by eva2000, Jan 1, 2017.

Tags:
  1. eva2000

    eva2000 Administrator Staff Member

    42,384
    9,571
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,751
    Local Time:
    11:38 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    should work fine did on my centos 7 system with ccache weird
    for CentOS 7, use
    Code (Text):
    yum -y install python2-pip

    to get pip there first
     
  2. eva2000

    eva2000 Administrator Staff Member

    42,384
    9,571
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,751
    Local Time:
    11:38 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    working psutil update with ccache in place

    did a force reinstall and filter egrep on ccache and installed keywords as verbose output -v is alot
    Code (Text):
    pip install --upgrade psutil --force-reinstall -v | egrep 'ccache|installed'
    
          Successfully uninstalled psutil-5.4.3
        ccache gcc -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_common.o
        ccache gcc -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_posix.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o
        ccache gcc -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_linux.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o
        ccache gcc -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_common.o
        ccache gcc -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_posix.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o
        writing list of installed files to '/tmp/pip-CNGGgO-record/install-record.txt'
    Successfully installed psutil-5.4.3
    
     
  3. pamamolf

    pamamolf Premium Member Premium Member

    3,584
    345
    83
    May 31, 2014
    Ratings:
    +667
    Local Time:
    3:38 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Doesn't work :

    error: command 'ccache' failed with exit status 1
     
  4. eva2000

    eva2000 Administrator Staff Member

    42,384
    9,571
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,751
    Local Time:
    11:38 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Also can try uninstall psutil and reinstalling. Might need to run uninstall twice and upgrade pip first too

    Code (Text):
    pip install --upgrade pip
    pip uninstall psutil
    pip uninstall psutil
    pip install psutil
    

    if that doesn't work disable ccache for just this SSH session
    Code (Text):
    export CC='gcc'
    pip install --upgrade pip
    pip uninstall psutil
    pip uninstall psutil
    pip install psutil
    

    with export CC variable to remove ccache would result in
    Code (Text):
    pip install --upgrade psutil --force-reinstall -v | egrep 'ccache|gcc|installed'
    
          Successfully uninstalled psutil-5.4.3
        gcc -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_common.o
        gcc -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_posix.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o
        gcc -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_linux.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o
        gcc -pthread -shared -Wl,-z,relro build/temp.linux-x86_64-2.7/psutil/_psutil_common.o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o -L/usr/lib64 -lpython2.7 -o build/lib.linux-x86_64-2.7/psutil/_psutil_linux.so
        gcc -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_common.o
        gcc -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_posix.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o
        gcc -pthread -shared -Wl,-z,relro build/temp.linux-x86_64-2.7/psutil/_psutil_common.o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o -L/usr/lib64 -lpython2.7 -o build/lib.linux-x86_64-2.7/psutil/_psutil_posix.so
        writing list of installed files to '/tmp/pip-UPqUxn-record/install-record.txt'
    Successfully installed psutil-5.4.3
    
     
  5. pamamolf

    pamamolf Premium Member Premium Member

    3,584
    345
    83
    May 31, 2014
    Ratings:
    +667
    Local Time:
    3:38 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    doesn't work and the issue exist on all Centos 7 older installations....



     
  6. eva2000

    eva2000 Administrator Staff Member

    42,384
    9,571
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,751
    Local Time:
    11:38 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    @pamamolf updated previous command to show how to temp disable ccache but

    @Andy @pamamolf just updated 123.09beta01 code to auto update pip, psutil and glances on centmin.sh runs ;) So just update 123.09beta01 code via centmin.sh menu option 23 submenu option 2, exit centmin.sh and reenter centmin.sh or you can run cmupdate command that was recently added and re-run centmin.sh menu option and then exit.

    Then verify versions
    Code (Text):
    pip show psutil pip glances
    

    Code (Text):
    pip show psutil pip glances
    Name: psutil
    Version: 5.4.3
    Summary: Cross-platform lib for process and system monitoring in Python.
    Home-page: https://github.com/giampaolo/psutil
    Author: Giampaolo Rodola
    Author-email: [email protected]
    License: BSD
    Location: /usr/lib64/python2.7/site-packages
    Requires: 
    ---
    Name: pip
    Version: 9.0.1
    Summary: The PyPA recommended tool for installing Python packages.
    Home-page: https://pip.pypa.io/
    Author: The pip developers
    Author-email: [email protected]
    License: MIT
    Location: /usr/lib/python2.7/site-packages
    Requires: 
    ---
    Name: Glances
    Version: 2.11.1
    Summary: A cross-platform curses-based monitoring tool
    Home-page: https://github.com/nicolargo/glances
    Author: Nicolas Hennion
    Author-email: [email protected]
    License: LGPLv3
    Location: /usr/lib/python2.7/site-packages
    Requires: psutil
    
     
  7. pamamolf

    pamamolf Premium Member Premium Member

    3,584
    345
    83
    May 31, 2014
    Ratings:
    +667
    Local Time:
    3:38 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    It has issues with psutil installation as the manual way :(
     
  8. pamamolf

    pamamolf Premium Member Premium Member

    3,584
    345
    83
    May 31, 2014
    Ratings:
    +667
    Local Time:
    3:38 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Ok i test this also:

    But nothing:

    Code:
    fatal error: Python.h: No such file or directory
    
    and then:
    
    error: command 'gcc' failed with exit status 1
    
     
  9. Andy

    Andy Active Member

    446
    73
    28
    Aug 6, 2014
    Ratings:
    +100
    Local Time:
    8:38 AM
    couldn't install psutils
    Code:
    pip install --upgrade psutil --force-reinstall -v | egrep 'ccache|gcc|installed'
        gcc -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_common.o
        error: command 'gcc' failed with exit status 1
    Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-M19xbM/psutil/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-9q4LDx-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-M19xbM/psutil/
     
  10. eva2000

    eva2000 Administrator Staff Member

    42,384
    9,571
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,751
    Local Time:
    11:38 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    ah strange python-devel package is missing
    Code (Text):
    yum -y install python-devel
    

    then try
     
  11. pamamolf

    pamamolf Premium Member Premium Member

    3,584
    345
    83
    May 31, 2014
    Ratings:
    +667
    Local Time:
    3:38 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Ok i fix it :)

    Looks like you haven't properly installed the header files and static libraries for python dev.

    So i did:

    and now:

     
  12. pamamolf

    pamamolf Premium Member Premium Member

    3,584
    345
    83
    May 31, 2014
    Ratings:
    +667
    Local Time:
    3:38 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    That one also works with no issues:

    and now i am getting this when i run glances:

     
  13. Andy

    Andy Active Member

    446
    73
    28
    Aug 6, 2014
    Ratings:
    +100
    Local Time:
    8:38 AM
    Yup. Looks like that's it. Thanks all.
     
  14. pamamolf

    pamamolf Premium Member Premium Member

    3,584
    345
    83
    May 31, 2014
    Ratings:
    +667
    Local Time:
    3:38 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    It seems now my issue to be glances old version?

    pip show psutil pip glances

     
  15. pamamolf

    pamamolf Premium Member Premium Member

    3,584
    345
    83
    May 31, 2014
    Ratings:
    +667
    Local Time:
    3:38 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Yup !!!!!

    Running this:
    All working great now !!!!!

    Thanks

    George you may need to check the installation of python-devel on the system and the upgrade routine also of Centminmod for glances that you just add a few minutes ago?
     
  16. pamamolf

    pamamolf Premium Member Premium Member

    3,584
    345
    83
    May 31, 2014
    Ratings:
    +667
    Local Time:
    3:38 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    I am also getting this warning when i start glances:

    Don't know if you know how to fix this also...
     
  17. Andy

    Andy Active Member

    446
    73
    28
    Aug 6, 2014
    Ratings:
    +100
    Local Time:
    8:38 AM
    My glances version is higher
    glances -V
    Glances v2.11.1 with psutil v5.4.3
     
  18. pamamolf

    pamamolf Premium Member Premium Member

    3,584
    345
    83
    May 31, 2014
    Ratings:
    +667
    Local Time:
    3:38 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    I got the new version also after running:

     
  19. eva2000

    eva2000 Administrator Staff Member

    42,384
    9,571
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,751
    Local Time:
    11:38 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    FYI, should be all fixed in latest 123.09beta01 code updated less than 10 seconds ago :D
     
  20. pamamolf

    pamamolf Premium Member Premium Member

    3,584
    345
    83
    May 31, 2014
    Ratings:
    +667
    Local Time:
    3:38 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Yes now it is auto fixing the issue :)

    Only that warning when it starts:
    No big deal but just to let you know :)
     
    • Like Like x 1