解决Centos5上升级Python后yum不能用的问题

把Centos5上的Python升级到2.6后,用yum安装东西时提示

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
 
 No module named yum
 
Please install a packagewhich provides this module, or
verify that the module is installed correctly.
 
It's possible that the above module doesn't match the
current version of Python, which is:
2.6.5 (r265:79063, Jul  22010, 16:30:56)[GCC 4.1.2 20080704(Red Hat 4.1.2-46)]If you cannot solve this problem yourself, please go to
the yum faq at:
 http://wiki.linux.duke.edu/YumFaq

解决方法:
由于yum 默认用的是python2.4,所以编译vim /usr/bin/yum

把#!/usr/bin/python 改为
#!/usr/bin/python2.4 即可

本日志由 flyinweb 于 2011-09-27 17:28:49 发表到 Linux 中,目前已经被浏览 604 次,评论 0 次;

作者添加了以下标签: yumNo module named yum

htop - an interactive process viewer for Linux

This is htop, an interactive process viewer for Linux. It is a text-mode application (for console or X terminals) and requires ncurses. Tested with Linux 2.4 and 2.6.

htop

官方网站:http://htop.sourceforge.net/
  可以进行水平或竖直滚动 (总算可以看到所有进程和全部命令行了)
  可以跟踪进程 (通过集成strace实现)
  主页面上显示常用功能项,很方便。top里可以要'h'一下。
  支持进程树状显示
  可以按名称查找进程
  支持鼠标
  htop很不错,但还可以做得更好,下面是我想要的功能:
  显示进程打开的文件
  显示进程内存映射情况
  更完整的man手册(比如设置更新周期的命令行选项'-d'就没有在手册中说明)
  P.S. strace是个宝贝。单独做一个strace前端本身就是个不错的项目,支持对strace结果的分类,查询等功能。

本日志由 flyinweb 于 2011-09-27 16:39:59 发表到 Linux 中,目前已经被浏览 576 次,评论 0 次;

作者添加了以下标签: htopIO监控

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

linux系统上可以使用(centos 2.6.18-144开始支持),dstat版本至少是:dstat-0.6.7-1.rf.noarch.rpm
安装
wget -c http://linux.web.psi.ch/dist/scientific/5/gfa/all/dstat-0.6.7-1.rf.noarch.rpm
rpm -Uvh dstat-0.6.7-1.rf.noarch.rpm


使用
# dstat -M topio -d -M topbio


本日志由 flyinweb 于 2011-09-27 14:40:26 发表到 Linux 中,目前已经被浏览 661 次,评论 0 次;

作者添加了以下标签: dstat

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

Newer Linux kernels have per-process I/O accounting and you can use the iotop tool to find out what’s performing I/O, but in many cases I’m trying to find the source of an I/O problem in an older kernel. I found sort of a hack-ish way to do that today, while trying to figure out why a system was basically unresponsive.

I found a post on Stack Overflow that showed a way you can get per process I/O statistics from the kernel even in older kernels. I adapted this to my needs, and wrote a little script.

本日志由 flyinweb 于 2011-09-27 14:38:13 发表到 Linux 中,目前已经被浏览 522 次,评论 0 次;

作者添加了以下标签: iodump

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

Mark Wong’s entry titled “Following up a couple questions from the presentation at PSU on January 8, 2009” just caught my eye:

What is ‘iopp’?

It’s a custom tool to go through the Linux process table to get i/o statistics per process. It is open source and can be downloaded from:

http://git.postgresql.org/?p=~markwkm/iopp.git;a=summary

本日志由 flyinweb 于 2011-09-27 14:34:58 发表到 Linux 中,目前已经被浏览 515 次,评论 0 次;

作者添加了以下标签: iopp

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

Following are few situations where you may be interested in performing a filesystem benchmarking.

=> Deploying a new application that is very read and write intensive.
=> Purchased a new storage system and would like to measure the performance.
=> Changing the RAID level and would like to measure the performance of the new RAID.
=> Changing the storage parameters and would like to know the performance impact of this change

This article gives you a jumpstart on performing benchmark on filesystem using iozone a free Filesystem Benchmark utility.

本日志由 flyinweb 于 2011-09-27 11:08:02 发表到 Linux 中,目前已经被浏览 482 次,评论 0 次;

作者添加了以下标签: I/O PerformanceIozone

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

系统启动顺序:

加载BIOS的硬件信息
└ 读取MBR的Boot Loader信息 stage1,stage2,grub.conf
└ Boot Loader加载内核 vminux,initrd
└ 内核执行init程序并取得inittab中运行信息
├ init执行/etc/rc.d/rc.sysinit
└ /etc/fstab加载分区等
├ init执行/etc/rc.d/rc
├ 启动对应运行级别的守护进程
└ 最后执行S99local,即/etc/rc.d/rc.local
└ init启动了mingetty,打开了终端供用户登录系统
└ 执行/bin/login程序
└ 成功登陆之后启动shell控制主机
└ shell配置脚本
├ /etc/profile --->/etc/profile.d/*.sh
└ ~user/.bash_profile
└ ~user/.bashrc
└ /etc/bashrc

本日志由 flyinweb 于 2011-09-27 09:07:33 发表到 Linux 中,目前已经被浏览 493 次,评论 0 次;

作者添加了以下标签: boot troubleshoot

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

Linux在启动过程中会出现一些故障,导致系统无法正常启动,本文列举了几个应用单用户模式、GRUB命令操作、Linux救援模式的典型故障修复案例帮助读者了解此类问题的解决。

本日志由 flyinweb 于 2011-09-27 08:58:09 发表到 Linux 中,目前已经被浏览 379 次,评论 0 次;

作者添加了以下标签: boot failure

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

2583/33