LoadRunner监控Linux的三种方法
方法一、LR + SiteScope
方法二、使用rstatd包
1、下载rpc.rstatd-4.0.1.tar.gz
2、解压缩
tar -zxvf rpc.rstatd-4.0.1.tar.gz
3、配置
./configure
4、编译
make
5、安装
make install
6、启动
rpc.rstatd
7、在LoadRunner中添加计数器
average load :在过去的1分钟,的平均负载
cpu utilization: cpu的使用率
disk traffic: disk传输率
paging rate: 每秒从磁盘读到物理内存,或者从物理内存写到页面文件的内存页数
Swap-in rate: 每秒交换到内存的进程数
Swap-out rate: 每秒从内存交换出来的进程
8、将服务设置为自动启动(Linux启动时自动启动这些服务):
vi /etc/rc.d/rc.local
如:
#rpc.rstatd--绝对路径
/usr/local/sbin/rpc.rstatd
方法3、使用Shell脚本
使用Shell脚本收集Linux资源写入csv文件,再通过LR的Analysis导入csv文件(Tools - Extenal Monitors - Import Data... )
Shell脚本如下所示:
#!/bin/bash
# (C) 2006 Mark Boddington, http://www.badpenguin.co.uk
# Licensed under the GNU GPL Version 2.
# ***** Version 0.2 *****
# TODO -- Create CSV parsing rules for the netstat.
# ***** Configuration *****
# set LOG to the directory you want to write the performance data to.
# set SLEEP to the number of seconds you want to sleep between samples
# set HDD to the number of had disks in your machine.
LOG=/home/mark/PerfMon/LIVE
SLEEP=10
HDD=2
HTYPE=$(uname -s)
genStat()
{
now=$( date +%S )
while [ "$now" -ne "30" ]
do
sleep 1
now=$( date +%S )
done
while :;
do
dat=$(date +%Y%m%d,%H:%M:%S)
day=$(date +%Y%m%d )
iostat -x 1 2 | sed -e"s/^\(.*\)/$dat \1/" | grep "[0-9]\." | tail -${HDD} >> ${LOG}/io.${day}.log &
vmstat 1 2 | awk "{ print \"$dat\", \$0 }" | tail -1 >> ${LOG}/vm.${d
相关文档:
linux目录架构
/ 根目录
/bin 常用的命令 binary file 的目錄
/boot 存放系统启动时必须读取的档案,包括核心 (kernel) 在内
/boot/grub/menu.lst GRUB设置
/boot/vmlinuz 内核
......
一、理解Linux的单用户多任务,多用户多任务概念;
Linux 是一个多用户、多任务的操作系统;我们应该了解单用户多任务和多用户多任务的概念;
1、Linux 的单用户多任务;
单用户多任务;比如我们以beinan 登录系统,进入系统后,我要打开gedit 来写文档,但在写文档的过程中,我感觉少点音乐,所以又打开xmms
来点音乐 ......
原文:http://www.cnitblog.com/201/archive/2009/08/20/60887.html
熟悉使用ifconfig 会非常方便。
ifconfig eth0 新ip
然后编辑/etc/sysconfig/network-scripts/ifcfg-eth0,修改ip
一、修改IP地址
[aeolus@db1 network-scripts]$ vi ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=s ......
1、Linux 基础
安装Linux操作系统 Linux文件系统 Linux常用命令 Linux启动过程详解 熟悉Linux服务能够独立安装Linux操作系统 能够熟练使用Linux系统的基本命令 认识Linux系统的常用服务安装Linux操作系统 Linux基本命令实践 设置Linux环境变量 定制Linux的服务 Shell 编程基础使用vi编辑文件 使用Emacs编辑文件 使用其他编 ......
与Windows将硬盘看做“C盘”、“D盘”几个独立的分区不同,Linux将整个文件系统看做一棵树,这棵树的树根叫做根文件系统,用/表示。各个分区通过“挂载”(mount)以文件夹的形式访问。
在/中的文件夹很多,本文介绍常见文件夹的意义。Linux的目录结构确实比较复杂,但设置合 ......