Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added a script to start the erlang wsdemo server

Added a script to monitor memory usage
Fixed the wsdemo-ws.js host name
  • Loading branch information...
commit 477dcadd5b2f1cd1686d461f168da60b4a36d16a 1 parent ae959fd
root authored
View
6 .gitignore
@@ -1,8 +1,12 @@
.eunit
deps/
ebin/
+competition/log/*.log
+competition/wsdemo-snap
*.o
*.beam
*.plt
+*.hi
*~
-#*#
+#*#
+*.class
View
1  competition/wsdemo-erl.sh
@@ -0,0 +1 @@
+erl -pa ../ebin ../deps/*/ebin +K true -s wsdemo
View
2  competition/wsdemo-ws.js
@@ -1,7 +1,7 @@
#!/usr/bin/env node
var ws = require('ws')
-, wss = new ws.Server({port:8000})
+, wss = new ws.Server({port:8000, host:"0.0.0.0"})
wss.on('connection', function(con) {
View
8 meminfo
@@ -0,0 +1,8 @@
+PID=$(pgrep -f "$1")
+while [ 1 ]
+do
+ NUMCON=`netstat -n | awk '/ESTABLISHED/ && $4=="10.196.187.15:8000"' | wc -l`
+ MEM=`ps -o rss= -p $PID`
+ echo -e "`date`\t`date +%s`\t$MEM\t$NUMCON"
+ sleep 30
+done
Please sign in to comment.
Something went wrong with that request. Please try again.