Pulling sar 5 values back into Progress

Shannon Adams

New Member
I want to run a Unix "sar 5" command from Progress and capture the values to be used in the Progress program.

running sar 5 would return:

# sar 5

SunOS brsprod 5.9 Generic_118558-06 sun4u 09/29/2005

22:35:16 %usr %sys %wio %idle
22:35:21 27 1 1 71
#

How could I run the external command and capture the %wio and $idle? Thanks for any help.
 
Perfect. Thanks. Here is how I used it:

input through value("sar 5") no-echo.
repeat:
import unformatted w-sar.
end.
input close.

assign
w-idle = int(trim(substr(w-sar,36,5)))
w-iowait = int(trim(substr(w-sar,28,5)))
.
 
Back
Top