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

相关文章

Win11安装PostgreSQL数据库的两种方式详细步骤

《Win11安装PostgreSQL数据库的两种方式详细步骤》PostgreSQL是备受业界青睐的关系型数据库,尤其是在地理空间和移动领域,:本文主要介绍Win11安装PostgreSQL数据库的... 目录一、exe文件安装 (推荐)下载安装包1. 选择操作系统2. 跳转到EDB(PostgreSQL 的

Linux系统中卸载与安装JDK的详细教程

《Linux系统中卸载与安装JDK的详细教程》本文详细介绍了如何在Linux系统中通过Xshell和Xftp工具连接与传输文件,然后进行JDK的安装与卸载,安装步骤包括连接Linux、传输JDK安装包... 目录1、卸载1.1 linux删除自带的JDK1.2 Linux上卸载自己安装的JDK2、安装2.1

SpringCloud动态配置注解@RefreshScope与@Component的深度解析

《SpringCloud动态配置注解@RefreshScope与@Component的深度解析》在现代微服务架构中,动态配置管理是一个关键需求,本文将为大家介绍SpringCloud中相关的注解@Re... 目录引言1. @RefreshScope 的作用与原理1.1 什么是 @RefreshScope1.

Linux卸载自带jdk并安装新jdk版本的图文教程

《Linux卸载自带jdk并安装新jdk版本的图文教程》在Linux系统中,有时需要卸载预装的OpenJDK并安装特定版本的JDK,例如JDK1.8,所以本文给大家详细介绍了Linux卸载自带jdk并... 目录Ⅰ、卸载自带jdkⅡ、安装新版jdkⅠ、卸载自带jdk1、输入命令查看旧jdkrpm -qa

SpringBoot日志配置SLF4J和Logback的方法实现

《SpringBoot日志配置SLF4J和Logback的方法实现》日志记录是不可或缺的一部分,本文主要介绍了SpringBoot日志配置SLF4J和Logback的方法实现,文中通过示例代码介绍的非... 目录一、前言二、案例一:初识日志三、案例二:使用Lombok输出日志四、案例三:配置Logback一

springboot security之前后端分离配置方式

《springbootsecurity之前后端分离配置方式》:本文主要介绍springbootsecurity之前后端分离配置方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的... 目录前言自定义配置认证失败自定义处理登录相关接口匿名访问前置文章总结前言spring boot secu

一文详解SpringBoot响应压缩功能的配置与优化

《一文详解SpringBoot响应压缩功能的配置与优化》SpringBoot的响应压缩功能基于智能协商机制,需同时满足很多条件,本文主要为大家详细介绍了SpringBoot响应压缩功能的配置与优化,需... 目录一、核心工作机制1.1 自动协商触发条件1.2 压缩处理流程二、配置方案详解2.1 基础YAML

springboot简单集成Security配置的教程

《springboot简单集成Security配置的教程》:本文主要介绍springboot简单集成Security配置的教程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,... 目录集成Security安全框架引入依赖编写配置类WebSecurityConfig(自定义资源权限规则

SpringBoot中封装Cors自动配置方式

《SpringBoot中封装Cors自动配置方式》:本文主要介绍SpringBoot中封装Cors自动配置方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录SpringBoot封装Cors自动配置背景实现步骤1. 创建 GlobalCorsProperties

Spring Boot结成MyBatis-Plus最全配置指南

《SpringBoot结成MyBatis-Plus最全配置指南》本文主要介绍了SpringBoot结成MyBatis-Plus最全配置指南,包括依赖引入、配置数据源、Mapper扫描、基本CRUD操... 目录前言详细操作一.创建项目并引入相关依赖二.配置数据源信息三.编写相关代码查zsRArly询数据库数