Skip to content

Instantly share code, notes, and snippets.

@rgarcia
Last active December 27, 2015 04:59
Show Gist options
  • Select an option

  • Save rgarcia/7270421 to your computer and use it in GitHub Desktop.

Select an option

Save rgarcia/7270421 to your computer and use it in GitHub Desktop.
memmon test
#!/usr/bin/env bash
# create a string of "a"s that is length $1
longstr=$(head -c $1 < /dev/zero | tr '\0' '\141')
sleep 1200
#!/usr/bin/env bash
# 100, 200, 300 MB ish. in practice I'm seeing 320, 638, 1085
./eat_bytes.sh 100000000 &
./eat_bytes.sh 200000000 &
./eat_bytes.sh 300000000 &
wait $!
#!/usr/bin/env bash
supervisord -c supervisor.conf
[inet_http_server]
port=0.0.0.0:9001
[supervisord]
logfile=out.log
loglevel=info
nodaemon=true
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[program:hog]
command=./hog.sh
stopasgroup=true
killasgroup=true
stdout_logfile=./hog.log
stderr_logfile=./hog.log
[eventlistener:memmon_hog]
command=python /home/rgarcia/github/Clever/superlance/superlance/memmon.py -g hog=1500MB -t
events=TICK_5
stdout_logfile=./memmon.log
stderr_logfile=./memmon.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment