Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
a9ab2bdb
Commit
a9ab2bdb
authored
May 27, 2003
by
Leigh B. Stoller
Browse files
Allow ptopgen to set a specific multiplex_factor (virtnode_capacity)
from the command line.
parent
76c37c50
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/ptopgen.in
View file @
a9ab2bdb
...
...
@@ -11,12 +11,14 @@ use Getopt::Std;
sub
usage
()
{
print
STDOUT
"
Usage: ptopgen [-s switch] [-e pid/eid]
\n
"
.
print
STDOUT
"
Usage: ptopgen [-s switch] [-e pid/eid]
[-m factor]
\n
"
.
"
-e include given experiment's resources
\n
"
.
"
in the ptopfile (as if they were free)
\n
";
"
in the ptopfile (as if they were free)
\n
"
.
"
-m Override multiplex_factor
\n
";
exit
(
-
1
);
}
my
$optlist
=
"
s:e:
";
my
$optlist
=
"
s:e:m:
";
my
$mfactor
;
# Settings - Change these to your particular network.
...
...
@@ -63,6 +65,9 @@ if (@ARGV) {
if
(
defined
(
$options
{"
s
"}))
{
$switchtouse
=
$options
{"
s
"};
}
if
(
defined
(
$options
{"
m
"}))
{
$mfactor
=
$options
{"
m
"};
}
if
(
defined
(
$options
{"
e
"}))
{
(
$exempt_pid
,
$exempt_eid
)
=
split
(
/\//
,
$options
{"
e
"}
);
...
...
@@ -172,16 +177,17 @@ foreach $node (keys(%nodes)) {
### and therefore we can support sim nodes
#################################################################
$text
.=
"
sim:100000
";
#
# Ditto for jailed nodes
#
$text
.=
"
pcvm:10
";
}
if
(
$virtnode_capacity
>
0
)
{
#
# Ditto for jailed nodes
#
$text
.=
"
pcvm:
$virtnode_capacity
";
if
(
defined
(
$mfactor
))
{
$text
.=
"
pcvm:
$mfactor
";
}
else
{
$text
.=
"
pcvm:
$virtnode_capacity
";
}
}
print
"
$text
\n
";
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment