Skip to content

Commit

Permalink
Updated README to use ./bin/trema.
Browse files Browse the repository at this point in the history
  • Loading branch information
yasuhito committed Oct 2, 2015
1 parent 92671e8 commit ca0f0a1
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Install
```
$ git clone https://github.com/trema/switch_monitor.git
$ cd switch_monitor
$ bundle install
$ bundle install --binstubs
```


Expand All @@ -42,30 +42,30 @@ Play
Run this controller:

```
$ bundle exec trema run ./lib/switch_monitor.rb -c trema.conf
0x3 is up (all = 0x3)
0x2 is up (all = 0x2, 0x3)
0x1 is up (all = 0x1, 0x2, 0x3)
$ ./bin/trema run ./lib/switch_monitor.rb -c trema.conf
0x3 is up (All = 0x3)
0x2 is up (All = 0x2, 0x3)
0x1 is up (All = 0x1, 0x2, 0x3)
...
```

On another terminal, stop and restart running switches with `trema
kill` and `trema up` command, and switch_monitor.rb outputs the
stop` and `trema start` command, and switch_monitor.rb outputs the
current switch status.

```
(On another terminal)
$ bundle exec trema kill 0x2
$ bundle exec trema up 0x2
$ ./bin/trema stop 0x2
$ ./bin/trema start 0x2
```

```
$ bundle exec trema run ./lib/switch_monitor.rb -c trema.conf
0x3 is up (all = 0x3)
0x2 is up (all = 0x2, 0x3)
0x1 is up (all = 0x1, 0x2, 0x3)
0x2 is down (all = 0x1, 0x3)
0x2 is up (all = 0x1, 0x2, 0x3)
$ ./bin/trema run ./lib/switch_monitor.rb -c trema.conf
0x3 is up (All = 0x3)
0x2 is up (All = 0x2, 0x3)
0x1 is up (All = 0x1, 0x2, 0x3)
0x2 is down (All = 0x1, 0x3)
0x2 is up (All = 0x1, 0x2, 0x3)
```

Enjoy!

0 comments on commit ca0f0a1

Please sign in to comment.