From 6cadeb4a9989af9cd0f9059d66f8bb9bb22f6965 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 24 Jan 2003 06:06:05 +0000 Subject: [PATCH] stripchart scripts svn path=/trunk/boinc/; revision=829 --- stripchart/samples/count_users | 8 -------- stripchart/samples/{count_results => db_count} | 2 +- stripchart/samples/db_looper | 4 ++++ stripchart/samples/dir_size | 8 ++++++++ 4 files changed, 13 insertions(+), 9 deletions(-) delete mode 100755 stripchart/samples/count_users rename stripchart/samples/{count_results => db_count} (68%) create mode 100755 stripchart/samples/db_looper create mode 100755 stripchart/samples/dir_size diff --git a/stripchart/samples/count_users b/stripchart/samples/count_users deleted file mode 100755 index 6bcb061a3c..0000000000 --- a/stripchart/samples/count_users +++ /dev/null @@ -1,8 +0,0 @@ -#! /bin/csh -# NOTE: this must be macro-substituted (for DATABASE) - -set CIVDATE = `/bin/date "+%Y:%m:%d:%H:%M"` -set UNIXDATE = `/usr/local/bin/perl -e 'print time()'` -set COUNT = `echo "use DATABASE; select count(*) from user" | mysql | tail -1` - -echo $CIVDATE $UNIXDATE $COUNT diff --git a/stripchart/samples/count_results b/stripchart/samples/db_count similarity index 68% rename from stripchart/samples/count_results rename to stripchart/samples/db_count index 2e5df62954..b80402f93e 100755 --- a/stripchart/samples/count_results +++ b/stripchart/samples/db_count @@ -3,6 +3,6 @@ set CIVDATE = `date "+%Y:%m:%d:%H:%M"` set UNIXDATE = `perl -e 'print time()'` -set COUNT = `echo "use BOINC_DB_NAME; select count(*) from result" | mysql | tail -1` +set COUNT = `echo "use david_test; select count(*) from $1" | mysql | tail -1` echo $CIVDATE $UNIXDATE $COUNT diff --git a/stripchart/samples/db_looper b/stripchart/samples/db_looper new file mode 100755 index 0000000000..66d9769a0e --- /dev/null +++ b/stripchart/samples/db_looper @@ -0,0 +1,4 @@ +#! /bin/csh + +set ARG = "db_count $1" +looper "$ARG" $2 diff --git a/stripchart/samples/dir_size b/stripchart/samples/dir_size new file mode 100755 index 0000000000..d64a4bf6ac --- /dev/null +++ b/stripchart/samples/dir_size @@ -0,0 +1,8 @@ +#! /bin/csh + +set SIZE = `du -sk $1 | awk '{print $1*1024}'` + +set CIVDATE = `/bin/date "+%Y:%m:%d:%H:%M"` +set UNIXDATE = `/usr/local/bin/perl -e 'print time()'` + +echo $CIVDATE $UNIXDATE $SIZE