OS Watcher (OSW) 安装、启动及开机自启动配置
2021/12/21 6:21:14
本文主要是介绍OS Watcher (OSW) 安装、启动及开机自启动配置,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
OS Watcher (OSW) 安装、启动及开机自启动配置
2020-05-15watch
根据操作系统版本分为两种,Linux 6之前、Linux 6及之后。
一、 Linux 6之前的OSW
1. 下载地址
文档 ID 301137.1(目前已不再提供下载)。可以网上搜,或者从其他安装了osw的服务器打包oswbb目录,到目标服务器解压即可。
2. 安装
解压tar包即可,无需额外操作。
1 | tar -xvf oswbb.tar |
3. 启动、检查及关闭
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
#以下需先cd至解压目录 #后台启动(不加参数默认每30秒收集一次,数据保留48小时) nohup ./startOSWbb.sh & #带参数启动(后台启动,每30秒收集一次,数据保留168小时(7天)) nohup ./startOSWbb.sh 30 168 & #带参数启动(前台启动) ./startOSWbb.sh 60 10 #指定归档目录 export OSWBB_ARCHIVE_DEST=/usr/app/archive ./startOSWbb 30 48 None /usr/app/archive #是否启动osw ps -ef |grep -i osw #关闭 ./stopOSWbb.sh |
4. 配置开机自启动
Linux 6之前的osw不带开机自启动功能,需要自己写脚本并配置,方法如下:
编写osw启动脚本
1 2 3 4 5 6 7 |
vi /home/oracle/oswbb/auto_start_osw.sh #内容如下 cd /home/oracle/oswbb nohup ./startOSWbb.sh 30 168 & # 加执行权限 chmod +x /home/oracle/oswbb/auto_start_osw.sh |
设置服务器启动时执行该脚本
1 2 |
crontab -e @reboot /home/oracle/oswbb/auto_start_osw.sh |
二、 Linux 6及之后的OSW
1. 下载地址
文档 ID 301137.1,Linux 6开始报错了rpm包,有el6、el7版本
2. 安装
1 2 3 4 5 |
rpm -ivh oswatcher-7.3.3-2.el6.noarch.rpm Preparing... ################################# [100%] Updating / installing... 1:oswatcher-7.3.3-2.el6 ################################# [100%] |
3. 启动、检查及关闭
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
#启动 /etc/init.d/oswatcher start Starting oswatcher (via systemctl): [ OK ] #检查 ps -ef |grep -i osw root 590 1 0 03:13 ? 00:00:00 /bin/bash /sbin/OSWatcher -i 30 -m 48 -l /var/log/oswatcher/log /var/log/oswatcher root 946 31065 0 03:14 pts/0 00:00:00 grep --color=auto -i osw #目录结构 [root@localhost ~]# cd /var/log/oswatcher/archive/ [root@localhost archive]# ls oswifconfig oswmeminfo oswnetstat oswps oswtop oswiostat oswmpstat oswprvtnet oswslabinfo oswvmstat |
4. 配置开机自启动
Linux 6开始osw自带开机自启动功能
查看是否开机自启动
1 2 3 |
chkconfig --list oswatcher ... oswatcher 0:off 1:off 2:on 3:on 4:on 5:on 6:off |
设置开机自启动
1 | chkconfig oswatcher on |
这篇关于OS Watcher (OSW) 安装、启动及开机自启动配置的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-07-05feign默认connecttimeout和readtimeout是多少-icode9专业技术文章分享
- 2024-07-05idea控制台,日志太多,导致部分想看得日志被刷走 搜不到-icode9专业技术文章分享
- 2024-07-05The server selected protocol version Tls10 is not accepted by client preferences [TLs12]-icode9专业技术文章分享
- 2024-07-05怎么清理项目缓存-icode9专业技术文章分享
- 2024-07-04安装 Eyoucms详细图文教程-icode9专业技术文章分享
- 2024-07-04ueditor 复制文章时,图片的链接是一个下载图片地址,该如何处理?-icode9专业技术文章分享
- 2024-07-04怎样判断host有没有对wordpress有缓存呢-icode9专业技术文章分享
- 2024-07-04具有编译功能的系统make后,无法ssh连接-icode9专业技术文章分享
- 2024-07-04make后如何升级ssh-icode9专业技术文章分享
- 2024-07-03微信支付提示下单账户与支付账户不一致-icode9专业技术文章分享