CentOS 5.5核心升級 安裝iotop

來源:互聯網
上載者:User

CentOS 5.5核心升級 安裝iotop

Linux中的iotop命令主要用於顯示硬碟IO,但該命令只存在於kernelv2.6.20之後的版本, 那麼要如何安裝iotop命令呢?下面小編就給大家介紹下如何在Linux上安裝iotop命令。

iotop命令是介面風格類似top命令。這個命令只有在kernelv2.6.20及以後的版本中才有。python版本需要 python2.7及以上版本

[root@MyO ~]# uname -r
2.6.18-194.el5xen #我的核心版本是這個所以得升級了
--------------------------------------------------------------------------------------------------------------------------
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.27.57.tar.bz2 --no-check-certificate
 tar jxf linux-2.6.27.57.tar.bz2 -C /usr/src/
cd /usr/src/linux-2.6.27.57/
make mrproper
make menuconfig #選上如,還有其他的網上說後面這個:可能是版本不同吧,我並沒有看到,General setup -->enable deprecated sysfs features to support old userspace tools,但是我能選的都選了

make
 make modules_install
 make install
[root@MyO linux-2.6.27.57]# make install
sh /usr/src/linux-2.6.27.57/arch/x86/boot/install.sh 2.6.27.57 arch/x86/boot/bzImage System.map "/boot"
然後設定/boot/grub/grub.conf
將default設定成0 重啟,重啟後可能串連不上crt,xshell,重啟下網路就好了service network restart
[root@MyO ~]# uname -r
2.6.27.57
安裝python2.7
看下你當前的python是不是2.7的 python -V不是按照下面操作
wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
tar jxf Python-2.7.2.tar.bz2 -C /usr/src
cd /usr/src/Python-2.7.2
./configure
make
make install
預設的安裝路徑是/usr/local/bin/python2.7
建立軟串連使得python指向python2.7
 mv /usr/bin/python /usr/bin/python2.4
 ln -s /usr/local/bin/python2.7 /usr/bin/python
安裝iotop
wget http://guichaz.free.fr/iotop/files/iotop-0.4.4.tar.gz
tar zxf iotop-0.4.4.tar.gz
cd iotop-0.4.4
 python setup.py build
python setup.py install

–version 查看版本資訊的
-h, –help 查看協助資訊的
-o, –only 只顯示在劃硬碟的程式
-b, –batch 批量處理 用來記錄日誌的
-n NUM  設定迴圈幾次
-d SEC, –delay=SEC  設定顯示時間間隔

本文永久更新連結地址:

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.