Good Morning,
I am working on a script to obtain Avg. Disk Sec/Read & Avg. Disk Sec/Write over an extended period using the tGetData function. Currently I am testing with returning a floating number.
When running the script below, a number of times I get a 0.00000000e+000 value returned. What is this? Sometimes I get values like 0.01259164 or 6.44575821.
What are your thoughts on how to handle the returned value? My understanding is the returned value is in seconds. I am not sure about that as well. I am hoping someone with experiance can weigh on on this as well.
Below is a sample script I threw together for clarity. Thanks for any information, they has always been a very supportive message board.
AddExtender("WWPRC44I.DLL",0,"WWPRC64I.DLL")
FlagIntRet=0
FlagFltRet=1
LogFile="C:\Log\Avg.DiskSec_Read.txt"
GoSub GetCurrentTime
LogFileHandle = FileOpen(LogFile, "Write")
FileWrite(LogFileHandle,"Log Avg DiskSec/Read")
FileClose(LogFileHandle)
FixedDriveList = DiskScan(2)
FixedDriveCnt = ItemCount (FixedDrivelist,@TAB)
For FixedDriveIdx = 1 to FixedDriveCnt
GoSub GetCurrentTime
FixedDrive = ItemExtract(FixedDriveIdx, FixedDriveList, @TAB)
FixedDrive=StrSub(FixedDrive, 1, 1)
LogicalDiskAvgDiskSecRead = tGetData("\LogicalDisk(%FixedDrive%:)\Avg. Disk Sec/Read",FlagFltRet)
LogFileHandle = FileOpen(LogFile, "APPEND")
FileWrite(LogFileHandle, StrCat("%YYYY%-%MM%-%DD% %HH%:%MN%:%SS%, ","LogicalDisk %FixedDrive%, Avg DiskSec/Read: ", LogicalDiskAvgDiskSecRead," s"))
FileClose(LogFileHandle)
Next
Exit
:GetCurrentTime
YYYY= ItemExtract(1,TimeYmdHms(),":")
MM=ItemExtract(2,TimeYmdHms(),":")
DD=ItemExtract(3,TimeYmdHms(),":")
hh=ItemExtract(4,TimeYmdHms(),":")
mn=ItemExtract(5,TimeYmdHms(),":")
ss=ItemExtract(6,TimeYmdHms(),":")
Return