This repository has been archived by the owner on Jul 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
JJ Asghar
committed
Jun 13, 2012
0 parents
commit 081c793
Showing
57 changed files
with
526 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
f166d7c804e3110fa6046f672685ae28ba8c1c1b 3 | ||
f166d7c804e3110fa6046f672685ae28ba8c1c1b default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
2 3d601adc63d8adf0a0c32ab305df5f1b91b81b90 | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
Added catalina_log_pull | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
revlogv1 | ||
fncache | ||
store | ||
dotencode |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
data/pysysinfo_fuction.pyc.i | ||
data/writelines_outfile.txt.i | ||
data/pysysinfo.py.i | ||
data/py_wrapper_around_xmlconversion.py.i | ||
data/pyls.py.i | ||
data/new_pysysinfo.py.i | ||
data/blackboard_convert_for_course_exports.sh.i | ||
data/pysysinfo.pyc.i | ||
data/pull_bb_logs.sh.i | ||
data/py_sys_sdtin_readline.py.i | ||
data/pysysinfo_fuction.py.i | ||
data/py_kill_all_by_user.py.i | ||
data/catalina_bb_logs_pull.sh.i | ||
data/foo_out.txt.i | ||
data/apache.txt.i | ||
data/redirect1.py.i | ||
data/ssh-copy-id.sh.i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 6a1af0b7d75c2f1ea745752441b92b9d55b7f626 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 6a1af0b7d75c2f1ea745752441b92b9d55b7f626 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
3 | ||
commit |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
delete from EUD_ITEM where START_DATE < (sysdate - 400) and IMPORTANT_IND = 'N'; | ||
commit; | ||
delete from EUD_ITEM where START_DATE < (sysdate - 350) and IMPORTANT_IND = 'N'; | ||
commit; | ||
delete from EUD_ITEM where START_DATE < (sysdate - 300) and IMPORTANT_IND = 'N'; | ||
commit; | ||
delete from EUD_ITEM where START_DATE < (sysdate - 290) and IMPORTANT_IND = 'N'; | ||
commit; | ||
delete from EUD_ITEM where START_DATE < (sysdate - 280) and IMPORTANT_IND = 'N'; | ||
commit; | ||
delete from EUD_ITEM where START_DATE < (sysdate - 270) and IMPORTANT_IND = 'N'; | ||
commit; | ||
delete from EUD_ITEM where START_DATE < (sysdate - 260) and IMPORTANT_IND = 'N'; | ||
commit; | ||
delete from EUD_ITEM where START_DATE < (sysdate - 250) and IMPORTANT_IND = 'N'; | ||
commit; | ||
delete from EUD_ITEM where START_DATE < (sysdate - 240) and IMPORTANT_IND = 'N'; | ||
commit; | ||
delete from EUD_ITEM where START_DATE < (sysdate - 230) and IMPORTANT_IND = 'N'; | ||
commit; | ||
delete from EUD_ITEM where START_DATE < (sysdate - 220) and IMPORTANT_IND = 'N'; | ||
commit; | ||
delete from EUD_ITEM where START_DATE < (sysdate - 210) and IMPORTANT_IND = 'N'; | ||
commit; | ||
delete from EUD_ITEM where START_DATE < (sysdate - 200) and IMPORTANT_IND = 'N'; | ||
commit; | ||
delete from EUD_ITEM where START_DATE < (sysdate - 190) and IMPORTANT_IND = 'N'; | ||
commit; | ||
delete from EUD_ITEM where START_DATE < (sysdate - 180) and IMPORTANT_IND = 'N'; | ||
commit; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
NameVirtualHost 127.0.0.1:80 | ||
<VirtualHost localhost:80> | ||
DocumentRoot /var/www/ | ||
<Directory /> | ||
Options FollowSymLinks | ||
AllowOverride None | ||
</Directory> | ||
ErrorLog /var/log/apache2/error.log | ||
LogLevel warn | ||
CustomLog /var/log/apache2/access.log combined | ||
ServerSignature On | ||
</VirtualHost> | ||
<VirtualHost local2:80> | ||
DocumentRoot /var/www2/ | ||
<Directory /> | ||
Options FollowSymLinks | ||
AllowOverride None | ||
</Directory> | ||
ErrorLog /var/log/apache2/error2.log | ||
LogLevel warn | ||
CustomLog /var/log/apache2/access2.log combined | ||
ServerSignature On | ||
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
# this was created 4/13/12 to convert files from spider.its.utexas.edu:///mnt/archives/course_exports/2009_spring/remove/ to the output | ||
# <course_id>|<batch_uid>|<course_name>|2009_<semester>_classes | ||
# i pulled the export.csv from courses_main table and ran this awk, i had to create a sed to get rid of all of the " "s | ||
|
||
# course_id = $10 | ||
# batch_uid = $14 | ||
# course_name = $9 | ||
|
||
# select course_id || '|' || batch_uid || '|' || course_name || '|2009_spring_classes' from course_main where course_id like '%2009_spring%' | ||
|
||
# cat 2009_spring_classes.out | sed 's/"//g' >> 2009_spring_classes_sed.out | ||
|
||
|
||
for i in `cat 2009_summer_exports.bbexport` | ||
do | ||
COURSE_ID=`echo $i | awk -F , '{print $1}'` | ||
grep $COURSE_ID export.csv | awk -F , '{print $10 "|" $14 "|" $9 "| 2009_summer_classes" }' >> 2009_summer_classes.out | ||
done | ||
|
||
# added after the script had been completed | ||
cat 2009_summer_classes.out | sed 's/"//g' >> 2009_summer_classes_sed.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
USER=asgharje | ||
DATE=`date +%F` | ||
TOMCAT_DATE=`date +%Y%m%d` | ||
BB_DATE=`date +%Y-%m-%d` | ||
|
||
# | ||
# Create the directory | ||
# | ||
mkdir $DATE | ||
cd $DATE | ||
|
||
# | ||
# Pull the files down | ||
# | ||
for i in "spider.its.utexas.edu" "maeve.its.utexas.edu" "nancy.its.utexas.edu" "tristran.its.utexas.edu" "rosie.its.utexas.edu" | ||
do | ||
echo "" | ||
echo "Now pulling from $i" | ||
echo "" | ||
scp -C $USER@$i:/usr/local/blackboard/logs/tomcat/catalina-log.txt $DATE.$i.catalina-log.txt | ||
echo "" | ||
echo "Done with $i" | ||
echo "" | ||
done | ||
|
||
# | ||
# gzip the files | ||
# | ||
gzip * | ||
cd .. | ||
|
||
# | ||
# tar up the directory into a tarball | ||
# | ||
tar zcf catalina_log_pull.$DATE.tar.gz $DATE/ | ||
|
||
# | ||
# Delete the $DATE/ directory | ||
# | ||
rm -rf $DATE/ | ||
|
||
# Complete | ||
echo "Your file name is catalina_log_pull.$DATE.tar.gz" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/local/bin/bash | ||
|
||
VDI_DIR='/home/asgharje/vdi/' | ||
UBUNTU_GOLD_VDI="ubuntu_11_10_gold.vdi" | ||
REDHAT_GOLD_VDI="centos_6_2_gold.vdi" | ||
HOST_NIC="em0" | ||
|
||
|
||
echo "Name of VM" | ||
read name_of_vm | ||
echo "OS type (Ubuntu, RedHat_64)" | ||
read ostype | ||
cd $VDI_DIR | ||
if [ "$ostype" = "Ubuntu" ]; then | ||
echo "Cloning Ubuntu vdi" | ||
VBoxManage clonehd $UBUNTU_GOLD_VDI ubuntu_11_10_$name_of_vm.vdi | ||
elif [ "$ostype" = "RedHat_64" ]; then | ||
echo "Cloning RedHat vdi" | ||
VBoxManage clonehd $REDHAT_GOLD_VDI centos_6_2_$name_of_vm.vdi | ||
else | ||
clear; | ||
echo "something broke" | ||
fi | ||
VBoxManage createvm --name "$name_of_vm" --ostype "$ostype" -register | ||
echo "Adding 4gigs of memory" | ||
VBoxManage modifyvm "$name_of_vm" --memory 4096 --boot1 dvd | ||
echo "Adding the storage ide controller" | ||
VBoxManage storagectl "$name_of_vm" --name "IDE Controller" --add ide | ||
echo "Attaching vdi to storage controller" | ||
if [ "$ostype" = "Ubuntu" ]; then | ||
VBoxManage storageattach "$name_of_vm" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium ubuntu_11_10_$name_of_vm.vdi | ||
fi | ||
if [ "$ostype" = "RedHat_64" ]; then | ||
VBoxManage storageattach "$name_of_vm" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium centos_6_2_$name_of_vm.vdi | ||
fi | ||
echo "Adding NIC and making it a bridge adapter" | ||
VBoxManage modifyvm "$name_of_vm" --nic1 bridged --nictype1 82543GC --bridgeadapter1 $HOST_NIC | ||
clear | ||
echo "" | ||
echo "" | ||
echo "" | ||
echo "Starting it in headless mode have fun!" | ||
echo "" | ||
echo "" | ||
echo "Check the NIC, it could change and you'll have to edit it via the console, hence the VNC connection here in a sec" | ||
echo "" | ||
echo "" | ||
VBoxHeadless -s "$name_of_vm" -n | ||
cd $HOME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This is something becasue i want something | ||
BLah! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
echo "enter the sting: " | ||
read str; | ||
|
||
countStringLength() { | ||
echo `echo -n $1 | wc -c` | ||
|
||
# Or can use the below trick to get the string length | ||
# I prefer to use the first one - easy to use and easy to remember | ||
echo ${#1} | ||
} | ||
countStringLength $str | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env python | ||
|
||
#very short script thta reuses pysysinfo | ||
|
||
from pysysinfo_fuction import disk_func | ||
import subprocess | ||
|
||
def tmp_space(): | ||
tmp_usage = 'du' | ||
tmp_arg = '-h' | ||
path = '/tmp/' | ||
print "Space used in /tmp directory" | ||
subprocess.call([tmp_usage, tmp_arg, path]) | ||
|
||
def main(): | ||
disk_func() | ||
|
||
tmp_space() | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/local/bin/bash | ||
|
||
VDI_DIR='/home/asgharje/vdi/' | ||
UBUNTU_GOLD_VDI="ubuntu_11_10_gold.vdi" | ||
REDHAT_GOLD_VDI="centos_6_2_gold.vdi" | ||
|
||
|
||
echo "Name of VM" | ||
read name_of_vm | ||
VBoxManage unregistervm "$name_of_vm" --delete | ||
cd $VDI_DIR | ||
rm *_$name_of_vm.vdi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
|
||
USER=asgharje | ||
DATE=`date +%F` | ||
TOMCAT_DATE=`date +%Y%m%d` | ||
BB_DATE=`date +%Y-%m-%d` | ||
|
||
# | ||
# Create the directory | ||
# | ||
mkdir $DATE | ||
cd $DATE | ||
|
||
# | ||
# Pull the files down | ||
# | ||
for i in "spider.its.utexas.edu" "maeve.its.utexas.edu" "nancy.its.utexas.edu" "tristran.its.utexas.edu" "rosie.its.utexas.edu" | ||
do | ||
echo "" | ||
echo "Now pulling from $i" | ||
echo "" | ||
scp -C $USER@$i:/usr/local/blackboard/config/bb-config.properties $DATE.$i.bb-config.properties | ||
scp -C $USER@$i:/usr/local/blackboard/logs/bb-sqlerror-log.$BB_DATE.txt $DATE.$i.bb-sqlerror-log.$BB_DATE.txt | ||
scp -C $USER@$i:/usr/local/blackboard/logs/bb-sqlerror-log.txt $DATE.$i.bb-sqlerror-log.txt | ||
scp -C $USER@$i:/usr/local/blackboard/logs/tomcat/stdout-stderr-$TOMCAT_DATE.log $DATE.$i.stdout-stderr.txt | ||
scp -C $USER@$i:/usr/local/blackboard/logs/httpd/error_log $DATE.$i.error_log | ||
scp -C $USER@$i:/usr/local/blackboard/logs/httpd/mod_jk.log $DATE.$i.mod_jk.log | ||
scp -C $USER@$i:/usr/local/blackboard/config/bb-tasks.xml $DATE.$i.bb-tasks.xml | ||
scp -C $USER@$i:/usr/local/blackboard/config/bb-tasks.unix.xml $DATE.$i.bb-tasks.unix.xml | ||
scp -C $USER@$i:/usr/local/blackboard/logs/tomcat/catalina-log.txt $DATE.$i.catalina-log.txt | ||
echo "" | ||
echo "Done with $i" | ||
echo "" | ||
done | ||
|
||
# | ||
# gzip the files | ||
# | ||
gzip * | ||
cd .. | ||
|
||
# | ||
# tar up the directory into a tarball | ||
# | ||
tar zcf bb_log_pull.$DATE.tar.gz $DATE/ | ||
|
||
# | ||
# Delete the $DATE/ directory | ||
# | ||
rm -rf $DATE/ | ||
|
||
# Complete | ||
echo "Your file name is bb_log_pull.$DATE.tar.gz" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env python | ||
|
||
# | ||
# This is an attempt to kill all procs by an owner | ||
# | ||
|
||
import os | ||
import sys | ||
import subprocess | ||
|
||
def main(): | ||
if (len(sys.argv) > 1): | ||
ps_grep(sys.argv[1:]) | ||
else: | ||
print "no args" | ||
|
||
def ps_grep(u): | ||
ps="ps" | ||
psopt="-ej" | ||
grep="grep" | ||
cmd="ps aux |grep " | ||
for i in u: | ||
|
||
## James suggested this is "cleaner" | ||
#p1=subprocess.Popen([ps,psopt],stdout=subprocess.PIPE) | ||
#p2=subprocess.Popen([grep, i],stdin=p1.stdout,stdout=subprocess.PIPE) | ||
#p1.stdout.close() | ||
#print p2.communicate()[0] | ||
## | ||
|
||
## This just "works" | ||
subprocess.call(cmd + i, shell=True) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env python | ||
import sys | ||
|
||
counter = 1 | ||
|
||
while True: | ||
line = sys.stdin.readline() | ||
if not line: | ||
break | ||
print "%s: %s" % (counter, line) | ||
counter += 1 |
Oops, something went wrong.