Last active
September 22, 2017 20:33
-
-
Save ammaraskar/15d9e726798d32ec6545edf8366a4ca8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tmux new-session -d -s lab2 | |
tmux send-keys 'cd ~/cs252/lab2-src' 'C-m' | |
tmux send-keys './script-consumer.sh' 'C-m' | |
tmux rename-window 'Monitor' | |
tmux select-window -t lab2:0 | |
tmux split-window -h | |
tmux send-keys 'htop -u $USER' 'C-m' | |
tmux split-window -v -t 0 | |
sleep 1 | |
tmux send-keys 'cd ~/cs252/lab2-src' 'C-m' | |
tmux send-keys './monitor.sh $(ps -u $USER | grep script-consumer | awk "{print $1}") -cpu 20 mem 2000000 4 2' 'C-m' | |
tmux split-window -v -t 1 | |
tmux send-keys 'cd ~/cs252/lab2-src' 'C-m' | |
tmux send-keys "watch 'bash -c \"cat reports_dir/* \" '" 'C-m' | |
tmux attach-session -t lab2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment