Skip to content

Instantly share code, notes, and snippets.

@li-ch
Last active March 7, 2017 01:34
Show Gist options
  • Save li-ch/33bdd150a7305c6de1e473f35e569082 to your computer and use it in GitHub Desktop.
Save li-ch/33bdd150a7305c6de1e473f35e569082 to your computer and use it in GitHub Desktop.
#!/bin/sh
dir=./log/1
> $dir/CPU0
> $dir/Mem0
> $dir/Net0
> $dir/Dsk0
> $dir/Nfs0
collectl -sC -oT > $dir/CPU0 &
collectl -sM -oT > $dir/Mem0 &
collectl -sN -oT > $dir/Net0 &
collectl -sD -oT > $dir/Dsk0 &
collectl -sF -oT > $dir/Nfs0 &
echo "Running..."
# Assumption: Each machine runing both ps and worker.
# Change accordingly to CLusterSpec.
date > $dir/output-0
python $1 --job_name="ps" --task_index=0 >> $dir/output-0 &
python $1 --job_name="worker" --task_index=0 >> $dir/output-0
date >> $dir/output-0
killall collectl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment