This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALT_DB_USER=occ_bf | |
ALT_DB_PASSWD=occ_bf | |
ALT_DB_SERVER=10.161.7.56 | |
ALT_DB_PORT=20300 | |
ORA_DB_USER=occdev | |
ORA_DB_PASSWD=occdev | |
ORA_DB_SERVER=occdb | |
DATA_PATH=/occlog/TianY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#v_process填入监视的程序命令 | |
v_process='framework -p UserStateChange -m UserStateChange1' | |
#打印表头 | |
printf "%-10s %-15s %-6s %-10s\n" PID TIME CPU MEMORY | |
#每个10秒循环打印进程的进程ID,时间,CPU值和内存值 | |
while [ 1 ] | |
do | |
echo $v_process|while read v_1 v_2 v_3 v_4 v_5 | |
do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#监视Apache服务器 | |
#查看Apache是否启动,如果没有,则启动。这里不是简简单单的使用进程查询和端口查询 | |
#而是使用nmap命令来扫描tcp端口,并找到Apache | |
port=$(nmap -sT 127.0.0.1|grep tcp|grep http|awk '{print $2}') | |
#注意判断条件中,变量$port的引号是必须的 | |
if [ "$port" == "open" ];then | |
echo -e "Apache is Running!" | |
else | |
sudo service httpd start $>/dev/null |
NewerOlder