Skip to content

Commit

Permalink
Check in script not to on same computer.
Browse files Browse the repository at this point in the history
  • Loading branch information
danalex97 committed May 2, 2018
1 parent 60837c6 commit aa7aa81
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 25 deletions.
21 changes: 9 additions & 12 deletions confs/itl_asym.json → confs/asym.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,35 @@
{
"outPeers" : 35,
"inPeers" : 35,
"outPeers" : 20,
"inPeers" : 20,

"minNodes" : 700,
"seeds" : 1,

"pieceSize" : 196,
"pieceSize" : 1960000,
"pieces" : 1000,

"uploads" : 4,
"optimistics" : 1,
"interval" : 10000,

"backlog" : 10,
"bias" : 1,

"leaderPercent" : 50,

"transitDomains" : 10,
"transitDomainSize" : 50,
"stubDomains" : 14,
"stubDomainSize" : 100,

"transferInterval" : 100,
"transferInterval" : 1500,

"capacityNodes" : [{
"number" : 351,
"upload" : 400,
"download" : 1500
"upload" : 2000,
"download" : 6000
}, {
"number" : 350,
"upload" : 800,
"download" : 3000
"upload" : 10000,
"download" : 10000
}],

"allNodesRunInterval" : 10
"allNodesRunInterval" : 500
}
9 changes: 3 additions & 6 deletions confs/itl.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// - links:
// - unit of measure: b/ms
// - uplink: 100Kb/s = 0.1Kb/ms = 100 b/ms
// - downlink: 1Mb/s = 1000Kb/s = 1Kb/ms = 1500 b/ms
// - downlink: 1Mb/s = 1000Kb/s = 1Kb/ms = 1000 b/ms
// - BitTorrent configuration:
// - out peers: 35
// - rechoking interval: 10s = 10,000ms
Expand All @@ -35,22 +35,19 @@
"interval" : 10000,

"backlog" : 10,
"bias" : 1,

"leaderPercent" : 50,

"transitDomains" : 10,
"transitDomainSize" : 50,
"stubDomains" : 14,
"stubDomainSize" : 100,

"transferInterval" : 1500,
"transferInterval" : 100,

"capacityNodes" : [{
"number" : 701,
"upload" : 100,
"download" : 1000
}],

"allNodesRunInterval" : 500
"allNodesRunInterval" : 50
}
3 changes: 0 additions & 3 deletions confs/medium.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
"interval" : 10000,

"backlog" : 10,
"bias" : 1,

"leaderPercent" : 50,

"transitDomains" : 10,
"transitDomainSize" : 50,
Expand Down
3 changes: 0 additions & 3 deletions confs/small.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

"backlog" : 10,

"leaderPercent" : 50,
"bias" : 1,

"transitDomains" : 10,
"transitDomainSize" : 50,
"stubDomains" : 2,
Expand Down
6 changes: 5 additions & 1 deletion remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,12 @@ def get_len():
return self

def test_remote(id, host):
# Check if there is only one user and
# my script is not already running on the host.
SSH_RUN = """
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=1 {}@{} 'who | cut -d " " -f 1 | sort -u | wc -l'
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=1 {}@{} '
echo $[`who | cut -d " " -f 1 | sort -u | wc -l`
+ `ps -A | grep main | wc -l`]'
"""

to_run = SSH_RUN.format(id, host)
Expand Down

0 comments on commit aa7aa81

Please sign in to comment.