#At bzr+ssh://bk-internal.mysql.com/bzrroot/mysql-falcon/
263 Hakan Kuecuekyilmaz 2008-09-12
Refined DBT2 scripts.
added:
dbt2/images/
renamed:
dbt2/process-stop.png => dbt2/images/process-stop.png
modified:
dbt2/README.txt
dbt2/bzr_checkout_dbt2.sh
dbt2/machine_info.sh
dbt2/wait_for_dbt2_and_collect.sh
dbt2/weekly_dbt2_overview.php
dbt2/weekly_dbt2_overview.sh
per-file messages:
dbt2/README.txt
We need short form of hostname $(hostname -s).
dbt2/bzr_checkout_dbt2.sh
We need short form of hostname $(hostname -s).
dbt2/machine_info.sh
We need short form of hostname $(hostname -s).
dbt2/wait_for_dbt2_and_collect.sh
We need short form of hostname $(hostname -s).
dbt2/weekly_dbt2_overview.php
Moved image to images/ folder.
dbt2/weekly_dbt2_overview.sh
We need short form of hostname $(hostname -s).
=== modified file 'dbt2/README.txt'
--- a/dbt2/README.txt 2008-06-17 07:49:19 +0000
+++ b/dbt2/README.txt 2008-09-12 21:57:02 +0000
@@ -5,7 +5,7 @@ settings, collect the results, and gener
overview page.
It can be triggered via a cronjob like:
-35 08 * * 5 export HOSTNAME=$(hostname) && \
+35 08 * * 5 export HOSTNAME=$(hostname -s) && \
cd $HOME/work/mysql-falcon/dbt2 && \
./bzr_checkout_dbt2.sh && \
./weekly_dbt2_overview.sh 10 compile rotate; \
@@ -29,4 +29,4 @@ This scripts waits until the DBT2 runs a
samples the result files into a HTML overview page.
--
-Hakan Kuecuekyilmaz, <hakan at mysql dot com>, 2008-06-17.
\ No newline at end of file
+Hakan Kuecuekyilmaz <hakan at mysql dot com>, 2008-06-17.
=== modified file 'dbt2/bzr_checkout_dbt2.sh'
--- a/dbt2/bzr_checkout_dbt2.sh 2008-09-04 14:11:10 +0000
+++ b/dbt2/bzr_checkout_dbt2.sh 2008-09-12 21:57:02 +0000
@@ -17,7 +17,7 @@
#
# Hostname. Needed for various paths, directories, includes.
#
-HOSTNAME=$(hostname)
+HOSTNAME=$(hostname -s)
#
# Includes.
=== added directory 'dbt2/images'
=== renamed file 'dbt2/process-stop.png' => 'dbt2/images/process-stop.png'
=== modified file 'dbt2/machine_info.sh'
--- a/dbt2/machine_info.sh 2008-09-03 06:03:39 +0000
+++ b/dbt2/machine_info.sh 2008-09-12 21:57:02 +0000
@@ -5,7 +5,7 @@
# Hakan Kuecuekyilmaz <hakan at mysql dot com>, 2007-08-07.
# $Id$
-HOSTNAME=$(hostname)
+HOSTNAME=$(hostname -s)
UNAME=$(uname -a)
MEM=$(cat /proc/meminfo | grep MemTotal | awk -F : '{ print $2 }')
CPUS=$(cat /proc/cpuinfo | grep processor | wc -l)
=== modified file 'dbt2/wait_for_dbt2_and_collect.sh'
--- a/dbt2/wait_for_dbt2_and_collect.sh 2008-09-04 14:44:29 +0000
+++ b/dbt2/wait_for_dbt2_and_collect.sh 2008-09-12 21:57:02 +0000
@@ -10,12 +10,14 @@
#
export PATH="/usr/local/php/bin:/usr/local/bin:$PATH"
+HOSTNAME=$(hostname -s)
+
#
# Directories and files.
#
WORK="/data0/work/mysql"
BZR_BASE="$HOME/work/mysql-falcon/dbt2"
-PRODUCTION="hakank@stripped:~/public_html/$(hostname)"
+PRODUCTION="hakank@stripped:~/public_html/$HOSTNAME"
#FALCON="$WORK/mysql-6.0"
FALCON="$WORK/mysql-6.0-falcon"
@@ -29,8 +31,8 @@ CONTROL="$FALCON/weekly_dbt2_overview_do
MAINTAINER_EMAIL='hakan@stripped'
CC_LIST=''
FAILED='Weekly DBT2 Overview failed'
-SUCCESS="Weekly DBT2 Overview on $(hostname) succeeded"
-GRAPH="$BZR_BASE/weekly_dbt2_runs/$(hostname)/w10/weekly_dbt2_overview_graph.png"
+SUCCESS="Weekly DBT2 Overview on $HOSTNAME succeeded"
+GRAPH="$BZR_BASE/weekly_dbt2_runs/$HOSTNAME/w10/weekly_dbt2_overview_graph.png"
#
# Mail program to use. mail|mailx does not support -a (attachments),
@@ -62,7 +64,7 @@ while (! [ -a $CONTROL ] ); do
done
# Get machine info.
-cd $BZR_BASE/weekly_dbt2_runs/$(hostname)
+cd $BZR_BASE/weekly_dbt2_runs/$HOSTNAME
../../machine_info.sh > machine_info.txt
# Get mysqld configuration.
@@ -77,24 +79,25 @@ if [ $? != 0 ]; then
echo 'Weekly DBT2 Overview failed' | mail -s '[WDO ERROR]' $MAINTAINER_EMAIL
else
# Synchronize remote repository. Exclude mix.log files, because they get quite big
(~50MB).
- rsync -avz --delete --cvs-exclude --exclude '*_mix.log'
$BZR_BASE/old_weekly_dbt2_runs/$(hostname)/ $PRODUCTION/
- rsync -avz --delete --cvs-exclude --exclude '*_mix.log'
$BZR_BASE/weekly_dbt2_runs/$(hostname)/ $PRODUCTION/weekly_dbt2_overview/
+ rsync -avz --delete --cvs-exclude --exclude '*_mix.log'
$BZR_BASE/old_weekly_dbt2_runs/$HOSTNAME/ $PRODUCTION/
+ rsync -avz --delete --cvs-exclude --exclude '*_mix.log'
$BZR_BASE/weekly_dbt2_runs/$HOSTNAME/ $PRODUCTION/weekly_dbt2_overview/
rsync -avz --delete --cvs-exclude $BZR_BASE/include/
$PRODUCTION/weekly_dbt2_overview/include/
+ rsync -avz --delete --cvs-exclude $BZR_BASE/images/
$PRODUCTION/weekly_dbt2_overview/images/
rsync -avz --delete $BZR_BASE/dbt2.css $PRODUCTION/weekly_dbt2_overview/
- rsync -avz --delete $BZR_BASE/weekly_dbt2_runs/$(hostname)/dbt2_config.txt
$PRODUCTION/weekly_dbt2_overview/
- rsync -avz --delete $BZR_BASE/weekly_dbt2_runs/$(hostname)/machine_info.txt
$PRODUCTION/weekly_dbt2_overview/
+ rsync -avz --delete $BZR_BASE/weekly_dbt2_runs/$HOSTNAME/dbt2_config.txt
$PRODUCTION/weekly_dbt2_overview/
+ rsync -avz --delete $BZR_BASE/weekly_dbt2_runs/$HOSTNAME/machine_info.txt
$PRODUCTION/weekly_dbt2_overview/
rsync -avz --delete $BZR_BASE/process-stop.png $PRODUCTION/weekly_dbt2_overview/
rsync -avz --delete $BZR_BASE/weekly_dbt2_overview.php
$PRODUCTION/weekly_dbt2_overview/
rsync -avz --delete $BZR_BASE/weekly_dbt2_overview.png
$PRODUCTION/weekly_dbt2_overview/
if [ $? != 0 ]; then
- echo "[ERROR] rsync to production for $(hostname) failed!"
+ echo "[ERROR] rsync to production for $HOSTNAME failed!"
exit 1;
else
if [ $HAVE_NAIL = 1 ]; then
- echo $SUCCESS | nail -a $GRAPH -s "[WDO SUCCESS]: $(hostname)"
$MAINTAINER_EMAIL
+ echo $SUCCESS | nail -a $GRAPH -s "[WDO SUCCESS]: $HOSTNAME"
$MAINTAINER_EMAIL
else
- (echo $SUCCESS; uuencode $GRAPH $GRAPH) | mailx -s "[WDO SUCCESS]:
$(hostname)" $MAINTAINER_EMAIL
+ (echo $SUCCESS; uuencode $GRAPH $GRAPH) | mailx -s "[WDO SUCCESS]: $HOSTNAME"
$MAINTAINER_EMAIL
fi
fi
fi
=== modified file 'dbt2/weekly_dbt2_overview.php'
--- a/dbt2/weekly_dbt2_overview.php 2008-07-10 10:29:27 +0000
+++ b/dbt2/weekly_dbt2_overview.php 2008-09-12 21:57:02 +0000
@@ -159,7 +159,7 @@ foreach ($directories as $data) {
$error = zero_if_not_set($key, $error_files[$data], $i + 1);
if ($error) {
- $error = '<a href="./' . $data . '/' . $error . '"><img
src="process-stop.png" /></a>';
+ $error = '<a href="./' . $data . '/' . $error . '"><img
src="./images/process-stop.png" /></a>';
} else {
$error = '';
}
@@ -185,7 +185,7 @@ foreach ($directories as $data) {
$error = zero_if_not_set($key, $error_files[$data], $i + 1);
if ($error) {
- $error = '<a href="./' . $data . '/' . $error . '" title="' .
$error_message . '"><img src="process-stop.png" /></a>';
+ $error = '<a href="./' . $data . '/' . $error . '" title="' .
$error_message . '"><img src="./images/process-stop.png" /></a>';
} else {
$error = '';
}
=== modified file 'dbt2/weekly_dbt2_overview.sh'
--- a/dbt2/weekly_dbt2_overview.sh 2008-09-10 17:31:03 +0000
+++ b/dbt2/weekly_dbt2_overview.sh 2008-09-12 21:57:02 +0000
@@ -47,7 +47,7 @@ fi
#
# Hostname. Needed for various paths, directories, includes.
#
-HOSTNAME=$(hostname)
+HOSTNAME=$(hostname -s)
#
# Includes.
@@ -81,7 +81,6 @@ CONTROL_TIMESTAMP=$(date +%Y-%m-%d)
# Directories
#
-
# Which bzr tree to use for running DBT2.
#FALCON="$WORK/mysql-6.0"
FALCON="$WORK/mysql-6.0-falcon"
@@ -188,7 +187,7 @@ MYSQLD_CONFIG_INNODB="$MYSQLD_CONFIG_GEN
--innodb_doublewrite=0 \
--innodb-status-file=0 \
--skip-innodb-adaptive-hash-index \
- --innodb_max_dirty_pages_pct = 70 \
+ --innodb_max_dirty_pages_pct=70 \
--innodb_thread_concurrency=0"
# </CONFIGURATION>
| Thread |
|---|
| • bzr commit into mysql-falcon branch (hky:263) | Hakan Kuecuekyilmaz | 12 Sep |