Skip to content

Commit

Permalink
Regenerate topology image every second.
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorDoyle committed Jun 20, 2017
1 parent 51de723 commit b411cb6
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions server.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
#!/bin/sh

echo "Generating topology as seen from this process"
lstopo --pid $$ --no-io --of svg > topology.svg

gen_topology_forever () {
echo "Generating topology as seen from this process every second"
while true;
do
lstopo --pid $$ --no-io --of svg > topology.svg
/bin/sleep 1
done;
}

gen_topology_forever &

PORT=${1:-"80"}
echo "Starting HTTP server on port $PORT"
Expand Down

0 comments on commit b411cb6

Please sign in to comment.