SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Politics : PRESIDENT GEORGE W. BUSH -- Ignore unavailable to you. Want to Upgrade?


To: MSI who wrote (308039)10/13/2002 9:58:51 PM
From: Thomas A Watson  Respond to of 769670
 
Linux machines don't have to be reset like the gates OS infected machines. And I'm working on a loop program as we speak. I also creating the new watman.com
My own administered on the internet linux machine. in the torch state.
63.238.143.213 It's currently being uploaded and I,m configuring
64.252.177.120 a linux machine next to me to be failover duplicate machine.

Has my dhcp ip changed.

#!/bin/tcsh
@ days = 0
@ hours = 0
@ minutes = 0
#from time_it
@ start_day = `date '+%d'`
@ start_hour = `date '+%k'`
@ start_minute = `date '+%M'`
@ last_minute = $start_minute
@ up_count = 0
@ up_minutes = 0
@ minute_count = 0
@ last_minute_count = 0
@ hours = 0
@ flip = 0
@ no_op = 0

@ count = 0
#@ LASTSTATE = 0
@ LASTSTATE = -1

set flagloc = /home/watson/flag/
set LAST_IP = "none"
echo "" >>is_diff_ip.log
echo "===============================================================0" >>is_diff_ip.log
echo "" >>is_diff_ip.log
echo New Starting of is_diff_ip >>is_diff_ip.log
echo "" >>is_diff_ip.log
echo START `date` >>is_diff_ip.log
echo "===============================================================0" >>is_diff_ip.log
echo "" >>is_diff_ip.log
echo "starting is connect "

while ( 1 )
@ CONNECTED = ` ps -a | grep CONNECT | grep pppd | wc |awk '{print $1}'`
@ CONNECTED1 = ` /sbin/ifconfig | grep "P-t-P" |awk '{print $1}'| wc |awk '{print $1}'`

wget --http-user="" --http-passwd=******** --dot-style=text 192.168.1.1 ; /home/watson/bin/html_parse-0.4.2/html_parse Status.htm -o Status ; cat Status |head -20 |tail -1 # extract just the 20th line.

if ( $CONNECTED ) then
# 1a
nslookup news.cris.com
set NOW_DATE = `date | awk '{print $1" "$2" "$3" "$4" "$6}' `
echo $NOW_DATE ", ppp connection up, IP="$LAST_IP", UP_COUNT="$up_count
if ( $LASTSTATE != 1 ) then
# 2a
# reset start timer
echo LASTSTATE = $LASTSTATE
@ start_year = `date '+%Y'`
@ start_month = `date '+%m'`
@ start_day = `date '+%d'`
@ start_hour = `date '+%k'`
@ start_minute = `date '+%M'`

@ last_minute = $start_minute
# zero elasped timer
@ up_count = 0
@ up_minutes = 0
@ minute_count = 0
@ last_minute_count = 0
@ hours = 0
@ flip = 0
set CURRENT_IP1 = `tail -30 /var/log/messages | grep local |awk '{print $9}' `
set CURRENT_IP = `/sbin/ifconfig | grep "P-t-P" | awk '{print $2'} | awk -F : '{print $2}'`
echo LAST IP is $LAST_IP
echo CURRENT IP is $CURRENT_IP
# @ VERIFY_IP = ` echo $CURRENT_IP | wc |awk '{print $1}' `

if ( $LAST_IP != $CURRENT_IP || $CURRENT_IP == "" ) then
# 3a
echo LAST IP is $LAST_IP
if ( $LAST_IP != "" ) then
#4a
echo $LAST_IP >$flagloc"/LAST_IP"
else
echo NULL CURRENT_IP ======================================
endif
#4a
echo CURRENT IP is $CURRENT_IP
if ( $CURRENT_IP != "" ) then
#4b
echo $CURRENT_IP >$flagloc$CURRENT_IP
endif
#4b
echo CURRENT CONNECT SPEED `what_baud`

echo CURRENT IP tail is $CURRENT_IP1 >current_connect
echo CURRENT IP ifconfig is $CURRENT_IP >>current_connect
echo "" >>current_connect
echo LAST IP is $LAST_IP >>current_connect
echo CURRENT CONNECT SPEED `what_baud` >>current_connect
echo "" >>current_connect
echo "" >>current_connect
echo `/sbin/ifconfig ppp0` >>current_connect

echo CURRENT IP is $CURRENT_IP >>is_diff_ip.log
echo LAST IP is $LAST_IP >>is_diff_ip.log
echo CURRENT CONNECT SPEED `what_baud` >>is_diff_ip.log

mail -s NEW_IP_ADDRESS watson@norden.com <current_connect
echo mailed current_connect to watson@norden.com on startup
set LAST_IP = $CURRENT_IP
endif #3a
endif #2a
if ( $LASTSTATE == -1 ) then
#2b
echo "" >>is_diff_ip.log
echo "===============================================================2" >>is_diff_ip.log
echo "" >>is_diff_ip.log
echo NEW start of is_diff_ip >>is_diff_ip.log
echo "" >>is_diff_ip.log
echo NEW START `date` >>is_diff_ip.log
echo "" >>is_diff_ip.log
echo "===============================================================2" >>is_diff_ip.log
echo "" >>is_diff_ip.log

echo NEW START `date` >>is_diff_ip.log
endif
#2b
if ( $LASTSTATE == 0 ) then
#2c
echo "" >>is_diff_ip.log
echo "===============================================================0" >>is_diff_ip.log
echo "" >>is_diff_ip.log
echo Reconnect is_diff_ip >>is_diff_ip.log
echo "" >>is_diff_ip.log
echo RECONNECT `date` >>is_diff_ip.log
echo "" >>is_diff_ip.log
echo "===============================================================0" >>is_diff_ip.log
echo "" >>is_diff_ip.log
endif
#2c
if ( $LASTSTATE == 1 ) then
#2d
@ up_count = $up_count + 1
endif
#2d

set CURRENT_DATE = `date`
@ current_day = `date '+%d'`
@ current_hour = `date '+%k'`
@ current_minute = `date '+%M'`

@ last_day = $current_day

# get current minute
@ LASTSTATE = 1
else
# 1a
#1
# we are not connected
echo ""
echo `date` "+++++++ NO CONNECTION +++++++"
echo ""
@ LASTSTATE = 0
# stopCON
echo killed connection
sleep 10
echo try redial of connection
# 929con
sleep 60
endif
# end of 1a

if ( $LASTSTATE == 1 ) then
#1b
sleep 600
else
sleep 20
endif
#1b

end