灌溉梦想,记录脚步
标签类目:linux

Bonnie++

Bonnie++是一个配置简单,使用方便的磁盘IO测试工具。
1、安装

1
2
3
4
5
6
#wget http://www.coker.com.au/bonnie++/bonnie++-1.03e.tgz
#tar zxvf bonnie++-1.03e.tgz
#cd bonnie++-1.03e
#./configure
#make
#make install

2、bonnie++(Version: 1.03)的使用方法以及结果的含义。
usage: bonnie++ [-d scratch-dir] [-s size(Mb)[:chunk-size(b)]]
[-n number-to-stat[:max-size[:min-size][:num-directories]]]
[-m machine-name]
[-r ram-size-in-Mb]
[-x number-of-tests] [-u uid-to-use:gid-to-use] [-g gid-to-use]
[-q] [-f] [-b] [-p processes -y]
继续阅读 »

linux 中oracle 10g rac 关闭crs开机自启动

linux 中在没有对init.crs作修改的时候,在开机时总是会自动把的cluster 软件和一起和系统起来.数据库raclinux

另外,也可以通过crs-stat -t查看,把没有启动的服务手工启动

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[oracle@rac1 ~]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.....CRM.cs application    OFFLINE   OFFLINE              
ora....db1.srv application    OFFLINE   OFFLINE              
ora.devdb.db   application    ONLINE    ONLINE    rac1       
ora....b1.inst application    ONLINE    ONLINE    rac1       
ora....b2.inst application    ONLINE    OFFLINE              
ora....SM1.asm application    ONLINE    ONLINE    rac1       
ora....C1.lsnr application    ONLINE    ONLINE    rac1       
ora.rac1.gsd   application    ONLINE    ONLINE    rac1       
ora.rac1.ons   application    ONLINE    ONLINE    rac1       
ora.rac1.vip   application    ONLINE    ONLINE    rac1       
ora....SM2.asm application    ONLINE    OFFLINE              
ora....C2.lsnr application    ONLINE    OFFLINE              
ora.rac2.gsd   application    ONLINE    OFFLINE              
ora.rac2.ons   application    ONLINE    OFFLINE              
ora.rac2.vip   application    ONLINE    ONLINE    rac1

继续阅读 »

linux系统实用命令

1、统计apache占用的系统内存

ps aux | grep apache | awk ‘{sum+=$4};END {print sum}’

注:$4表示第四域

2、在VIM中的一些技巧

(针对当前屏幕) H——跳到第一行 M——跳到中间一行 L——跳到最后一行

(针对整个文档) gg——到首行 G——到尾行

7yy复制7行 5dd 删除5行

继续阅读 »

DD命令详解

1.命令简介
dd 的主要选项:

指定数字的地方若以下列字符结尾乘以相应的数字:

b=512, c=1, k=1024, w=2, xm=number m

if=file #输入文件名,缺省为标准输入。
of=file #输出文件名,缺省为标准输出。
ibs=bytes #一次读入 bytes 个字节(即一个块大小为 bytes 个字节)。
obs=bytes #一次写 bytes 个字节(即一个块大小为 bytes 个字节)。
bs=bytes #同时设置读写块的大小为 bytes ,可代替 ibs 和 obs 。
cbs=bytes #一次转换 bytes 个字节,即转换缓冲区大小。
skip=blocks #从输入文件开头跳过 blocks 个块后再开始复制。
继续阅读 »

linux启动过程

硬件读取引导扇区

加载LILO或者grub

加载内核

挂装根文件系统

启动/sbin/init ,一切进程的“祖父”

读取/etc/inittab文件

读取rc.sysinit文件

读取/etc/fstab文件

运行rcX.d下的文件(文件都是init.d下的符号链接)

其中有一个xinetd 的超级进程,调用/etc/xinetd.conf 配置文件,从配置文件中知道读/etc/xinetd.d 文件,结束后调用Miggetty

读取/etc/rc.d/rc.local文件

Linux NFS Root and PXE-Boot

Linux kernel hacking and test running on the same machine becomes a major pain. This tutorial explains how to separate the two easily for a quick code-and-test loop. This tutorial explains how to setup a Linux thin client that boots using PXE by pulling a remote Linux kernel image and mounting a remote root file system over NFS. This is only possible if your client machine has a network card that supports this (do you remember seeing some type of option like press N to boot from network just after posting?). I am using Fedora Core 5 as my server, so some of the details may be specific to FC.

Most of the details of setting up the PXE boot server were found at Setting up a PXE-Boot Server.

1) yum install tftp-server dhcp
Make sure you have an NFS server.

2) create /etc/dhcpd.conf
继续阅读 »

PXELINUX

What is PXELINUX?

PXELINUX is a SYSLINUX derivative, for booting Linux off a network server, using a network ROM conforming to the Intel PXE (Pre-Execution Environment) specification. PXELINUX is not a program that is intended to be flashed or burned into a PROM on the network card; if you want that, check out Etherboot ( http://www.etherboot.org/).

If you want to create PXE-compliant boot PROM for your network card (to use with PXELINUX, for example), check out NetBoot (http://netboot.sourceforge.net/).

How do I Configure PXELINUX?

PXELINUX operates in many ways like SYSLINUX. If you are not familiar with SYSLINUX, read the SYSLINUX FAQ first, since this documentation only explains the differences.

继续阅读 »