redhat5.4安装配置nmon

2023-10-28 02:10
文章标签 配置 安装 nmon redhat5.4

本文主要是介绍redhat5.4安装配置nmon,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

结论:

1,c语言的扩展名为.c的源文件可以使用cc或gcc编译器进行编译后,变成可执行文件
2,gcc或cc编译时,需要另一个文件makefile
3,makefile里面就是一个用于编译环境的配置信息,里面记录了各个操作系统平台和CPU处理器内核的配置信息
4,如何makefile里面没有你当前数据库版本的配置信息,需要你添加对应的操作系统配置信息
5,编译指令为 
cc -o nmon_x86_64_rhel54 lmon.c -g -O2 -D JFS -D GETUSER -Wall -D LARGEMEM -lncurses -g
(可以不需要makefile文件也可以用上述指令编译成功)
6,上述第5步运行编译期间若报没有ncurses.h,请安装ncurses-devel开发包即可

测试过程

1,操作系统版本
[root@seconary ~]# more /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
[root@seconary ~]#

2,下载redhat5.4 nmon安装介质
http://sourceforge.net/projects/nmon/files




3,上传nmon安装介质
[root@seconary ~]# mkdir -p /nmon_test
[root@seconary ~]# cd /nmon_test/
[root@seconary nmon_test]#


4,安装编译nmon
[root@seconary nmon_test]# ll
total 196
-rwxrwxrwx 1 root root 185939 Aug 10 2010 lmon14a.c
-rwxrwxrwx 1 root root 4154 May 3 10:37 makefile


5,重命名上述头文件lmon14a.c
[root@seconary nmon_test]# mv lmon14a.c lmon.c


6,makefile文件添加如下2行新内容(添加一直报错),其实就是编译要用到makefile文件
[root@seconary nmon_test]# tail -2f makefile
cc -o nmon_x86_64_rhel54 $(FILE) $(CFLAGS) $(LDFLAGS) -D X86
cc -o nmon15cs lmon15c_stealing.c $(CFLAGS) $(LDFLAGS) -D X86


7,编译报错
[root@seconary nmon_test]# make nmon_x86_rhel54
gcc44 -o nmon_x86_rhel54 lmon.c -g -O3 -D JFS -D GETUSER -Wall -D LARGEMEM -lm -lncurses -g -D X86
make: gcc44: Command not found
make: *** [nmon_x86_rhel54] Error 127


8,修改makefile对应部分,gcc44改为gcc(很简单因为找不到gcc44,所以改为gcc)
nmon_x86_rhel54: $(FILE)
gcc -o nmon_x86_rhel54 $(FILE) $(CFLAGS) $(LDFLAGS) -D X86


9,再次编译报错
[root@seconary nmon_test]# cc -o nmon_x86_64_rhel54 lmon.c -g -O2 -D JFS -D GETUSER -Wall -D LARGEMEM -lncurses -g
lmon.c:35:21: error: ncurses.h: No such file or directory


10,已经安装了ncurses软件包
[root@seconary nmon_test]# rpm -qa|grep ncurses
ncurses-5.5-24.20060715
ncurses-5.5-24.20060715
[root@seconary nmon_test]#


11,加载操作系统 光盘
[root@seconary Server]# mount /dev/cdrom /mnt
[root@seconary Server]# pwd
/mnt/Server


12,可见已经安装了ncurses软件包,但没有安装ncurses-devel软件包
[root@seconary Server]# ll -l *curse*
-r--r--r-- 348 root root 1183178 Jan 18 2007 ncurses-5.5-24.20060715.i386.rpm
-r--r--r-- 141 root root 1209755 Jan 18 2007 ncurses-5.5-24.20060715.x86_64.rpm
-r--r--r-- 333 root root 1709697 Jan 18 2007 ncurses-devel-5.5-24.20060715.i386.rpm
-r--r--r-- 141 root root 1790863 Jan 18 2007 ncurses-devel-5.5-24.20060715.x86_64.rpm
-r--r--r-- 135 root root 42838 Mar 25 2009 php-ncurses-5.1.6-23.2.el5_3.x86_64.rpm
[root@seconary Server]# rpm -qa|grep ncurse
ncurses-5.5-24.20060715
ncurses-5.5-24.20060715




