Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
334c61f9
Commit
334c61f9
authored
Aug 01, 2001
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some date/time stamps for informational and debugging purposes.
parent
c58b645e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
tbsetup/reload_daemon.in
tbsetup/reload_daemon.in
+12
-5
No files found.
tbsetup/reload_daemon.in
View file @
334c61f9
...
...
@@ -80,7 +80,7 @@ my $DB = Mysql->connect("localhost", $DBNAME, "script", "none");
# Loop, looking for nodes to reload.
#
while
(
1
)
{
my
(
$count
,
$which
,
@row
,
$imageid
,
$node
,
$retry
);
my
(
$count
,
$which
,
@row
,
$imageid
,
$node
,
$retry
,
$stamp
);
#
# Find all of the free node that have not been reloaded (no pid entry
...
...
@@ -128,8 +128,9 @@ while (1) {
}
@row
=
$query_result
->
fetchrow_array
();
$imageid
=
$row
[
0
];
print
"
Trying to reload
$node
...
\n
";
print
"
Trying to reload
$node
...
\n
";
#
# Call sched_reload with the "force" option, which says that if
...
...
@@ -145,7 +146,10 @@ while (1) {
sleep
(
10
);
next
;
}
print
"
Reload of
$node
has started.
\n
";
$stamp
=
`
date '+20%y-%m-%d %H:%M:%S'
`;
chop
(
$stamp
);
print
"
Reload of
$node
has started at
$stamp
.
\n
";
#
# Reload was started. We want to wait until its finished.
...
...
@@ -161,8 +165,11 @@ while (1) {
sleep
(
10
);
next
;
}
$stamp
=
`
date '+20%y-%m-%d %H:%M:%S'
`;
chop
(
$stamp
);
if
(
!
$query_result
->
numrows
)
{
print
"
\n
Reload of
$node
appears to have finished.
\n
";
print
"
\n
Reload of
$node
appears to have finished
at
$stamp
.
\n
";
last
;
}
#
...
...
@@ -175,7 +182,7 @@ while (1) {
#
@row
=
$query_result
->
fetchrow_array
();
if
(
$row
[
0
]
ne
"
testbed
"
||
$row
[
1
]
ne
"
reloading
")
{
print
"
\n
Reload of
$node
has finished.
\n
";
print
"
\n
Reload of
$node
has finished
at
$stamp
.
\n
";
last
;
}
print
"
.
";
...
...
Write
Preview
Markdown
is supported
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