[[email protected] ~]# yum install -y zlib zlib-devel bzip2 Bzip2-devel ncurses ncurses-devel readline readline-devel openssl openssl-devel openssl-static gdbm gdbm-devel sqlite sqlite-devel[[email protected] ~]# tar zxvf python-3.6.1.tgz[[email protected] ~]# cd python-3.6.1[[email protected] python-3.6.1]# ./configure --prefix=/usr/local/python[[email protected] Python-3.6.1]# make[[email protected] Python-3.6.1]# make install[[email Protected] ~]# rm -rf /usr/bin/python[[email protected] ~]# ln -s /usr/local/python/bin/python3.6 /usr/bin/python[[email protected] ~]# ll /usr/ bin/pythonlrwxrwxrwx 1 root root 31 mar 16 05:47 /usr/bin/python -> /usr/local/python/bin/python3.6[[email protected] ~]# python -vpython 3.6.1
[email protected] ~]# which yum/usr/bin/yum[[email protected] ~]# vi/usr/bin/yum#!/usr/bin/python2.6
[[Email protected] ~]# tar zxvf psutil-5.4.3.tar.gz[[email protected] ~]# CD Psutil-5.4.3[[email protected] psutil-5.4.3] # python setup.py Install
[Email protected] ~]# vi/etc/profilepath= $PATH:/usr/local/python/bin[[email protected] ~]# source/etc/profile
[Email protected] ~]# PIP3 install glancescollecting glances downloading glances-2.11.1.tar.gz (5.7MB) 100% | 5.7MB 18kb/s requirement already satisfied:psutil>=2.0.0 in/usr/local/python/lib/python3.6/site-packages/ Psutil-5.4.3-py3.6-linux-x86_64.egg (from glances) installing collected packages:glances Running setup.py install for GL Ances donesuccessfully installed glances-2.11.1
[[email protected] ~]# glancesking01 (centos 6.5 64bit / linux 2.6.32-431.el6.x86_64) uptime: 4:49:23cpu [| 3.2%] cpu 3.2% nice: 0.0% ctx_sw: 84 MEM 66.1% active: 145M SWAP 11.3% LOAD 1-coremem [| | | | | | | | | | | | | | | | | | | | | | | | | 66.1%] user: 2.3% irq: 0.0% inter: 110 total: 490M Inactive: 248m total: 4.00g 1 min: 0.04swap [| | | | | 11.3%] system: 1.0% iowait: 0.0% sw_int: 126 used: 324m buffers: 12.2m used: 464M 5 min: 0.02 idle: 96.8% steal: 0.0% free: 166M cached: 121M free: 3.55G 15 min: 0.02NETWORK Rx/s Tx/s TASKS 81 (125 THR),  1 RUN, 80 SLP, 0 oth sorted automatically by cpu_percent, flat vieweth0 768b 3Kblo 256b 256b CPU% MEM% VIRT RES PID USER ni s time+ r/s w/s command 3.2 5.6 519m 27.3m 14682 root 0 R 0:01.32 0 0 /usr/local/python/bin/python3.6 /usr/local/python/bin/ glancesdisk i/o r/s w/s 0.0 0.1 18.9M 704K 1 root 0 s 0:06.78 0 0 /sbin/initsda1 0 0 0.0 0.0 0 0 2 root 0 S 0:00.00 0 0 kthreaddsda2 0 13k 0.0 0.0 0 0 3 root 0 S 0:00.00 0 0 migration/0sda3 0 0 0.0 0.0 0 0 4 root 0 s&Nbsp; 0:00.60 0 0 ksoftirqd/0sda4 0 0 0.0 0.0 0 0 5 root 0 s 0:00.00 0 0 migration/0 0.0 0.0 0 0 6 root 0 S 0:00.20 0 0 watchdog/0file sys used total 0.0 0.0 0 0 7 root 0 S 0:05.17 0 0 events/0/ (SDA2) 4.11G 197g 0.0 0.0 0 0 8 root 0 S 0:00.00 0 0 cgroup/boot 37.8M 484M 0.0 0.0 0 0 9 root 0 s 0:00.00 0 0 khelper/usr 10.9g 291G 0.0 0.0 0 0 10 root 0 S 0:00.00 0 0 netns 0.0 0.0 0 0 11 root 0 s 0:00.00 0 0 async/mgr 0.0 0.0 0 0 12 root 0 s 0:00.00 0 0 pm 0.0 0.0 0 0 13 root 0 s 0:00.70 0 0 sync_supers 0.0 0.0 0 0 14 root 0 S 0:00.70 0 0 bdi-default 0.0 0.0 0 0 15 root 0 S 0:00.00 0 0 kintegrityd/0 0.0 0.0 0 0 16 root 0 s 0:01.43 0 0 kblockd/0 0.0 0.0 0 0 17 root 0 S 0:00.00 0 0 kacpid 0.0 0.0 0 0 18 root 0 S 0:00.00 0 0 kacpi_notify 0.0 0.0 0 0 19 root 0 S 0:00.00 0 0 kacpi_hotplug 0.0 0.0 0 0 20 root 0 s 0:00.00 0 0 ata_aux 0.0 0.0 0 0 21 root 0 S 0:00.00 0 0 ata_sff/0 0.0 0.0 0 0 22 root 0 s 0:00.00 0 0 ksuspend_usbd2018-03-16 06:12:26 no warning or critical alert detected
Linux Performance monitoring tool: Glances deployment transcript