From 4af1ef748db93bec1fbe10cd4ea7a862cb222f86 Mon Sep 17 00:00:00 2001 From: Steffen Moeller Date: Wed, 4 Sep 2019 00:25:59 +0200 Subject: [PATCH] Removing two scripts that have become obsolete Following a comment by @davidpanderson on PR https://github.com/BOINC/boinc/pull/3263 --- tools/db_query | 8 ---- tools/watch_tcp | 119 ------------------------------------------------ 2 files changed, 127 deletions(-) delete mode 100755 tools/db_query delete mode 100755 tools/watch_tcp diff --git a/tools/db_query b/tools/db_query deleted file mode 100755 index 4852cfa1eb..0000000000 --- a/tools/db_query +++ /dev/null @@ -1,8 +0,0 @@ -#! /bin/tcsh - -set CIVDATE = `date "+%Y:%m:%d:%H:%M"` -set UNIXDATE = `perl -e 'print time()'` -set DBNAME = `../bin/parse_config db_name` -set COUNT = `echo "use $DBNAME;$1" | mysql | tail -1` - -echo $CIVDATE $UNIXDATE $COUNT diff --git a/tools/watch_tcp b/tools/watch_tcp deleted file mode 100755 index 3f4eedee6f..0000000000 --- a/tools/watch_tcp +++ /dev/null @@ -1,119 +0,0 @@ -#! /bin/csh -# -# by jeffc -# -# Usage : -# tcpstat [-t | -i interval] -w -# -# Options: -# -t given current counter totals -# -i interval sample at interval seconds and give counter rate -# -w watch_mode -# Default is -i 5 -# -# - -set usage = "usage: watch_tcp [-t | -i interval] -w" -set get_current_totals = 0 -set get_current_rates = 1 -set interval = 5 -set watch_mode = 0 -set drop_limit = 3 - -while ($#argv) - if ("$argv[1]" == "-t") then - set get_current_totals = 1 - set get_current_rates = 0 - else if ("$argv[1]" == "-i") then - set get_current_rates = 1 - set get_current_totals = 0 - shift - set interval = $argv[1] - else if ("$argv[1]" == "-w") then - set watch_mode = 1 - endif - - shift -end - -set now = `date '+%y:%m:%d:%H:%M:%S'` -set TMPFILE = /tmp/tcpstat.tmp.${now}.$$ -set DFILE = /tmp/tcpstat.tmp.delta.${now}.$$ -set DROPFILE = /tmp/DROPS - -if($get_current_totals) then - netstat -i -s -P tcp | sed -g s/=/\ / > $TMPFILE - - echo "" - echo "handshake queue max " `/usr/sbin/ndd -get /dev/tcp tcp_conn_req_max_q0` - echo "ESTABLISHED queue max " `/usr/sbin/ndd -get /dev/tcp tcp_conn_req_max_q` - echo "" - awk '{if($1 == "tcpOutDataSegs") print $1" "$2}' $TMPFILE - awk '{if($3 == "tcpOutDataBytes") print $3" "$4}' $TMPFILE - awk '{if($3 == "tcpPassiveOpens") print $3" "$4}' $TMPFILE - awk '{if($1 == "tcpListenDrop") print $1" "$2}' $TMPFILE - awk '{if($3 == "tcpListenDropQ0") print $3" "$4}' $TMPFILE - awk '{if($1 == "tcpHalfOpenDrop") print $1" "$2}' $TMPFILE - - \rm $TMPFILE - -else - - netstat -i -s -P tcp | sed -g s/=/\ / > $TMPFILE - sleep $interval - netstat -i -s -P tcp | sed -g s/=/\ / > $DFILE - - set ODS = `awk '{if($1 == "tcpOutDataSegs") print $2}' $TMPFILE` - set ODS5 = `awk '{if($1 == "tcpOutDataSegs") print $2}' $DFILE` - set ODB = `awk '{if($3 == "tcpOutDataBytes") print $4}' $TMPFILE` - set ODB5 = `awk '{if($3 == "tcpOutDataBytes") print $4}' $DFILE` - set PO = `awk '{if($3 == "tcpPassiveOpens") print $4}' $TMPFILE` - set PO5 = `awk '{if($3 == "tcpPassiveOpens") print $4}' $DFILE` - set LD = `awk '{if($1 == "tcpListenDrop") print $2}' $TMPFILE` - set LD5 = `awk '{if($1 == "tcpListenDrop") print $2}' $DFILE` - set LDQ0 = `awk '{if($3 == "tcpListenDropQ0") print $4}' $TMPFILE` - set LDQ05 = `awk '{if($3 == "tcpListenDropQ0") print $4}' $DFILE` - set HOD = `awk '{if($1 == "tcpHalfOpenDrop") print $2}' $TMPFILE` - set HOD5 = `awk '{if($1 == "tcpHalfOpenDrop") print $2}' $DFILE` - - @ ODS_rate = ($ODS5 - $ODS) / $interval - @ ODB_rate = ($ODB5 - $ODB) / $interval - @ PO_rate = ($PO5 - $PO) / $interval - @ LD_rate = ($LD5 - $LD) / $interval - @ LDQ0_rate = ($LDQ05 - $LDQ0) / $interval - @ HOD_rate = ($HOD5 - $HOD) / $interval - - if($watch_mode) then - echo INFO $now TCP Out B/s : $ODB_rate Listen drops/s : $LD_rate - if($LD_rate) then - if(-f $DROPFILE) then - set drop_count = `cat $DROPFILE` - @ drop_count++ - if($drop_count > $drop_limit) then - echo CRITICAL $now TCP dropping connections for $drop_count checks - endif - echo $drop_count > $DROPFILE - else - echo 1 > $DROPFILE - endif - else - if(-f $DROPFILE) then - rm $DROPFILE - endif - else - echo "" - echo "handshake queue max " `/usr/sbin/ndd -get /dev/tcp tcp_conn_req_max_q0` - echo "ESTABLISHED queue max " `/usr/sbin/ndd -get /dev/tcp tcp_conn_req_max_q` - echo "" - echo tcpOutDataSegs" "$ODS_rate per second - echo tcpOutDataBytes" "$ODB_rate per second - echo tcpPassiveOpens" "$PO_rate per second - echo tcpListenDrop" "$LD_rate per second - echo tcpListenDropQ0" "$LDQ0_rate per second - echo tcpHalfOpenDrop" "$HOD_rate per second - endif - - \rm $TMPFILE - \rm $DFILE -endif -