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

相关文章

IntelliJ IDEA 中配置 Spring MVC 环境的详细步骤及问题解决

《IntelliJIDEA中配置SpringMVC环境的详细步骤及问题解决》:本文主要介绍IntelliJIDEA中配置SpringMVC环境的详细步骤及问题解决,本文分步骤结合实例给大... 目录步骤 1:创建 Maven Web 项目步骤 2:添加 Spring MVC 依赖1、保存后执行2、将新的依赖

SpringBoot基于配置实现短信服务策略的动态切换

《SpringBoot基于配置实现短信服务策略的动态切换》这篇文章主要为大家详细介绍了SpringBoot在接入多个短信服务商(如阿里云、腾讯云、华为云)后,如何根据配置或环境切换使用不同的服务商,需... 目录目标功能示例配置(application.yml)配置类绑定短信发送策略接口示例:阿里云 & 腾

如何为Yarn配置国内源的详细教程

《如何为Yarn配置国内源的详细教程》在使用Yarn进行项目开发时,由于网络原因,直接使用官方源可能会导致下载速度慢或连接失败,配置国内源可以显著提高包的下载速度和稳定性,本文将详细介绍如何为Yarn... 目录一、查询当前使用的镜像源二、设置国内源1. 设置为淘宝镜像源2. 设置为其他国内源三、还原为官方

最详细安装 PostgreSQL方法及常见问题解决

《最详细安装PostgreSQL方法及常见问题解决》:本文主要介绍最详细安装PostgreSQL方法及常见问题解决,介绍了在Windows系统上安装PostgreSQL及Linux系统上安装Po... 目录一、在 Windows 系统上安装 PostgreSQL1. 下载 PostgreSQL 安装包2.

Maven如何手动安装依赖到本地仓库

《Maven如何手动安装依赖到本地仓库》:本文主要介绍Maven如何手动安装依赖到本地仓库问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、下载依赖二、安装 JAR 文件到本地仓库三、验证安装四、在项目中使用该依赖1、注意事项2、额外提示总结一、下载依赖登

CentOS7更改默认SSH端口与配置指南

《CentOS7更改默认SSH端口与配置指南》SSH是Linux服务器远程管理的核心工具,其默认监听端口为22,由于端口22众所周知,这也使得服务器容易受到自动化扫描和暴力破解攻击,本文将系统性地介绍... 目录引言为什么要更改 SSH 默认端口?步骤详解:如何更改 Centos 7 的 SSH 默认端口1

Maven的使用和配置国内源的保姆级教程

《Maven的使用和配置国内源的保姆级教程》Maven是⼀个项目管理工具,基于POM(ProjectObjectModel,项目对象模型)的概念,Maven可以通过一小段描述信息来管理项目的构建,报告... 目录1. 什么是Maven?2.创建⼀个Maven项目3.Maven 核心功能4.使用Maven H

SpringBoot多数据源配置完整指南

《SpringBoot多数据源配置完整指南》在复杂的企业应用中,经常需要连接多个数据库,SpringBoot提供了灵活的多数据源配置方式,以下是详细的实现方案,需要的朋友可以参考下... 目录一、基础多数据源配置1. 添加依赖2. 配置多个数据源3. 配置数据源Bean二、JPA多数据源配置1. 配置主数据

Spring 基于XML配置 bean管理 Bean-IOC的方法

《Spring基于XML配置bean管理Bean-IOC的方法》:本文主要介绍Spring基于XML配置bean管理Bean-IOC的方法,本文给大家介绍的非常详细,对大家的学习或工作具有一... 目录一. spring学习的核心内容二. 基于 XML 配置 bean1. 通过类型来获取 bean2. 通过

如何使用Nginx配置将80端口重定向到443端口

《如何使用Nginx配置将80端口重定向到443端口》这篇文章主要为大家详细介绍了如何将Nginx配置为将HTTP(80端口)请求重定向到HTTPS(443端口),文中的示例代码讲解详细,有需要的小伙... 目录1. 创建或编辑Nginx配置文件2. 配置HTTP重定向到HTTPS3. 配置HTTPS服务器