Megatest

Check-in [ecd53bb6c4]
Login
Overview
Comment:Fixed nbload utility
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.55 | v1.5514
Files: files | file ages | folders
SHA1: ecd53bb6c4e28edb09dd0860adb8b30b0c9571e9
User & Date: mrwellan on 2014-01-10 08:48:16
Other Links: branch diff | manifest | tags
Context
2014-02-13
22:58
Committing partially complete example check-in: e201141f44 user: matt tags: v1.55
2014-01-25
22:02
Merged changes on v1.55 branch check-in: 7a252f8ff4 user: matt tags: inmem-per-run-db-per-run-server
2014-01-23
23:07
Merged v1.55 into inmem-per-run-db check-in: 120fb16c21 user: matt tags: inmem-per-run-db
2014-01-10
08:48
Fixed nbload utility check-in: ecd53bb6c4 user: mrwellan tags: v1.55, v1.5514
2014-01-06
15:36
tweak to mtgetfile but it is not completed ... check-in: 6014aa8df2 user: mrwellan tags: v1.55
Changes

Modified Makefile from [d1830ccc25] to [2e41bc5b9a].

102
103
104
105
106
107
108




109
110
111
112
113
114
115
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119







+
+
+
+







$(PREFIX)/bin/nbfake : utils/nbfake
	$(INSTALL) $< $@
	chmod a+x $@

$(PREFIX)/bin/nbfind : utils/nbfind
	$(INSTALL) $< $@
	chmod a+x $@

$(PREFIX)/bin/nbload : utils/nbload
	$(INSTALL) $< $@
	chmod a+x $@

$(PREFIX)/bin/refdb : refdb
	$(INSTALL) $< $@
	chmod a+x $@

deploytarg/nbfake : utils/nbfake
	$(INSTALL) $< $@
123
124
125
126
127
128
129
130

131
132
133
134
135
136
137
127
128
129
130
131
132
133

134
135
136
137
138
139
140
141







-
+







# install dashboard as dboard so wrapper script can be called dashboard
$(PREFIX)/bin/dboard : dboard $(FILES)
	$(INSTALL) dboard $(PREFIX)/bin/dboard
	utils/mk_wrapper $(PREFIX) dboard > $(PREFIX)/bin/dashboard
	chmod a+x $(PREFIX)/bin/dashboard

install : bin $(PREFIX)/bin/mtest $(PREFIX)/bin/megatest $(PREFIX)/bin/dboard $(PREFIX)/bin/dashboard $(HELPERS) $(PREFIX)/bin/nbfake \
          $(PREFIX)/bin/nbfind $(PREFIX)/bin/newdboard $(PREFIX)/bin/refdb $(PREFIX)/bin/mt_xterm $(PREFIX)/bin/revtagfsl
          $(PREFIX)/bin/nbfind $(PREFIX)/bin/nbload $(PREFIX)/bin/newdboard $(PREFIX)/bin/refdb $(PREFIX)/bin/mt_xterm $(PREFIX)/bin/revtagfsl

deploytarg/apropos.so : Makefile
	for i in apropos base64 canvas-draw csv-xml directory-utils dot-locking extras fmt format hostinfo http-client intarweb json md5 message-digest posix posix-extras readline regex regex-case s11n spiffy spiffy-request-vars sqlite3 srfi-1 srfi-18 srfi-69 tcp test uri-common check-errors synch matchable sql-null tcp-server rpc blob-utils string-utils variable-item defstruct uri-generic sendfile opensll openssl lookup-table list-utils stack; do \
	chicken-install -prefix deploytarg -deploy $$i;done

deploytarg/libsqlite3.so : 
	CSC_OPTIONS="-Ideploytarg -Ldeploytarg" $CHICKEN_INSTALL -prefix deploytarg -deploy sqlite3

Modified utils/nbload from [02152a07a2] to [4b5138d43f].

1
2
3
4
5
6


7
8

9
10


11
12
13

14
15
16
17
18





19
20

21
22


23
24
1
2
3
4
5
6
7
8
9

10
11
12
13
14
15
16

17
18
19



20
21
22
23
24


25
26

27
28
29







+
+

-
+


+
+


-
+


-
-
-
+
+
+
+
+
-
-
+

-
+
+

-
#!/bin/bash 

# load=`uptime|awk '{print $10}'|cut -d, -f1`
load=`uptime|perl -pe 's/.*: (\d+.\d+),.*/$1/'`
if which cpucheck > /dev/null;then
    numcpu=`cpucheck|tail -1|awk '{print $6}'`
elif which lscpu > /dev/null;then
    numcpu=`lscpu|grep "CPU.s.:"|awk '{print $2}'`
else
    numcpu=`lscpu|grep "CPU.s.:"|awk '{print $2}'`
    numcpu=2
fi

# NB// max_load is in units of percent.
#
lperc=`echo "100 * $load / $numcpu"|bc`
if [[ "x$MAX_ALLOWED_LOAD" == "x" ]]; then
  max_load=50
  max_load=100
else
  max_load=$MAX_ALLOWED_LOAD
fi 
if [[ $lperc -lt $max_load ]];then
  echo "$@" | at now + 0 minutes
fi

if [[  $lperc -lt $max_load ]];then
  echo "Load acceptable: lperc=$lperc %, max_load=$max_load %, load=$load, numcpu=$numcpu, MAX_ALLOWED_LOAD=$MAX_ALLOWED_LOAD %"
  echo "Starting command: \"$@\""
elif [[ "x$NBLAUNCHER" == "x" ]];then
  echo "nbfind $@" | at now + 2 minutes
  nbfake "$@"
else
  $NBLAUNCHER "$@"
  # echo "Load too high: lperc=$lperc, max_load=$max_load, waiting two minutes before trying to run command: \"$@\""
  echo "nbload $@" | at now + 2 minutes 2> /dev/null
fi