popup_report()


Pop up a task window on interested consoles.

Syntax

popup_report(title,[application],[handle],[data])

Parameter

Parameter

Definition

title

title that should appear on the task window

application

optional name of the application from which to determine which consoles to pop up the task window on

handle

optional task ID returned by a previous call to popup_report()

data

optional initial data to be displayed in the task window

Description

The popup_report() function pops up a task window on all consoles that are interested in the specified application. Ifapplication is the empty string, "", then the task window pops up on those consoles interested only in the PSL process that is making the call to the popup_report() function. The handle becomes invalid if all consoles have destroyed the task window, thereby removing all the status information about the task. 

If handle is not the empty string, the following actions occur:

  • If the report exists (that is, the task window has been popped up previously), then the task window pops up only on those consoles that have started monitoring the application/process since the last call to the popup_report()function.
  • The data does not necessarily go to all of the consoles that are interested in the task, because the consoles that were previously popped up already have the data .

The popup_report() function returns one of the following values:

  • task ID (that is, handle ) if the function call is successful
  • empty string, "", if the function call fails (that is, if an invalid handle is used)

Note

The popup_report() and write_to_report() functions use handle to identify the report to be popped up or written to, respectively.

To write text to the popped-up task window, see write_to_report().

Example

The following examples demonstrate how to pop up a task window on interested consoles. (Both examples call thewrite_to_report() function to write text to the popped-up windows.)

 

Simple Example

# Pop up a report on all connected Consoles
handle = popup_report("File System Report");
if (handle) {
write_to_report(handle,system("/bin/df"));
}

Complex Example

# Pop up a report on all Consoles that are currently monitoring the
# FILESYSTEM application. And refresh the report every 10 seconds and ensure
# that new Consoles can also see the report.
handle = popup_report("File System Report","FILESYSTEM","",
"Started at ".date()."\n");
while (handle) {
sleep(10);
# Pop up a report on all consoles that started monitoring the
# FILESYSTEM application after the popup_report() function was called
handle = popup_report("File System Report (already running)",
"FILESYSTEM",handle,"You missed the start\n");
write_to_report(handle,system("/bin/df"));
}

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*