Skip to content
GitLab
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
e2c71224
Commit
e2c71224
authored
Jun 03, 2003
by
Mac Newbold
Browse files
Include swap settings in the email when we start/swapin an expt.
parent
6c8103a1
Changes
2
Hide whitespace changes
Inline
Side-by-side
tbsetup/startexp.in
View file @
e2c71224
...
...
@@ -181,6 +181,24 @@ my $estate = $row{'state'};
my
$expt_path
=
$row
{'
path
'};
my
$expt_name
=
$row
{'
expt_name
'};
my
$expt_created
=
$row
{'
expt_created
'};
my
$swappablebit
=
$row
{'
swappable
'};
my
$idleswapbit
=
$row
{'
idleswap
'};
my
$autoswapbit
=
$row
{'
autoswap
'};
my
$swappable
=
(
$row
{'
swappable
'}
?
"
Yes
"
:
"
No
"
);
my
$idleswap
=
(
$row
{'
idleswap
'}
?
"
Yes
"
:
"
No
"
);
my
$autoswap
=
(
$row
{'
autoswap
'}
?
"
Yes
"
:
"
No
"
);
my
$noswap
=
$row
{'
noswap_reason
'};
my
$noidleswap
=
$row
{'
noidleswap_reason
'};
my
$idleswaptime
=
$row
{'
idleswap_timeout
'}
/
60.0
;
my
$autoswaptime
=
$row
{'
autoswap_timeout
'}
/
60.0
;
my
$swapsettings
=
#"Name: $expt_name\n" .
"
Swappable:
$swappable
"
.
(
$swappablebit
?
"
\n
"
:
"
(Reason: '
$noswap
')
\n
")
.
"
Idle-Swap:
$idleswap
"
.
(
$idleswapbit
?
"
, at
$idleswaptime
hours
\n
"
:
"
(Reason: '
$noidleswap
')
\n
")
.
"
Auto-Swap:
$autoswap
"
.
(
$autoswapbit
?
"
, at
$autoswaptime
hours
\n
"
:
"
\n
");
if
(
$estate
ne
EXPTSTATE_NEW
)
{
die
("
*** $0:
\n
"
.
...
...
@@ -334,13 +352,13 @@ $message .=
"
PID:
$pid
\n
"
.
"
GID:
$gid
\n
"
.
"
Name:
$expt_name
\n
"
.
$swapsettings
.
"
Created:
$expt_created
\n
"
.
"
Directory:
$expt_path
\n
"
.
"
\n
"
.
"
Appended at the end is the output of the experiment setup. If you
\n
"
.
"
have any questions or comments, please include the output below
\n
"
.
"
in your message to
$TBOPS
";
SENDMAIL
("
$user_name
<
$user_email
>
",
"
New Experiment
"
.
((
$frontend
==
0
)
?
"
Created
"
:
"
Preloaded
")
.
...
...
tbsetup/swapexp.in
View file @
e2c71224
...
...
@@ -203,6 +203,25 @@ my $estate = $hashrow{'state'};
my
$expt_path
=
$hashrow
{'
path
'};
my
$isbatchexpt
=
$hashrow
{'
batchmode
'};
my
$ebatchstate
=
$hashrow
{'
batchstate
'};
my
$swappablebit
=
$row
{'
swappable
'};
my
$idleswapbit
=
$row
{'
idleswap
'};
my
$autoswapbit
=
$row
{'
autoswap
'};
my
$swappablestr
=
(
$row
{'
swappable
'}
?
"
Yes
"
:
"
No
"
);
my
$idleswapstr
=
(
$row
{'
idleswap
'}
?
"
Yes
"
:
"
No
"
);
my
$autoswapstr
=
(
$row
{'
autoswap
'}
?
"
Yes
"
:
"
No
"
);
my
$noswap
=
$row
{'
noswap_reason
'};
my
$noidleswap
=
$row
{'
noidleswap_reason
'};
my
$idleswaptime
=
$row
{'
idleswap_timeout
'}
/
60.0
;
my
$autoswaptime
=
$row
{'
autoswap_timeout
'}
/
60.0
;
my
$swapsettings
=
#"Name: $expt_name\n" .
"
Swappable:
$swappablestr
"
.
(
$swappablebit
?
"
\n
"
:
"
(Reason: '
$noswap
')
\n
")
.
"
Idle-Swap:
$idleswapstr
"
.
(
$idleswapbit
?
"
, at
$idleswaptime
hours
\n
"
:
"
(Reason: '
$noidleswap
')
\n
")
.
"
Auto-Swap:
$autoswapstr
"
.
(
$autoswapbit
?
"
, at
$autoswaptime
hours
\n
"
:
"
\n
");
if
(
!
chdir
(
$workdir
))
{
die
("
*** $0:
\n
"
.
...
...
@@ -565,6 +584,11 @@ else {
$message
.=
"
$action
.
\n
";
}
if
(
$inout
eq
"
in
")
{
# Add the swap settings...
$message
.=
"
\n
Current swap settings:
\n
$swapsettings
";
}
$message
.=
"
\n
"
.
"
Appended below is the output. If you have any questions or comments,
\n
"
.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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