Chimaera Posted March 1, 2011 Share Posted March 1, 2011 (edited) Hi all Im busy sorting out some parts of a script that deal with speed like processor and memory etc etc the one i cant find on the forum or in the helpfile is hard drive speed? I need the speed to give an estimation of time for the size of backup that will be transfering so a function or something that gives a variable so i can feed it to an equation that its needed for Does such a thing exist?? Chimaera Edited March 1, 2011 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
flyingboz Posted March 1, 2011 Share Posted March 1, 2011 all sorts of stats available through WMI. Of course, you could always calculate your own as you go. Lots of different metrics for estimating file transfer times; % of bytes, % of files; all pretty much a roll of the dice, esp. if you can't rely on constant b/w, latency, cpu/disk utilizations , etc.. Reading the help file before you post... Not only will it make you look smarter, it will make you smarter. Link to comment Share on other sites More sharing options...
guinness Posted March 1, 2011 Share Posted March 1, 2011 (edited) I asked the same question before. Did a little searching on MSDN about WMI and concluded Win32_DiskDrive / Win32_LogicalDisk don't obtain the Disk Speed. I also did a little bit of "Internet Searching" and found an example on Stackflow in C# (not AutoIt I know!)Plus, have a look at by Ascend4nt Edited March 1, 2011 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Chimaera Posted March 1, 2011 Author Share Posted March 1, 2011 expandcollapse popup$wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $colItems = "" $strComputer = "localhost" $Output="" $Output &= "Computer: " & $strComputer & @CRLF $Output &= "==========================================" & @CRLF $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_PerfRawData_PerfDisk_PhysicalDisk", "WQL", _ $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) then For $objItem In $colItems $Output &= "AvgDiskBytesPerRead: " & $objItem.AvgDiskBytesPerRead & @CRLF $Output &= "AvgDiskBytesPerRead_Base: " & $objItem.AvgDiskBytesPerRead_Base & @CRLF $Output &= "AvgDiskBytesPerTransfer: " & $objItem.AvgDiskBytesPerTransfer & @CRLF $Output &= "AvgDiskBytesPerTransfer_Base: " & $objItem.AvgDiskBytesPerTransfer_Base & @CRLF $Output &= "AvgDiskBytesPerWrite: " & $objItem.AvgDiskBytesPerWrite & @CRLF $Output &= "AvgDiskBytesPerWrite_Base: " & $objItem.AvgDiskBytesPerWrite_Base & @CRLF $Output &= "AvgDiskQueueLength: " & $objItem.AvgDiskQueueLength & @CRLF $Output &= "AvgDiskReadQueueLength: " & $objItem.AvgDiskReadQueueLength & @CRLF $Output &= "AvgDisksecPerRead: " & $objItem.AvgDisksecPerRead & @CRLF $Output &= "AvgDisksecPerRead_Base: " & $objItem.AvgDisksecPerRead_Base & @CRLF $Output &= "AvgDisksecPerTransfer: " & $objItem.AvgDisksecPerTransfer & @CRLF $Output &= "AvgDisksecPerTransfer_Base: " & $objItem.AvgDisksecPerTransfer_Base & @CRLF $Output &= "AvgDisksecPerWrite: " & $objItem.AvgDisksecPerWrite & @CRLF $Output &= "AvgDisksecPerWrite_Base: " & $objItem.AvgDisksecPerWrite_Base & @CRLF $Output &= "AvgDiskWriteQueueLength: " & $objItem.AvgDiskWriteQueueLength & @CRLF $Output &= "Caption: " & $objItem.Caption & @CRLF $Output &= "CurrentDiskQueueLength: " & $objItem.CurrentDiskQueueLength & @CRLF $Output &= "Description: " & $objItem.Description & @CRLF $Output &= "DiskBytesPersec: " & $objItem.DiskBytesPersec & @CRLF $Output &= "DiskReadBytesPersec: " & $objItem.DiskReadBytesPersec & @CRLF $Output &= "DiskReadsPersec: " & $objItem.DiskReadsPersec & @CRLF $Output &= "DiskTransfersPersec: " & $objItem.DiskTransfersPersec & @CRLF $Output &= "DiskWriteBytesPersec: " & $objItem.DiskWriteBytesPersec & @CRLF $Output &= "DiskWritesPersec: " & $objItem.DiskWritesPersec & @CRLF $Output &= "Frequency_Object: " & $objItem.Frequency_Object & @CRLF $Output &= "Frequency_PerfTime: " & $objItem.Frequency_PerfTime & @CRLF $Output &= "Frequency_Sys100NS: " & $objItem.Frequency_Sys100NS & @CRLF $Output &= "Name: " & $objItem.Name & @CRLF $Output &= "PercentDiskReadTime: " & $objItem.PercentDiskReadTime & @CRLF $Output &= "PercentDiskReadTime_Base: " & $objItem.PercentDiskReadTime_Base & @CRLF $Output &= "PercentDiskTime: " & $objItem.PercentDiskTime & @CRLF $Output &= "PercentDiskTime_Base: " & $objItem.PercentDiskTime_Base & @CRLF $Output &= "PercentDiskWriteTime: " & $objItem.PercentDiskWriteTime & @CRLF $Output &= "PercentDiskWriteTime_Base: " & $objItem.PercentDiskWriteTime_Base & @CRLF $Output &= "PercentIdleTime: " & $objItem.PercentIdleTime & @CRLF $Output &= "PercentIdleTime_Base: " & $objItem.PercentIdleTime_Base & @CRLF $Output &= "SplitIOPerSec: " & $objItem.SplitIOPerSec & @CRLF $Output &= "Timestamp_Object: " & $objItem.Timestamp_Object & @CRLF $Output &= "Timestamp_PerfTime: " & $objItem.Timestamp_PerfTime & @CRLF $Output &= "Timestamp_Sys100NS: " & $objItem.Timestamp_Sys100NS & @CRLF if Msgbox(1,"WMI Output",$Output) = 2 then ExitLoop $Output="" Next Else Msgbox(0,"WMI Output","No WMI Objects Found for class: " & "Win32_PerfRawData_PerfDisk_PhysicalDisk" ) Endif Then i found this in A1 scriptomatic, i must have missed it last night, mind you it was 2am I havent deleteed any of the outputs yet so you can see the full list Which out of these will be most usefull for what i need? I just need an average speed of transfer for eg 100mb/s so which is the most suitable to give me that figure? i will be doing something like this if data is going through at 100mb/s and you have 5.37GB(5370mb) in theory it will take 53.7 seconds to transfer but we know hard drives rarely perform at a given speed so i just need a rough average speed to calculate against, yes i know this wont be very exact but its a rough figure. and how do i tie it to just one drive ie: $target = "C:\" Thanks for the links guys, i had a look at the C# code and i dont know anything about C# so thats out, and checked Ascend4nt code and geez cant even work out how to run it, to advanced for me If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
guinness Posted March 1, 2011 Share Posted March 1, 2011 (edited) I missed Win32_PerfRawData_PerfDisk_PhysicalDisk in Scriptomatic Use this Function to get an idea in KB/MB/GB >> Func _ByteSuffix($iBytes, $iPlaces = 2) Local $A, $aArray[6] = [" B", " KB", " MB", " GB", " TB", " PB"] While $iBytes > 1023 $A += 1 $iBytes /= 1024 WEnd Return Round($iBytes, $iPlaces) & $aArray[$A] EndFunc ;==>_ByteSuffix About your other questions I am at a loss Edited March 1, 2011 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Chimaera Posted March 1, 2011 Author Share Posted March 1, 2011 Ok that helps thanks m8 Now i just gotta find a way to target one drive only ie C:\ If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
guinness Posted March 1, 2011 Share Posted March 1, 2011 I believe this is a per disk basis and not partition basis, if this is what you are trying to do. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Chimaera Posted March 1, 2011 Author Share Posted March 1, 2011 Yes per disk, but for me it opens and closes 4 times as i have 4 drives and if i use the logical version 6 times.. I need it to just show the targetted drive which makes it more directable with the rest of the code it will be with. eg: $target = "C:\" Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Chimaera Posted March 1, 2011 Author Share Posted March 1, 2011 (edited) Update Had to swop to Win32_PerfRawData_PerfDisk_LogicalDisk due to scores being added together when more than one partition existed Done some benchmarking I have 3 drives Bootable (main drive) OCZ SSD @197 MB/s Bootable Western Digital Raptor @ 69 MB/s Storage drive Non BOOT @ 110.1 MB/s The raptor is very old and suffers a performance hit when you boot the drive and test it = to 60.1 MB/s loss of 9 MB/s, but is quicker accesed from the SSD I cannot get the code to reliably show any of these figures, whilst the drives are booted probably because and its a guess, because although the drive is active its not actually moving files in any quantity from drive to drive. Is there a way to do a test packet of data and retrieve a transfer speed from that??, it would be much simpler. Sort of like create a dummy file of 1mb and transfer it to the second drive then transfer it back and get speeds from the transfer? Any thoughts? Edited March 1, 2011 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Ascend4nt Posted March 1, 2011 Share Posted March 1, 2011 I've added a little ' example to the PDH Performance Counters thread. That may or may not help you. Anytime someone uses WMI with 'Win32_PerfRawData', its a Performance Counter, and all of them should be able to be read through my PDH Performance Counters functions (which are alot faster than WMI). My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
Chimaera Posted March 2, 2011 Author Share Posted March 2, 2011 Thanks for you input Ascend4nt, nice piece of work.. Unfortunatly it wont give me the max possible transfer speed for the drive i need unless i abuse the drive in some way to make the Max Read/Write stats hit the max for a few seconds. And heres me thinking this should be reasonably simple lol Basically before i do a backup report i need a figure (time) that it will take to transfer the amount of data (backup) from their drive to my own. And then those results will give me the overall time for that particular computer, as we know all hard drives vary enormously in speed so i decided that would be the best way to measure it. I started measuring cpu and cores etc but the drive will always be the limitation. Then once i know the fastest it can transfer say 1 MB of data then i can use maths to give me the total time to achieve the backup. Maybe it needs some form of test to stress (gently) the drive like copying a 1mb chunk back and forth a few times to give the time to max the stats between the 2 drives I always use $source and $target for the 2 drives as they are set from a Gui. Then i suppose i would need a $source_test and $target_test variable so i can test them against each other and the lowest speed drive is the figure that i would use for the calculation. Ps this is more like a pre backup check im trying to get working, no data will actually be copied its just a accurate check of, yes madam you have this much data and it will take this long to do the task...do you wish to proceed If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Ascend4nt Posted March 2, 2011 Share Posted March 2, 2011 (edited) My little example can be modified to test at shorter intervals (currently it tests every 1/2 second - you can test at 1/4 or less). I'd suggest you create dummy files of at least 1/2 GB, though the larger the better - and then copy it from/to the drive you want to test. Remember that Windows buffers information so you'll want to create a new dummy file for each test. The tests aren't going to be totally accurate, as different parts of the drive, and fragmentation, can cause differences in speed. You'd need a professional tool that works in different parts of the drive to get a more accurate average, however for simple 'roundabout' figures I don't see any harm to the above. And btw, creating dummy files is pretty easy - you just need to create a file, set the file position to the size you want it (-1 byte), and write a single byte before closing it. (credits to trancexx for that quick and dirty method). Edited March 2, 2011 by Ascend4nt My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
Chimaera Posted March 2, 2011 Author Share Posted March 2, 2011 Thanks for the info Ascend4ntIt dosent need to be dead accurate all i need to know is within a mb either way ish the max read and write of a drive that i point it to C,D etc, i will only need it to focus on just the drives i give it and achieve the figures for the calculation. if the calc is 5 minutes either way it wont matter, its only a projected guess at how long the backup would take to be done.And btw, creating dummy files is pretty easy - you just need to create a file, set the file position to the size you want it (-1 byte), and write a single byte before closing it. (credits to trancexx for that quick and dirty method).I have no idea what this means im still more or less a noob lol If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Ascend4nt Posted March 2, 2011 Share Posted March 2, 2011 For creating a dummy file, see trancexx's post in I suggested that assuming you had more than one hard drive though (doing backups..).If you don't have more than one hard drive however, then I suppose you can create huge amounts of data in memory and write it to the disk (or read it from the disk into memory). I wouldn't know whether Windows buffering and file write-delay features would affect any of this... but even taking that out of the equation, you'll need to make sure you have a large enough amount of space available in memory to read from or write to the given file.The 2+ hard drive scenario made more sense to me, but then I realized the individual drives would each have their own potential speed differences (didn't think that one through). You could make sure you are copying from (or copying to) the fastest hard drive (like a SSD) though.. My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
Chimaera Posted March 2, 2011 Author Share Posted March 2, 2011 (edited) Another point is the drives i will be backing up are customer drives on old pcs, that will be slow and prob some close to dying. [and i will only be bacing up one drive at a time due to slow pcs etc] they wont have SSD's lol, im a gamer thats why i have one but they are rare, ive prob only seen one at work other than mine. Most normal people still come in to buy an 40 or 80GB drive which we dont even sell anymore, and most older laptops are small drives. The finding the speed is for one reason only ...to give me a figure of how long an expected backup will take to do. Thats what this is all for that one calculation.. Thats why i was messing with Win32_PerfRawData_PerfDisk_LogicalDisk because it dosent add drives together like the Win32_PerfRawData_PerfDisk_PhysicalDisk does when it has 2 partitions on one drive it gives a dual result which is no good for my needs. I wish there was a simple way to do the speed but its not looking that way, im just hoping i end up with a function that gives me the figure but i think it will be beyond my talents to achieve it ..time will tell. Chimaera Edited March 2, 2011 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Ascend4nt Posted March 2, 2011 Share Posted March 2, 2011 Thats why i was messing with Win32_PerfRawData_PerfDisk_LogicalDisk because it dosent add drives together like the Win32_PerfRawData_PerfDisk_PhysicalDisk does when it has 2 partitions on one drive it gives a dual result which is no good for my needs.My example can easily be modified to show Logical Disk read/writes, but I think it's best to look at each hard drive as a whole. Otherwise, if another partition is being read/written to at the same time, you'll wind up with a bad representation. However, if you know beforehand that nothing is going to be read/written to the other partitions, then using Logical Disk is a much simpler way, especially if you don't know the hard drive each logical letter is mapped to. My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
johnhusk24 Posted March 23, 2011 Share Posted March 23, 2011 Hello I understand that it might not be the right answer but I carry out hardware testing and I am working with small 2.5" HDD up to 1.5 TB in special shock mounts to protect products. I use test scripts looking at transfer rate ( SATA / USB2 & USB3) using commercial software for HDD benchmarking. Why not adapt a program like this to use autit scripts to control the automation of a set of tests ....just an idea see http://majorgeeks.com/HD_Tune_d4130.html for free software download I use Crystal Disk Mark and others but this is my thoughts on another approach without having to fully understand the different HDD tests and diagnostics for 2 & 3 Platter HDD running at different speed and track densities. good luck regards John Link to comment Share on other sites More sharing options...
Chimaera Posted March 24, 2011 Author Share Posted March 24, 2011 Thanks john ill look into it im really not interested in all the wealth of info that is available on hard drives because the transfer rate is the only factor for me, its a shame there isnt an easy solution, currently ive had to "guess" at a speed so i set a approx figure and work from there all i need my script to do is flick the drive and/or maybe throw a test gig onto it and return the variable of $transfer_speed Other than that i shall have to wait until my coding reaches a level to be able to decipher Ascend4nt's code Thanks to all who contributed Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
johnhusk24 Posted March 24, 2011 Share Posted March 24, 2011 Thanks john ill look into itim really not interested in all the wealth of info that is available on hard drivesbecause the transfer rate is the only factor for me, its a shame there isnt an easy solution, currently ive had to "guess" at a speed so i set a approx figure and work from thereall i need my script to do is flick the drive and/or maybe throw a test gig onto it and return the variable of $transfer_speedOther than that i shall have to wait until my coding reaches a level to be able to decipher Ascend4nt's codeThanks to all who contributedChimaeraDisk Benchmark was the other tool I usesee http://www.softpedia.com/get/System/Benchmarks/Disk-Bench.shtml Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now