Welcome to IWETHEY!
Post #45,994
7/18/02 4:19:15 PM
|
Get out my chainsaw and bust a script
my head hurts #!/bin/ksh # you ever have a heavy transaction log writing app that hangs without any #indication of failure? # the only indication is that the logs arnt being written to but the PIDS are still #alive ################## time=`date +%T | awk -F: '{print $1$2}'` export time date=`date +%Y%m%d` export date while read LINE do # read the contents of the customerfile.txt which has a list of all active threads # and we read each thread number one at a time. We check to see if a logfile has #started for the day ################################ if test -f /logs/$LINE.log.$date.txt ################################## # we then check the time stamp against the system time and if there is a 15 minute #lag time assume there is a problem ################################ then foo=`ls -l /logs/$LINE.log.$date.txt | awk '{print $8}' | awk -F: '{print $1$2}'` export foo foobar=`echo $time-$foo | bc` export foobar fi if [ $foobar -gt 15 ] then /scripts/restart.ksh $LINE else exit 1 fi done <./custfile.txt ##################### thanks, bill who forgot years ago which tics go where in awk
."Once, in the wilds of Afghanistan, I had to subsist on food and water for several weeks." W.C. Fields
|
Get out my chainsaw and bust a script
- (
boxley)
- July 18, 2002, 04:19:15 PM EDT
Remember, people in 1900 didn't know what an atom was. They didn't know its structure.
They also didn't know what a radio was, or an airport, or a movie, or a television, or a computer, or a cell phone, or a jet, an antibiotic, a rocket, a satellite, an MRI, ICU, IUD, IBM, IRA, ERA, EEG, EPA, IRS, DOD, PCP, HTML, internet. interferon, instant replay, remote sensing, remote control, speed dialing, gene therapy, gene splicing, genes, spot welding, heat-seeking, bipolar, prozac, leotards, lap dancing, email, tape recorder, CDs, airbags, plastic explosive, plastic, robots, cars, liposuction, transduction, superconduction, dish antennas, step aerobics, smoothies, twelve-step, ultrasound, nylon, rayon, teflon, fiber optics, carpal tunnel, laser surgery, laparoscopy, corneal transplant, kidney transplant, AIDS... None of this would have meant anything to a person in the year 1900. They wouldn't know what you are talking about.
40 ms