hard-drive

Finding what hard drive sectors occupy a file

守給你的承諾、 提交于 2019-12-09 06:07:45
问题 I'm looking for a nice easy way to find what sectors occupy a given file. My language preference is C#. From my A-Level Computing class I was taught that a hard drive has a lookup table on the first few KB of the disk. In this table there is a linked list for each file detailing what sectors that file occupies. So I'm hoping there's a convinient way to look in this table for a certain file and see what sectors it occupies. I have tried Google'ing but I am finding nothing useful. Maybe I'm not

Perl: write speed mystery?

一笑奈何 提交于 2019-12-08 16:25:49
问题 How can the output rate be higher than hard disk write rate? Update 1 : I have changed the following: Turned off antivirus. No change. Inserted new physical disk and used the first partition for the test. (The disk for the initial test was on the last partition, separate from the system partition, but on the same physical disk.). Result: there is the same cyclic pattern, but the system is no longer unresponsive during the test. The write speed is somewhat higher (could be due to using the

Linux RHEL - Find disk type

醉酒当歌 提交于 2019-12-08 13:04:13
问题 I have Oracle Linux Server release 5.6 (Red Hat Enterprise Linux Server release 5.6) and I want to check if the disk type is SATA, SCSI, ATA or SAS or any other disk type. I installed lshw (hardware lister) and executing "lshw -class storage" gives the below output description: SCSI storage controller product: 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI vendor: LSI Logic / Symbios Logic physical id: 10 bus info: pci@0000:00:10.0 logical name: scsi0 version: 01 width: 64 bits clock: 33MHz

AS3 stage screen shot to hard drive save

青春壹個敷衍的年華 提交于 2019-12-08 11:54:13
问题 I'm working on a drag and drop Flash game, after you place all the movable pieces I want to have a button that allows a person to save a screen shot of the entire stage. I searched different samples and cant get this code to work. Here is the AS3 snap_btn.addEventListener(MouseEvent.CLICK, snapShot ); function snapShot( evt:MouseEvent ):void { import com.adobe.images.JPGEncoder; var jpgSource:BitmapData = new BitmapData (stage.width, stage.height); jpgSource.draw(stage); var jpgEncoder

Why do multiple processes slow down?

流过昼夜 提交于 2019-12-08 03:53:09
问题 Not sure this is the best title for this question but here goes. Through python/Qt I started multiple processes of an executable. Each process is writing a large file (~20GB) to disk in chunks. I am finding that the first process to start is always the last to finish and continues on much, much longer than the other processes (despite having the same amount of data to write). Performance monitors show that the process is still using the expected amount of RAM (~1GB), but the disk activity

How can I find hard disk speed

你离开我真会死。 提交于 2019-12-07 19:26:53
问题 How can I find hard disk speed? I can not use System.IO.File.Copy and use timer to get hard disk speed, because after caching file, the speed will be really higher than real time. What can I do instead? 回答1: The reason the subsequent read speed is much higher than expected after writing a file, is that the file is cached by the OS in the disk system cache when it is written i.e. in-memory. The subsequent file read is in effect being read from memory, rather than disk. Please see this code

Is it possible to determine the Win32_DiskDrive SerialNumber of the Environment.SpecialFolder.System drive?

拈花ヽ惹草 提交于 2019-12-06 11:33:46
I've been going around in circles for a bit now, can't seem to find the answer on google either. As the title says, if i get the current drive letter windows is running on, let's say like this: Path.GetPathRoot(Environment.GetFolderPath(Environment.SpecialFolder.System)); Can i then determine its Win32_DiskDrive SerialNumber? I cannot find a way to link them. That is the manufacturer's S/N not the VolumeSerialNumber. Thanks in advance You can use ManagmentObjectSearch combined with ASSOCIATORS OF statement: public static string GetSerialNumber(string logicalDrive) { using (var partitionsQuery

How to read individual sectors/clusters using DeviceIoControl() in Windows?

倖福魔咒の 提交于 2019-12-06 09:33:56
问题 I dropped my laptop while Windows was preparing to hibernate and as a result, I got a head crash on the hard drive. (Teaches me to get a hard drive and/or laptop with a freefall sensor next time around.) Anyway, running SpinRite to try to recover the data has resulted in all the spare sectors on the disk to all be all used up for all the recoverable sectors so far. SpinRite is still going right now, but since there won't be anymore spare sectors to be used, I think it'll be a fruitless

Listing physical drives installed on my computer [duplicate]

て烟熏妆下的殇ゞ 提交于 2019-12-06 08:59:36
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How to list physical disks? What is the "best way" (fastest) C++ way to List physical drives installed on my computer? Is there a boost library to do that? 回答1: use GetLogicalDriveStrings() to retrieve all the available logical drives. #include <windows.h> #include <stdio.h> DWORD mydrives = 100;// buffer length char lpBuffer[100];// buffer for drive string storage int main() { DWORD test =

To protect software by accessing harddisk serial no [closed]

北战南征 提交于 2019-12-06 06:57:12
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I want to get the VB.NET or VB code to access the hard disk serial no when starting the program. It's to help me to protect my own software from people who try to pirate copies. 回答1: In c#, but you get the idea.