disk

Diskpart script to remove all partitions [closed]

百般思念 提交于 2019-12-11 04:45:12
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 12 months ago . I'm trying to make a Diskpart script that takes in a value of a drive letter, and then deletes all the partitions of the corresponding device of that drive letter. The script that I currently have is select Disk 1 select partition 0 delete partition select partition 1 delete partition but the obvious problem

Win32 API P-Invoke to bring a disk online, offline, and set unique ID

风格不统一 提交于 2019-12-10 23:40:16
问题 I am currently using Diskpart to accomplish these functions, but i would like to be able to use P-Invoke and not have to shell out to an external process in my C# app. The example Diskpart scripts are: //Online a disk Select disk 7 disk online // Reset GPT Identifier select disk 7 UNIQUEID DISK ID=baf784e7-6bbd-4cfb-aaac-e86c96e166ee I tried searching pinvoke.net but could only find functions that dealt with volumes, not disks. Any idea on how to accomplish these diskpart commands using

Small file not committed to disk for over a minute

不打扰是莪最后的温柔 提交于 2019-12-10 17:34:30
问题 I have an embedded Linux app that writes to a file at a fairly slow rate ( 50 bytes/s or so). The file is on a hard drive, XFS filesystem. The file is being written to by calling write() , not fwrite() . If I power-cycle the system and check the file, over a minute's worth of data is missing. I thought the default Linux behaviour was to sync the disk cache every 5s (I can tolerate 5s worth of missing data so they'd be no problem with this). What should I be checking to see why it isn't

Disk cylinder service requests algorithms

╄→尐↘猪︶ㄣ 提交于 2019-12-09 18:48:13
问题 Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. The drive is currently serving a request at cylinder 143, and the previous request was at cylinder 125. The queue of pending requests, in FIFO order, is 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130 Starting from the current head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests, for each of the following disk-scheduling algorithms --> C-SCAN and C-LOOK I have made

Can I use WMI to find the network usage by each process?

不羁岁月 提交于 2019-12-09 12:01:10
问题 I'd like to use WMI on some windows systems to poll the network usage of each process. From what I can tell, there are many IO instances in the Win32_PerfRawData_PerfProc_Process but they are for the combined IO of network,disk,and device. Is there a way to break that up so I can get network and disk IO separate? 来源: https://stackoverflow.com/questions/376541/can-i-use-wmi-to-find-the-network-usage-by-each-process

Flush disk write cache from Windows CLI

杀马特。学长 韩版系。学妹 提交于 2019-12-09 08:54:05
问题 Does anyone know how to flush the disk write cache data from the cache manager for the current directory (or any given file or directory, for that matter), from a Windows command line? 回答1: I found the SysInternals Sync worked well for me - although it flushes ALL cache, not just for the specific folder. Example of usage: IF EXIST Output RD /S /Q Output && Sync && MD Output By default it flushes all cached data for all drives - you can specify command-line options to restrict which drives but

Identifying CDs

江枫思渺然 提交于 2019-12-09 00:38:11
问题 I'd like to be able to determine what music album CD is in a CD drive. For example, if someone claims that the CD in their drive is Eminem - The Eminem Show, I would like to be able to verify that the CD is indeed The Eminem Show. Any ideas? I've applied for a Gracenote developer license, but they won't get back to me for five days. Also, how does this work? Is there some GUID or other unique identifier that music discs are encoded with? Lastly, might this be possible with data CDs, like, say

Backing up, Deleting, Restoring Elasticsearch Indexes By Index Folder

与世无争的帅哥 提交于 2019-12-08 21:47:52
问题 Most of the ElasticSearch documentation discusses working with the indexes through the REST API - is there any reason I can't simply move or delete index folders from the disk? 回答1: You can move data around on disk, to a point - If Elasticsearch is running, it is never a good idea to move or delete the index folders, because Elasticsearch will not know what happened to the data, and you will get all kinds of FileNotFoundExceptions in the logs as well as indices that are red until you manually

How to stop page cache for disk I/O in my linux system?

房东的猫 提交于 2019-12-08 06:19:40
问题 Here is my system based on Linux2.6.32.12: 1 It contains 20 processes which occupy a lot of usr cpu 2 It needs to write data on rate 100M/s to disk and those data would not be used recently. What I expect: It can run steadily and disk I/O would not affect my system. My problem: At the beginning, the system run as I thought. But as the time passed, Linux would cache a lot data for the disk I/O, that lead to physical memory reducing. At last, there will be not enough memory, then Linux will

Random value for disk Signature [closed]

烂漫一生 提交于 2019-12-08 05:46:22
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . As part of a machine identification system, I'm looking for the Signature of the Win32_DiskDrive. On two customer's machines now, I've seen this field have a random value. I assume that is due to not having checked the HRESULT in the shipped code. What would cause a machine to not have a valid signature? WQL