telemorgan
MIS
I have this script that someone on this board helped me wirte (thanks wallst32) but when its run on the server its is very taxing on the dual processors. It sends the processors into a high state of utilization. From 5%-10% to 70%-80% on avg. Can anyone help to rewrite this to make it more efficent or suggest some modifications that I can make to it.
The whole point of writing this in the first place was that the connection between our two mail servers were timing out occasionally. I wanted to get a feel for the amount of down time. Below is the scritpt, thanks.
********************************************
:begin
ping -n 1 xxx.xxx.xxx.xxx | find /i "reply"
if errorlevel 1 goto noreply
if errorlevel 0 goto reply
:reply
goto repeat
:noreply
ECHO DOWN @ %DATE% --- %TIME% >> log.txt
goto noreplyloop
:repeat
goto begin
:noreplyloop
ping -n 1 xxx.xxx.xxx.xxx | find /i "reply"
if errorlevel 1 goto noreplyloop
if errorlevel 0 goto replyloop
:replyloop
ECHO UP @ %DATE% --- %TIME% >> log.txt
ECHO " " >> log.txt
ECHO " " >> log.txt
goto repeat
:end
**********************************************
The whole point of writing this in the first place was that the connection between our two mail servers were timing out occasionally. I wanted to get a feel for the amount of down time. Below is the scritpt, thanks.
********************************************
:begin
ping -n 1 xxx.xxx.xxx.xxx | find /i "reply"
if errorlevel 1 goto noreply
if errorlevel 0 goto reply
:reply
goto repeat
:noreply
ECHO DOWN @ %DATE% --- %TIME% >> log.txt
goto noreplyloop
:repeat
goto begin
:noreplyloop
ping -n 1 xxx.xxx.xxx.xxx | find /i "reply"
if errorlevel 1 goto noreplyloop
if errorlevel 0 goto replyloop
:replyloop
ECHO UP @ %DATE% --- %TIME% >> log.txt
ECHO " " >> log.txt
ECHO " " >> log.txt
goto repeat
:end
**********************************************