監視模組啟動的SHELL

2021-04-26 19:42:36 字數 612 閱讀 3730

以前是用程序來做的,現在用shell來做,目的:把引導檔案離要啟動的模組實時監測已啟動的程序裡有沒有

如果沒有,則啟動

while sleep 10

dogrep /& /prog/init/run.sh|awk -f"#./" ''|grep /&|awk -f"&" ''>runmodule

aa=`grep -c ./ runmodule`

x=1while [ "$x" -le "$aa" ]

docmpmodule=`sed -n $x"p" runmodule`

sed -n $x"p" runmodule>proc_wnc

grep wnc proc_wnc

if [ $? -ne 0 ];then

ps|grep $cmpmodule |grep -v grep>shtmp

else

bb=`awk -f" " '' proc_wnc`

ps |grep ./wnc/ $bb|grep -v grep>shtmp

fiif [ $? -ne 0 ];then

$cmpmodule&

fix=$(($x+1))

done

done

MySQL MySQL監視器無法啟動的可能情況

mysql監視器無法啟動,指的是cmd輸入mysql u username ppassword但不能登入並顯示welcome.的資訊提示,新手可能不知道問題出在 本文列舉幾種新手可能疏忽的點 使用者名稱或密碼錄入錯誤 這沒啥好說的,使用者名稱或密碼打錯了唄 要是真記不住了就破解一下重新改密碼。沒有設...

監視磁碟使用情況Shell

monitordisk.sh如下 bin bash updated 2008 03 03 pm by leif liangliwen 163.com email usr local bin email bin df h tmp df.txt use df h grep o 0 9 grep o 0 ...

啟動哪種shell

how does emacs know which shell to start?first,it looks at the variable shell file name then it looks for a unix environment variable named eshell fin...