All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 52f174fa authored by Leigh B. Stoller's avatar Leigh B. Stoller

Some cleanup to my silly little event viewer widget, and stick it on

the Show Experiment menu to see if anyone uses it.
parent bfae3cdb
......@@ -125,11 +125,19 @@ if ($fromweb) {
# Loop.
my $lastevent_time = time();
while (1) {
# Quit when the experiment is no longer active.
if (ExpState($pid, $eid) ne EXPTSTATE_ACTIVE());
# Quit if no events for a long time.
if (time() - $lastevent_time > 300) {
syswrite(STDOUT, "No events for a long time; stopping ...\n");
event_poll_blocking($handle, 2000);
......@@ -148,15 +156,25 @@ sub callbackFunc($$$) {
my $arguments = event_notification_get_arguments($handle, $notification);
my $string =
"$time $group $host $objtype $objname $eventtype";
$string .= " ARGS:$arguments"
if (defined($arguments));
sprintf("%-12s %-10s %-15s %-12s %-15s %-15s",
"$time", "$group", "$host", "$objtype",
"$objname", "$eventtype");
if (defined($arguments)) {
# Trim extra whitespace.
$arguments =~ s/^\s+//;
$arguments =~ s/\s+$//;
$string .= " $arguments";
$string .= "\n";
my $rval = syswrite(STDOUT, $string);
# If the web page stops ...
# If the web page stops this is only way to catch it and exit.
# Hence, the use of syswrite so we can get status back.
if (!defined($rval));
$lastevent_time = time();
......@@ -397,6 +397,9 @@ if ($expstate == $TB_EXPTSTATE_ACTIVE) {
WRITESUBMENUBUTTON("Link Tracing/Monitoring",
# Admin and project/experiment leaders get this option.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment