disk

Dump a process's entire state to disk and load back when required

女生的网名这么多〃 提交于 2019-12-23 04:28:49
问题 I have a c# application that accepts jobs based on multiple events Like file watcher, time based events etc. But an time would come in the life cycle of the application that it would process resources partially, take them in the RAM. And then will wait for an event to happen. But until that event the process would hold the 1.2 GB RAM(say). In this time the process cannot be killed and this process has to accept more jobs. My question: Can we dump the entire state of this process to the disk

Is it possible to get special Local Disk information from PHP?

前提是你 提交于 2019-12-22 13:30:55
问题 I am running my PHP code on my local computer,So ,I just want to know the PHP has any functions to get the local hard disk information.Such as the disk name , disk space,free space available .etc. Thank you very much!! 回答1: In addition, yes, it is possible to retrieve this information, because you can execute commands. There are a few PHP functions to retrieve information about the disk as well, check out the following links: disk_total_space( $directory ); disk_free_space( $directory );

How can I show an image in webBrowser control directly from memory?

白昼怎懂夜的黑 提交于 2019-12-22 05:42:07
问题 How can I show an image in webBrowser control directly from memory instead of hard disk? When I use RAM Disk software to create a virtual drive, it is possible to address an image source to load it like this: img src = "Z:/image.jpg" that Z is a RAM Disk drive. Is it possible to do that in .NET programmaticly? or use MemoryStream to do that? I would really appreciate some suggestions about this. 回答1: You can encode the image in base64. For example <img src="data:image/gif;base64

Generate disk usage graphs/charts with CLI only tools in Linux

本秂侑毒 提交于 2019-12-22 04:03:32
问题 In this question someone asked for ways to display disk usage in Linux. I'd like to take this one step further down the cli-path... how about a shell script that takes the output from something like a reasonable answer to the previous question and generates a graph/chart from it (output in a png file or something)? This may be a bit too much code to ask for in a regular question, but my guess is that someone already has a oneliner laying around somewhere... 回答1: I would recommend munin. It is

Performance issues with hard disk reading

…衆ロ難τιáo~ 提交于 2019-12-21 17:54:38
问题 I have a C++ program which reads files from the hard disk and does some processing on the data in the files. I am using standard Win32 APIs to read the files. My problem is that this program is blazingly fast some times and then suddenly slows down to 1/6th of the previous speed. If I read the same files again and again over multiple runs, then normally the first run will be the slowest one. Then it maintains the speed until I read some other set of files. So my obvious guess was to profile

Bash monitor disk usage

ⅰ亾dé卋堺 提交于 2019-12-21 10:31:50
问题 I bought a NAS box which has a cut down version of debian on it. It ran out of space the other day and I did not realise. I am basically wanting to write a bash script that will alert me whenever the disk gets over 90% full. Is anyone aware of a script that will do this or give me some advice on writing one? 回答1: #!/bin/bash source /etc/profile # Device to check devname="/dev/sdb1" let p=`df -k $devname | grep -v ^File | awk '{printf ("%i",$3*100 / $2); }'` if [ $p -ge 90 ] then df -h

Bash monitor disk usage

浪子不回头ぞ 提交于 2019-12-21 10:30:13
问题 I bought a NAS box which has a cut down version of debian on it. It ran out of space the other day and I did not realise. I am basically wanting to write a bash script that will alert me whenever the disk gets over 90% full. Is anyone aware of a script that will do this or give me some advice on writing one? 回答1: #!/bin/bash source /etc/profile # Device to check devname="/dev/sdb1" let p=`df -k $devname | grep -v ^File | awk '{printf ("%i",$3*100 / $2); }'` if [ $p -ge 90 ] then df -h

Per Process disk read/write statistics in Mac OS X

萝らか妹 提交于 2019-12-20 09:23:25
问题 How do I get programatically per process disk i/o statistics in Mac OS X. In 'Activity Monitor' application or in 'top' command we can only get whole system disk i/o statistics. For reference Similar question asked for PC. 回答1: Use iotop (as root), for example: iotop -C 3 10 But the best way (for me) is: sudo fs_usage -f filesys 回答2: Since there isn't an answer here about how to do this programatically, here's some more info. You can get some info out of libproc if you can use C/C++

How to load LUKS passphrase from USB, falling back to keyboard?

假如想象 提交于 2019-12-20 08:49:54
问题 I want to set up a headless Linux (Debian Wheezy) PC with whole disk encryption, with the ability to unlock the disk either with a USB drive, or by entering a passphrase by keyboard. My starting point is a fresh install using the basic whole disk encryption option in the Debian Installer, which manages everything besides /boot as a LUKS-encrypted logical volume group and gives me the keyboard option. I will describe my current solution in an answer, in hopes that it will be useful and that

VHD Java library

余生颓废 提交于 2019-12-20 03:59:08
问题 I'm looking for a Java library that can open .vhd files. I wants to create a program that can navigate inside it. I also want it to be cross-platform. I have googled for an library a while now but found nothing. I did only find an old unanswerd question here on stack overflow. Can anyone help me? 回答1: Consider libguestfs. libguestfs is a C library, but it has a Java binding. It claims to be cross-platform, working on Linux and Mac OS X, and "[s]ome virt tools have been ported to Windows".