13,进行安装ncurses-devel软件包
安装了ncurses-devel还是找不到curse.h的头文件
[root@seconary Server]# rpm -ivh ncurses-devel-5.5-24.20060715.x86_64.rpm
Preparing... ########################################### [100%]
1:ncurses-devel ########################################### [100%]
[root@seconary Server]#
[root@seconary Server]#
[root@seconary Server]# locate curses.h
[root@seconary Server]# locate ncurses.h
[root@seconary Server]# rpm -ivh ncurses-devel-5.5-24.20060715.i386.rpm
Preparing... ########################################### [100%]
1:ncurses-devel ########################################### [100%]
[root@seconary Server]#
[root@seconary Server]#
[root@seconary Server]#
[root@seconary Server]# locate ncurses.h
[root@seconary Server]# locate curses.h


14,locate查不到头文件,但其实是存在的
[root@seconary Server]# cd /usr/include
[root@seconary include]# ll *ses*h
-rw-r--r-- 1 root root 2115 Jul 17 2009 aliases.h
lrwxrwxrwx 1 root root 16 Sep 4 03:53 curses.h -> ncurses/curses.h
lrwxrwxrwx 1 root root 17 Sep 4 03:53 ncurses.h -> ncurses/ncurses.h


15,更新locate元数据库,locate运行成功
[root@seconary include]# updatedb
You have new mail in /var/spool/mail/root
[root@seconary include]# locate curses.h
/usr/include/curses.h
/usr/include/ncurses.h
/usr/include/ncurses/curses.h
/usr/include/ncurses/ncurses.h
/usr/include/ncursesw/curses.h
/usr/include/ncursesw/ncurses.h


16,编译nmon成功
[root@seconary nmon_test]# cc -o nmon_x86_64_rhel54 lmon.c -g -O2 -D JFS -D GETUSER -Wall -D LARGEMEM -lncurses -g
[root@seconary nmon_test]#


17,编译成功当前目录多了一个文件nmon_x86_64_rhel54
[root@seconary nmon_test]# ll
total 416
-rwxrwxrwx 1 root root 185939 Sep 4 03:39 lmon.c
-rwxrwxrwx 1 root root 4250 Sep 4 03:34 makefile
-rwxr-xr-x 1 root root 219751 Sep 4 03:58 nmon_x86_64_rhel54

18,在当前目录运行nmon
[root@seconary nmon_test]# ./nmon_x86_64_rhel54




19,按n键实时监控网络性能,至于其它监控指标,请参考上述命令提示


20,nmon命令如何使用
[root@seconary nmon_test]# ./nmon_x86_64_rhel54 --help
./nmon_x86_64_rhel54: invalid option -- -

Hint: nmon_x86_64_rhel54 [-h] [-s <seconds>] [-c <count>] [-f -d <disks> -t -r <name>] [-x]

-h FULL help information
Interactive-Mode:
read startup banner and type: "h" once it is running
For Data-Collect-Mode (-f)
-f spreadsheet output format [note: default -s300 -c288]
optional
-s <seconds> between refreshing the screen [default 2]
-c <number> of refreshes [default millions]
-d <disks> to increase the number of disks [default 256]
-t spreadsheet includes top processes
-x capacity planning (15 min for 1 day = -fdt -s 900 -c 96)

21,为了方便使用nmon,运行如下命令,以后就可以直接使用nmon命令了
[root@seconary nmon_test]# cp nmon_x86_64_rhel54 /bin/nmon


个人简介


8年oracle从业经验,具备丰富的oracle技能,目前在国内北京某专业oracle服务公司从事高级技术顾问。
服务过的客户:
中国电信
中国移动
中国联通
中国电通
国家电网
四川达州商业银行
湖南老百姓大药房
山西省公安厅
中国邮政
北京302医院     
河北廊坊新奥集团公司

 项目经验:
中国电信3G项目AAA系统数据库部署及优化
      中国联通4G数据库性能分析与优化
中国联通CRM数据库性能优化
中国移动10086电商平台数据库部署及优化
湖南老百姓大药房ERR数据库sql优化项目
四川达州商业银行TCBS核心业务系统数据库模型设计和RAC部署及优化
四川达州商业银行TCBS核心业务系统后端批处理存储过程功能模块编写及优化
北京高铁信号监控系统RAC数据库部署及优化
河南宇通客车数据库性能优化
中国电信电商平台核心采购模块表模型设计及优化
中国邮政储蓄系统数据库性能优化及sql优化
北京302医院数据库迁移实施
河北廊坊新奥data guard部署及优化
山西公安厅身份证审计数据库系统故障评估
国家电网上海灾备项目4 node rac+adg 
       贵州移动crm及客服数据库性能优化项目
       贵州移动crm及客服务数据库sql审核项目
       深圳穆迪软件有限公司数据库性能优化项目

