Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

network problem

Status
Not open for further replies.

vti

Technical User
Feb 26, 2001
189
TR
Hi all
I got a Tru64Unix test box ,it works normal but sometimes there is no connection between it's default router and the another router .it can ping everywhere else one of router interface and when i restart the Unix box everything back normal again.
When this problem happened i have tried to route flush and rcinet restart but nothing happens.
Any clue?
 
Hi

Try running this script as it will update and show any collisions on you NIC card.

#!/bin/sh

INTERFACE=lan0 # NIC to monitor
set -u


typeset -i OLD_PACKETS_IN=0
typeset -i OLD_PACKETS_OUT=0
typeset -i OLD_PACKETS_IN_ERR=0
typeset -i OLD_PACKETS_OUT_ERR=0
typeset -i OLD_COLLISSIONS=0
typeset -i IN_BOUND_ERRORS=0
typeset -i NEW_IN_BOUND_ERRORS=0
typeset -i OUT_BOUND_DISCARDS=0
typeset -i NEW_OUT_BOUND_DISCARDS=0


echo " This first entry in this file is the statistics since last boot:"
echo " the other entries are statistics for the previous minute:"


while [ 1=1 ] # Run Foreever
do


netstat -i | grep "$INTERFACE" | read NAME MTU NETWORK ADDRESS IPKTS IERRS OPKTS OERRS COLL


NEW_PACKETS_IN=$(( $IPKTS - $OLD_PACKETS_IN ))
OLD_PACKETS_IN=$IPKTS

NEW_PACKETS_OUT=$(( $OPKTS - $OLD_PACKETS_OUT ))
OLD_PACKETS_OUT=$OPKTS


NEW_PACKETS_OUT_ERR=$(( $OERRS - $OLD_PACKETS_OUT_ERR ))
OLD_PACKETS_OUT_ERR=$OERRS

NEW_COLLISSIONS=$(( $COLL - $OLD_COLLISSIONS ))
OLD_COLLISSIONS=$COLL

# NEW_IN_BOUND_ERRORS=$(( $4 - $NEW_IN_BOUND_ERRORS ))
# OLD_BOUND_ERRORS=$4
#
# NEW_IN_BOUND_DISCARDS=$(( $3 - $NEW_IN_BOUND_DISCARDS ))
# OUR_BOUND_DISCARDS=$3



date

echo Packets in: $NEW_PACKETS_IN
#echo Packet in Errors: $NEW_PACKETS_IN_ERR
echo Packet out: $NEW_PACKETS_OUT
echo Packetout Errors: $NEW_PACKETS_OUT_ERR
echo Collisions: $NEW_COLLISSIONS
echo IN Bound Errors: $NEW_IN_BOUND_ERRORS
echo OUT Bound DISCARDS: $NEW_OUT_BOUND_DISCARDS
echo
sleep 5

typeset -i HOUR=$(date +%H)
if [ $HOUR -eq 18 ]
then
exit
fi
done
#### END OF SCRIPT

Good Luck

Simon
Simon Peter Wickham
Email: s.wickham@zoom.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top