Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 154206 Details for
Bug 227420
sky2 eth0: tx timeout
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
A shell script to monitor for and attempt to fix a sky2 driver wedge
sky2mon (text/plain), 2.09 KB, created by
Douglas Needham
on 2007-05-05 15:34:21 UTC
(
hide
)
Description:
A shell script to monitor for and attempt to fix a sky2 driver wedge
Filename:
MIME Type:
Creator:
Douglas Needham
Created:
2007-05-05 15:34:21 UTC
Size:
2.09 KB
patch
obsolete
>#!/bin/ksh ># ># Copyright (c) 2007, Douglas Needham (ka8zrt.com) ># All rights reserved. ># ># This file is freely redistributable under the terms of the NetBSD ># Foundation Copyright/License, which can be found at ># ># http://www.netbsd.org/Goals/redistribution ># >set -x >echo $$ > /var/run/sky2mon.pid > ># ># Local variables ># >INTERVAL=60 >PROBES=(192.168.0.254 192.168.0.1 192.168.0.2) > >fix_sky2 () >{ > # > # Compute elapsed time. > # > now=`date +%s` > elapsed=$((now-last_time)) > > # > # Log the restart > # > logger -p daemon.crit -t sky2mon -is "sky2 driver hang detected (${loop_count} iterations, ${elapsed} seconds): reloading driver and restarting network" > > # > # Stop the network > # > /etc/init.d/network stop > > # > # Show the module state > # > lsmod | grep sky2 > > # > # Remove the sky2 driver > # > rmmod sky2 > sleep 1 > > # > # Show the module state > # > lsmod | grep sky2 > > # > # Load the driver > # > modprobe sky2 > lsmod | grep sky2 > > # > # Restart the network > # > /etc/init.d/network restart > > # > # Reset last_time and loop_count > # > loop_count=0 > last_time=`date +%s` >} > ># ># Initialize loop counter and time ># >loop_count=0 >last_time=`date +%s` > ># ># Loop ># >while [ 1 ] >do > # > # Make sure that the local interface is up > # > ping -n -q -c 3 127.0.0.1 > if [ $? -ne 0 ] > then > printf "Local network interface is down... sleeping" >&2 > sleep 300 > continue > fi > > # > # Start probing known hosts > # > down=0 > idx=0 > while [ ${idx} -lt ${#PROBES[*]} ] > do > > # > # Probe the host > # > ping -n -q -c 3 ${PROBES[$((idx++))]} > > # > # Did it respond? > # > if [ $? -eq 0 ] > then > > # > # It did... our network is working... no need to continue. > # > down=0 > break; > fi > down=$((down+1)) > done > > # > # Were probed hosts unaccessable? > # > if [ ${down} -ne 0 ] > then > fix_sky2 > fi > > # > # Increment our count and sleep for our interval > # > echo "Finished with iteration $((++loop_count))...sleeping" > sleep ${INTERVAL} >done
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 227420
: 154206 |
154207