disk

Logback sometimes does not write to the log file, and sometimes does not roll the log file

Sometimes when I launch my java application, logback refuses to write anything to my logfile. Sometimes it also refuses to roll the logfile at midnight (or at the first logging event after midnight), which results in logging events being lost to the void. When i look at my main log file when logbacks has failed to roll the log, it will h...

Python & Cross platform way to list disk drives on Linux, Windows and Mac

I am trying to list the disk drives that a system may have. On Windows, it may be something like "C:/", "D:/", "E:/". On Linux, it may be something like "/boot", "/media/SDCard", etc. And I don't know what it's like on a Mac. Maybe something under /Volumes. Does anyone know of a cross platform way (that is, one which works on Linux,...

Priority Queue which can be stored in disk (JAVA )

I need to implement a application which has a priority queue which has more than 100M records .My problem is I am not able to keep all this data in memory i need to store it into disk . Is there any cache solution where I can store all this message into disk such Berkeley db cache . ...

C# Get file size on disk

var length = new System.IO.FileInfo(path).Length; This gives the logical size of the file, not the size on the disk. I wish to get the size on the disk in C# (preferably without interop) of a file as given by Windows Explorer. Should give the correct size including for: Compressed file Sparse file Fragmented file ...

How does one programmatically mount a drive in Windows?

We make and sell a device that our users will sometimes want to connect to their computer in large quantities with multiple USB hubs. It is a USB composite device that has both human interface (HID) and mass storage (MSD) interfaces. Windows automatically mounts the file-system of each device until it runs out of letters at 'Z:'. I can ...

How to access a data structure from a currently running Python process on Linux?

Hi, I have a long-running Python process that is generating more data than I planned for. My results are stored in a list that will be serialized (pickled) and written to disk when the program completes -- if it gets that far. But at this rate, it's more likely that the list will exhaust all 1+ GB free RAM and the process will crash, lo...

Windows C/C++ Drive Init/Partition/Format

Hi, I am trying to build an application for Windows XP 64bit which is able to detect drives of a particular model in the system, and if they are not initialized & formatted perform these processes. I would also like to be able to query and set the partition information(including the volume label). I have started putting together code ...

How can the block size of a file store be portably obtained in Java 7?

I believe the title says it all. I've looked at java.nio.file.attribute.Attributes and java.nio.file.FileStore, but couldn't find a way to discover the block-size of a disk-file. ...

how is a file represented on a disk

Hello, so I want to ask, and forgive me if this is obvious, or newbie question: if I create a file, say a text file - save it, (I'm using Ubuntu), so this file I have created, has some extra information associated with it, such as, the place on my hard drive where it has been saved. How to examine this information? Where does this inform...

Find System Hard Disk Drive from Python?

I am working on a software installer for my current application. It needs to be installed to the System HDD. How owuld I detect the system drive and return the letter from Python? Would the win32 extensions be useful? How about the os module pre packaged with Python? ...

Getting Disk Size Properly

I am trying to get the physical device size of a connected USB flash drive. I have tried using WMI. ManagementObjectSearcher mosDisks = new ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive WHERE Model = '" + cmbHdd.SelectedItem + "'"); foreach (ManagementObject moDisk in mosDisks.Get()) { lblCa...

OpenFeint disk space footprint

How much size does OpenFeint add to your binary? ...

How to reliably detect disk is down on Linux via Java

Hi. Is there a good way to detect that particular disk went offline on server on Linux, via Java? I have an application, that due to performance reasons, writes to all disks directly (without any RAID in middle). I need to detect if Linux would unmount any disk due to disk crash during run-time, so I would stop using it. The problem i...

How can I increase the I/O queue depth to maximize performance

Disk benchmarks typically have a chart that shows the I/O throughput increasing as the queue depth increases. I'm assuming that what's going on at the hardware level is that the disk controller is reordering the requests to coincide with where the magnetic head happens to be. But how can I increase the queue depth in my own I/O-heavy a...