tmux_sessions.sh 931 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. set -e
  3. # Start a tmux session with two mining and a non-mining darkfid nodes.
  4. # Additionally, start two minerd daemons.
  5. session=darkfid-small
  6. if [ "$1" = "-vv" ]; then
  7. verbose="-vv"
  8. shift
  9. else
  10. verbose=""
  11. fi
  12. tmux new-session -d -s $session
  13. tmux send-keys -t $session "../../../minerd ${verbose} -c minerd0.toml" Enter
  14. sleep 1
  15. tmux split-window -t $session -v -l 90%
  16. tmux send-keys -t $session "LOG_TARGETS='!sled,!runtime' ../../../darkfid ${verbose} -c darkfid0.toml" Enter
  17. sleep 2
  18. tmux new-window -t $session
  19. tmux send-keys -t $session "../../../minerd ${verbose} -c minerd1.toml" Enter
  20. sleep 1
  21. tmux split-window -t $session -v -l 90%
  22. tmux send-keys -t $session "LOG_TARGETS='!sled,!runtime' ../../../darkfid ${verbose} -c darkfid1.toml" Enter
  23. sleep 2
  24. tmux new-window -t $session
  25. tmux send-keys -t $session "LOG_TARGETS='!sled,!runtime' ../../../darkfid ${verbose} -c darkfid2.toml" Enter
  26. tmux attach -t $session