nmon安装方法linux,linux脚本:nmon安装步骤

nmon在liunx安装脚本

#!/bin/bash

#Please upload the nmon archive file to /home/aff first.

#Check if the nmon file archive exists in the /home/aff/ directory.

if [ ! -f /home/aff/nmon_linux_14i.tar.gz ];then

echo "The nmon archive file is not exist,please download first."

exit 1

fi

#create nmon work directory.

mkdir /home/aff/nmon

#create nmon capture data directory.

mkdir /home/aff/nmon/capture

#Unzip and install the nmon file archive to the nmon working directory.

tar -zxvf /home/aff/nmon_linux_14i.tar.gz -C /home/aff/nmon

mv /home/aff/nmon/nmonmerge_x86_sles11 nmon

chmod a+x /home/aff/nmon/nmon

#Set environment variables and take effect.

echo export PATH=$PATH:/home/aff/nmon >> /home/aff/.bashrc

echo export DATA_DIR=/home/aff/nmon/capture >> /home/aff/.bashrc

source /home/aff/.bashrc

#Enter the nmon test to see if it works

nmon

nmon 安装步骤

#1、使用aff用户上传nmon包到 /aff/home/

#2、创建nmon工作目录 mkdir /home/aff/nmon

#3、创建nmon捕获数据存放目录 mkdir /home/aff/nmon/capture

#3、解压nmon包到/home/aff/nmon tar -zxvf /home/aff/nmon_linux_14i.tar.gz -C /home/aff/nmon

#4、重命名nmonmerge_x86_sles11到nmon mv /home/aff/nmon/nmonmerge_x86_sles11 nmon

#5、配置用户变量 echo PATH=$PATH:/home/aff/nmon/nmon >> /home/aff/.bashrc && echo DATA_DIR=/home/aff/nmon/capture >> /home/aff/.bashrc

#6、使变量立即生效 source /home/aff/.bashrc

#7、测试输入nmon是否可正常运行 nmon

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值