I'm trying to get the desktop support officer to name them all after diseases.
Can you imagine: someone trying to connect via wireless to a fellow in a room full of people -"who's got syphilis? - I'm trying to get onto syphilis".
An organ or duct that removes or carries waste from the body. From the Latin munctrius, to blow one's nose. My excretory organ onto the web since 2005




#!/bin/bash
# script that iterates through a list of ip's in a file provided through stdin
# does a whois look up on each of them and then prints out all the ones with
# a particular ISP - in this case TPG
#
#
FILE="" # variable to hold the file name
if [ "$1" == "" ]; then # if there is no file as an arg
FILE="/dev/stdin" # then get it from stdin
else
FILE="$1"
if [ ! -f $FILE ]; then
echo "$FILE : does not exists"
exit 1
elif [ ! -r $FILE ]; then
echo "$FILE: can not be read"
exit 2
fi
fi
cat $FILE | while read LINE # pass the file line by line
do
ISP=`whois $LINE | grep netname | awk '{print $2}'`
if [ "$ISP" == "TPG-AU" ]; then
echo "$LINE"
sleep 2
fi
done
Apache Server Status for XXXXX.XXXXX.edu.au
Server Version: Apache/2.0.55 (Unix) DAV/2 mod_ssl/2.0.55 OpenSSL/0.9.6m mod_jk/1.2.6
Server Built: Jan 4 2006 17:25:42
Current Time: Wednesday, 10-Oct-2007 15:23:08 EST
Restart Time: Tuesday, 09-Oct-2007 17:24:28 EST
Parent Server Generation: 1
Server uptime: 21 hours 58 minutes 40 seconds
Total accesses: 1756415 - Total Traffic: 28.1 GB
CPU Usage: u1452.51 s1680.81 cu6053.03 cs0 - 11.6% CPU load
22.2 requests/sec - 372.4 kB/second - 16.8 kB/request
129 requests currently being processed, 41 idle workers
K_KCKKKWKWKKRWCKKKKKKKKKKKCK_KKRK_KKKKK_K._K.K.KKKKKWKCK.._KKKK_
.K_._._CKK__KK_K.KKK_KKWKKKK_KK..KK._.KK.K___KK.WK_KKCK_K_K_.KK_
.KKKKKK__WR_K.KK.K_KKWKKR.K._K__K..KKK_K_K_W.KK.K...............
....................................._..........................
....................._.................................K........
................................................................
..........................................K................_...K
......_.._..........................................K...........
................................................................
................K........K......................................
...........W....................................................
..............W.................................................
................................................................
.........._.................................................._..
.................................K..............................
........K...........................................K...........
Current Time: Monday, 08-Oct-2007 15:59:21 EST
Restart Time: Sunday, 09-Sep-2007 14:19:25 EST
Parent Server Generation: 29
Server uptime: 29 days 1 hour 39 minutes 56 seconds
Total accesses: 38331840 - Total Traffic: 326.1 GB
CPU Usage: u749.13 s842.35 cu2791.89 cs0 - .175% CPU load
15.3 requests/sec - 136.1 kB/second - 8.9 kB/request
1024 requests currently being processed, 0 idle workers
GRRRGRRRRRRRRRRGRRRRRRRRRRRRRRRRRKRRRRRRRRRRRRKRRKRRRRGRRRRRRRRR
RRRWGRGRRRRRRRRRRRRRRRRKRRRRRRRRRRRRGRKRRRRRRRRRRRGRRRRRRRRRWRRR
RRRGRRRRRGRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRGRGRKRRRCRRRKKRRRRRR
RRRRRRRRRRRRRRRRRRRRRRRRRRRRGRRRRRRRRRRRRRRRRRRKRRRRRRRRRRKRRRRR
RRRRRRRRRRRRRRRRRRRKKRRRRRRKRRRRKRRRRRRRRRRRRRRKRRRRRRRGRRRKRRRR
RRGRRRWRRGRRRRRRRRRKRGRRRRRRGGRRRRRRRRRRRRRRRRKRRRRRRRRRRKRRRRKR
RRKRRRRRRRRRRRRRRRRRRRRRRRRGRRRRRRRRRRRRRRRKRRRRKRRRRRRRRKRRRRRR
KRRRRRRRRRRKRRRRRRRRRRRRRRRRKRKRKRRRRRRRRRRRRRRRKKRRCRRRRRRRRKRW
RRKRCRKRRKRRRRRRRRRRRRRWRKKRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
RRRKRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRKRRRRRRRRRRRRRRRCRR
RRRKRRRKRRRRRRRRWRRRRRKRRRRRRRRRRRRRRRRRRRRRRWRRRRRRRRRRRRRRRRRR
KRRRRRRGRRRKKRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRKKRRRRRRRRRRRR
RRRRRRRRRRRRRRKRKRRRRKRRRRRRRRRRRRRRRRRRRRRRRRRRRRRWRKRRRRRRRRRR
KRRRRRKRRRKRRKRRRKRKRRRKRRRRRKRKRKRRRKRRRRRRRRRRRRRRRRRRRRRRRRRR
RRRRKKRRRRRRRRRRRRRRRRKRRRRKRRRRRRRRRRRRKKRRRRRRGRRRRRRRRRRRKRRK
KRKRRKRKRRRRRRRKRKRRRRKWKRRRRRRRKRRKRKRKRKRRRCRRRCKRCKRRRKRKRKKC
#!/bin/bash
# Clear the screen in preparation for script output
clear
echo "--------------------------------------------------"
dir=`pwd`
startdir=$dir
if [ -d "tmp" ] ; then
rm -r tmp
fi
if [ -d "~/Desktop/out" ] ; then
rm -r ~/Desktop/out
fi
mkdir tmp
mkdir ~/Desktop/out
for file in $*; do
(
cd tmp
tar zxvf ../$file
(
cd opt/servstat
gunzip *.gz
sudo chown stephen\: *
mv *.txt ~/Desktop/out
head -n17 /home/stephen/Desktop/out/*.txt | grep -i Current >> ~/Desktop/outputFile
rm ~/Desktop/out/*.txt
)
)
done
cd $startdir
exit 0
<dt>Current Time: Wednesday, 10-Oct-2007 08:35:00 EST</dt>
<dt>69 requests currently being processed, 36 idle workers</dt>
<dt>Current Time: Wednesday, 10-Oct-2007 08:40:00 EST</dt>
<dt>103 requests currently being processed, 21 idle workers</dt>
<dt>Current Time: Wednesday, 10-Oct-2007 08:45:00 EST</dt>
<dt>78 requests currently being processed, 46 idle workers</dt>
<dt>Current Time: Wednesday, 10-Oct-2007 08:50:00 EST</dt>
<dt>80 requests currently being processed, 44 idle workers</dt>
<dt>Current Time: Wednesday, 10-Oct-2007 08:55:01 EST</dt>
<dt>111 requests currently being processed, 52 idle workers</dt>
# Gnuplot script file for plotting data from server_status
# This file is called aug.plot
unset log # remove any previous log-scaling
unset key # remove any previous key
unset label # remove any previous labels
unset title # remove any previous title
set xtic auto # set xtics automatically
set ytic auto # set ytics automatically
set yrange [0:1028] # Change the y-axis range
set xtics rotate # rotate the x-axis lables so they are verticle
set terminal jpeg size 1280, 780 # make a pretty picture for the output
set output 'aug.jpg' # name of the output file
set xdata time # set x axis to be time scale
set timefmt "%d-%b-%Y-%H:%M:%S" # set the input format of the time
set format x "%d/%m" # set the output format of the time label
set grid # show a grid in the picture
set title "Number of user connections" # the title of the output plot
set xlabel "Date/Time" # label the x axis
plot "aug.tab" using 1:2 # generate the plot using column 1 for x and 2 for y





--------------------------------
#!/usr/bin/perl
#-----
# Perl code to output io files as csv
# usage: $ perl io2csv.pl io.out.* > d80.csv
#
# This little script will turn unix i.o. logs into a csv script
# from whence you can graph them
#-----
print "r/s,w/s,kr/s,kw/s,wait,actv,wsvc_t,asvc_t,%w,%b,device,dateTime\n";
# go through input one line at a time
while(<>)
{
# put input into a variable
my($line) = $_;
# remove trailing and leading spaces
chomp($line);
# regexp to get the time
if ($line =~ /EST/)
{
# get the time part of the date time into a variable (split on white
# space and get 4th element)
@dateTime = split;
$dateTime = $dateTime[3];
}
# look for data lines that are related to the mount
if ($line =~ /d80/)
{
# make white space separated data into a comma separated string
$fields = join(",",split);
# write output plus date
print "$fields,$dateTime\n";
}
}
"I've had a look at the leave forms and apart from sighing heavily, the alternative would appear to be banning you from ever filling in another one.
However that would just be encouraging you, so can you let me know when you'll be free and I'll come up and visit you in the hope of getting this sorted out nicely?
Many thanks
Except where otherwise noted, this site is
licensed under a Creative Commons Attribution 2.5 License