联系方式:
手机:18201115468
qq   :   305076427
qq微博: wisdomone1
新浪微博:wisdomone9
qq群:275813900    
itpub博客名称:wisdomone1    


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9240380/viewspace-1790929/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/9240380/viewspace-1790929/

这篇关于redhat5.4安装配置nmon的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/289993

相关文章

MySQL9.0默认路径安装下重置root密码

《MySQL9.0默认路径安装下重置root密码》本文主要介绍了MySQL9.0默认路径安装下重置root密码,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们... 目录问题描述环境描述解决方法正常模式下修改密码报错原因问题描述mysqlChina编程采用默认安装路径,

MySQL 中的服务器配置和状态详解(MySQL Server Configuration and Status)

《MySQL中的服务器配置和状态详解(MySQLServerConfigurationandStatus)》MySQL服务器配置和状态设置包括服务器选项、系统变量和状态变量三个方面,可以通过... 目录mysql 之服务器配置和状态1 MySQL 架构和性能优化1.1 服务器配置和状态1.1.1 服务器选项

Python使用国内镜像加速pip安装的方法讲解

《Python使用国内镜像加速pip安装的方法讲解》在Python开发中,pip是一个非常重要的工具,用于安装和管理Python的第三方库,然而,在国内使用pip安装依赖时,往往会因为网络问题而导致速... 目录一、pip 工具简介1. 什么是 pip?2. 什么是 -i 参数?二、国内镜像源的选择三、如何

Python安装时常见报错以及解决方案

《Python安装时常见报错以及解决方案》:本文主要介绍在安装Python、配置环境变量、使用pip以及运行Python脚本时常见的错误及其解决方案,文中介绍的非常详细,需要的朋友可以参考下... 目录一、安装 python 时常见报错及解决方案(一)安装包下载失败(二)权限不足二、配置环境变量时常见报错及

SpringBoot+MyBatis-Flex配置ProxySQL的实现步骤

《SpringBoot+MyBatis-Flex配置ProxySQL的实现步骤》本文主要介绍了SpringBoot+MyBatis-Flex配置ProxySQL的实现步骤,文中通过示例代码介绍的非常详... 目录 目标 步骤 1:确保 ProxySQL 和 mysql 主从同步已正确配置ProxySQL 的

Spring Boot整合log4j2日志配置的详细教程

《SpringBoot整合log4j2日志配置的详细教程》:本文主要介绍SpringBoot项目中整合Log4j2日志框架的步骤和配置,包括常用日志框架的比较、配置参数介绍、Log4j2配置详解... 目录前言一、常用日志框架二、配置参数介绍1. 日志级别2. 输出形式3. 日志格式3.1 PatternL

配置springboot项目动静分离打包分离lib方式

《配置springboot项目动静分离打包分离lib方式》本文介绍了如何将SpringBoot工程中的静态资源和配置文件分离出来,以减少jar包大小,方便修改配置文件,通过在jar包同级目录创建co... 目录前言1、分离配置文件原理2、pom文件配置3、使用package命令打包4、总结前言默认情况下,

MySQL8.2.0安装教程分享

《MySQL8.2.0安装教程分享》这篇文章详细介绍了如何在Windows系统上安装MySQL数据库软件,包括下载、安装、配置和设置环境变量的步骤... 目录mysql的安装图文1.python访问网址2javascript.点击3.进入Downloads向下滑动4.选择Community Server5.

CentOS系统Maven安装教程分享

《CentOS系统Maven安装教程分享》本文介绍了如何在CentOS系统中安装Maven,并提供了一个简单的实际应用案例,安装Maven需要先安装Java和设置环境变量,Maven可以自动管理项目的... 目录准备工作下载并安装Maven常见问题及解决方法实际应用案例总结Maven是一个流行的项目管理工具

MySql9.1.0安装详细教程(最新推荐)

《MySql9.1.0安装详细教程(最新推荐)》MySQL是一个流行的关系型数据库管理系统,支持多线程和多种数据库连接途径,能够处理上千万条记录的大型数据库,本文介绍MySql9.1.0安装详细教程,... 目录mysql介绍:一、下载 Mysql 安装文件二、Mysql 安装教程三、环境配置1.右击此电脑