Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

Commit

Permalink
a few more scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ Asghar committed Jul 6, 2012
1 parent cc5cf57 commit 482901e
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 38 deletions.
23 changes: 0 additions & 23 deletions apache.txt

This file was deleted.

6 changes: 6 additions & 0 deletions brotips.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
while [ 1 ]
do
lynx --dump www.brotips.com/random | awk -F "brotip #" '{print $2}' | cut -d":" -f2 | awk -F '%0A%0Aht' '{print $1}' | sed -e's/%\([0-9A-F][0-9A-F]\)/\\\\\x\1/g' | xargs -0 echo -e | awk '/./'
sleep 1m
done
2 changes: 0 additions & 2 deletions foo_out.txt

This file was deleted.

6 changes: 6 additions & 0 deletions kernel_check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

for i in `cat machines.txt`
do
ssh $i "uname -a"
done
5 changes: 5 additions & 0 deletions lazy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
for i in `cat prod_machines.txt` ; do scp linux_audit.sh $i://tmp/ ; done
for i in `cat prod_machines.txt` ; do ssh $i /tmp/linux_audit.sh ; done
./pull_linux_audit.sh
ls -ltra *.txt
15 changes: 15 additions & 0 deletions linux_audit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

DATE=`date +%F`
HOSTNAME=`hostname -s`

uname -a > out1.txt
echo "" > out2.txt
uptime > out3.txt
echo "" > out4.txt
rpm -qa | sort -u > out5.txt
echo "" > out6.txt
df -h > out7.txt
cat out* | tee $HOSTNAME.$DATE.txt
rm out*.txt
cp $HOSTNAME.$DATE.txt /tmp/
6 changes: 6 additions & 0 deletions load_check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

for i in `cat machines.txt`
do
ssh $i uptime
done
9 changes: 6 additions & 3 deletions pull_bb_logs.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/bin/bash

USER=asgharje
DATE=`date +%F`
TOMCAT_DATE=`date +%Y%m%d`
BB_DATE=`date +%Y-%m-%d`
DATE=2012-07-01
#DATE=`date +%F`
#TOMCAT_DATE=`date +%Y%m%d`
TOMCAT_DATE=20120701
#BB_DATE=`date +%Y-%m-%d`
BB_DATE=2012-07-01

#
# Create the directory
Expand Down
7 changes: 7 additions & 0 deletions pull_linux_audit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

for i in `cat prod_machines.txt`
do
scp $i://tmp/*.txt ./
ssh $i rm /tmp/*.txt
done
10 changes: 0 additions & 10 deletions writelines_outfile.txt

This file was deleted.

0 comments on commit 482901e

Please sign in to comment.