Search Results

Search found 10693 results on 428 pages for 'raw disk'.

Page 62/428 | < Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >

  • Sening a file from memory (rather than disk) over HTTP using libcurl

    - by cinek1lol
    Hi! I would like to send pictures via a program written in C + +. - OK WinExec("C:\\curl\\curl.exe -H Expect: -F \"fileupload=@C:\\curl\\ok.jpg\" -F \"xml=yes\" -# \"http://www.imageshack.us/index.php\" -o data.txt -A \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1\" -e \"http://www.imageshack.us\"", NULL); It works, but I would like to send the pictures from pre-loaded carrier to a variable char (you know what I mean? First off, I load the pictures into a variable and then send the variable), cause now I have to specify the path of the picture on a disk. I wanted to write this program in c++ by using the curl library, not through exe. extension. I have also found such a program (which has been modified by me a bit) #include <stdio.h> #include <string.h> #include <iostream> #include <curl/curl.h> #include <curl/types.h> #include <curl/easy.h> int main(int argc, char *argv[]) { CURL *curl; CURLcode res; struct curl_httppost *formpost=NULL; struct curl_httppost *lastptr=NULL; struct curl_slist *headerlist=NULL; static const char buf[] = "Expect:"; curl_global_init(CURL_GLOBAL_ALL); /* Fill in the file upload field */ curl_formadd(&formpost, &lastptr, CURLFORM_COPYNAME, "send", CURLFORM_FILE, "nowy.jpg", CURLFORM_END); curl_formadd(&formpost, &lastptr, CURLFORM_COPYNAME, "nowy.jpg", CURLFORM_COPYCONTENTS, "nowy.jpg", CURLFORM_END); curl_formadd(&formpost, &lastptr, CURLFORM_COPYNAME, "submit", CURLFORM_COPYCONTENTS, "send", CURLFORM_END); curl = curl_easy_init(); headerlist = curl_slist_append(headerlist, buf); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://www.imageshack.us/index.php"); if ( (argc == 2) && (!strcmp(argv[1], "xml=yes")) ) curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost); res = curl_easy_perform(curl); curl_easy_cleanup(curl); curl_formfree(formpost); curl_slist_free_all (headerlist); } system("pause"); return 0; }

    Read the article

  • How can I get at the raw bytes of the request in WCF?

    - by Gregory Higley
    For logging purposes, I want to get at the raw request sent to my RESTful web service implemented in WCF. I have already implemented IDispatchMessageInspector. In my implementation of AfterReceiveRequest, I want to spit out the raw bytes of the message even (and especially) if the content of the message is invalid. This is for debugging purposes. My service works perfectly already, but it is often helpful when working through problems with clients who are trying to call the service to know what it was they sent, i.e., the raw bytes. For example, let's say that instead of sending a well-formed XML document, they post the string "your mama" to my service endpoint. I want to see that that's what they did. Unfortunately using MessageBuffer::CreateBufferedCopy() won't work unless the contents of the message are already well-formed XML. Here's (roughly) what I already have in my implementation of AfterReceiveRequest: // The immediately following line raises an exception if the message // does not contain valid XML. This is uncool because I want // the raw bytes regardless of whether they are valid or not. using (MessageBuffer buffer = request.CreateBufferedCopy(Int32.MaxValue)) { using (MemoryStream stream = new MemoryStream()) using (StreamReader reader = new StreamReader(stream)) { buffer.WriteMessage(stream); stream.Position = 0; Trace.TraceInformation(reader.ReadToEnd()); } request = buffer.CreateMessage(); } My guess here is that I need to get at the raw request before it becomes a Message. This will most likely have to be done at a lower level in the WCF stack than an IDispatchMessageInspector. Anyone know how to do this?

    Read the article

  • How do you use C++0x raw strings with GCC 4.5?

    - by Rob N
    This page says that GCC 4.5 has C++ raw string literals: http://gcc.gnu.org/projects/cxx0x.html But when I try to use the syntax from this page: http://www2.research.att.com/~bs/C++0xFAQ.html#raw-strings #include <iostream> #include <string> using namespace std; int main() { string s = R"[\w\\\w]"; } I get this error: /opt/local/bin/g++-mp-4.5 -std=gnu++0x -O3 rawstr.cc -o rawstr rawstr.cc:9:19: error: invalid character '\' in raw string delimiter rawstr.cc:9:5: error: stray 'R' in program What is the right syntax for raw strings?

    Read the article

  • Sending a file from memory (rather than disk) over HTTP using libcurl

    - by cinek1lol
    Hi! I would like to send pictures via a program written in C + +. - OK WinExec("C:\\curl\\curl.exe -H Expect: -F \"fileupload=@C:\\curl\\ok.jpg\" -F \"xml=yes\" -# \"http://www.imageshack.us/index.php\" -o data.txt -A \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1\" -e \"http://www.imageshack.us\"", NULL); It works, but I would like to send the pictures from pre-loaded carrier to a variable char (you know what I mean? First off, I load the pictures into a variable and then send the variable), cause now I have to specify the path of the picture on a disk. I wanted to write this program in c++ by using the curl library, not through exe. extension. I have also found such a program (which has been modified by me a bit) #include <stdio.h> #include <string.h> #include <iostream> #include <curl/curl.h> #include <curl/types.h> #include <curl/easy.h> int main(int argc, char *argv[]) { CURL *curl; CURLcode res; struct curl_httppost *formpost=NULL; struct curl_httppost *lastptr=NULL; struct curl_slist *headerlist=NULL; static const char buf[] = "Expect:"; curl_global_init(CURL_GLOBAL_ALL); /* Fill in the file upload field */ curl_formadd(&formpost, &lastptr, CURLFORM_COPYNAME, "send", CURLFORM_FILE, "nowy.jpg", CURLFORM_END); curl_formadd(&formpost, &lastptr, CURLFORM_COPYNAME, "nowy.jpg", CURLFORM_COPYCONTENTS, "nowy.jpg", CURLFORM_END); curl_formadd(&formpost, &lastptr, CURLFORM_COPYNAME, "submit", CURLFORM_COPYCONTENTS, "send", CURLFORM_END); curl = curl_easy_init(); headerlist = curl_slist_append(headerlist, buf); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://www.imageshack.us/index.php"); if ( (argc == 2) && (!strcmp(argv[1], "xml=yes")) ) curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost); res = curl_easy_perform(curl); curl_easy_cleanup(curl); curl_formfree(formpost); curl_slist_free_all (headerlist); } system("pause"); return 0; }

    Read the article

  • Ubuntu raid 1 write errors

    - by Micah
    I have an Ubuntu server set up with two SATA drives in a RAID 1 configuration with MDADM. The machine is used to record raw video, which involves a lot of writing to the disk. Sometimes during video recording the computer will crash, will the following errors in kern.log: Mar 15 10:39:41 video kernel: [414501.629864] ata2.00: exception Emask 0x10 SAct 0x0 SErr 0x400100 action 0x6 Mar 15 10:39:41 video kernel: [414501.629870] ata2.00: BMDMA stat 0x26 Mar 15 10:39:41 video kernel: [414501.629875] ata2.00: SError: { UnrecovData Handshk } Mar 15 10:39:41 video kernel: [414501.629880] ata2.00: failed command: WRITE DMA EXT Mar 15 10:39:41 video kernel: [414501.629889] ata2.00: cmd 35/00:00:28:6d:f6/00:04:06:00:00/e0 tag 0 dma 524288 out Mar 15 10:39:41 video kernel: [414501.629891] res 51/84:b1:77:6e:f6/84:02:06:00:00/e0 Emask 0x30 (host bus error) Mar 15 10:39:41 video kernel: [414501.629896] ata2.00: status: { DRDY ERR } Mar 15 10:39:41 video kernel: [414501.629899] ata2.00: error: { ICRC ABRT } Mar 15 10:39:41 video kernel: [414501.629910] ata2.00: hard resetting link Mar 15 10:39:41 video kernel: [414501.973009] ata2.01: hard resetting link Mar 15 10:39:41 video kernel: [414502.482642] ata2.00: SATA link up 3.0 Gbps (SStatus 123 SControl 300) Mar 15 10:39:41 video kernel: [414502.482658] ata2.01: SATA link down (SStatus 0 SControl 300) Mar 15 10:39:41 video kernel: [414502.546160] ata2.00: configured for UDMA/133 Mar 15 10:39:41 video kernel: [414502.546203] ata2: EH complete Is this the result of faulty drives? Is software RAID just not performant enough for data rates ~15 MB/s, even with a quad-core i7? Thanks for your help. Edit: cat /proc/mdstat returns this: Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] md0 : active raid1 sdb1[1] sda1[0] 976760768 blocks [2/2] [UU] unused devices: <none>

    Read the article

  • How do I convert a Linux disk image into a sparse file?

    - by endolith
    I have a bunch of disk images, made with ddrescue, on an EXT partition, and I want to reduce their size without losing data, while still being mountable. How can I fill the empty space in the image's filesystem with zeros, and then convert the file into a sparse file so this empty space is not actually stored on disk? For example: > du -s --si --apparent-size Jimage.image 120G Jimage.image > du -s --si Jimage.image 121G Jimage.image This actually only has 50G of real data on it, though, so the second measurement should be much smaller. This supposedly will fill empty space with zeros: cat /dev/zero > zero.file rm zero.file But if sparse files are handled transparently, it might actually create a sparse file without writing anything to the virtual disk, ironically preventing me from turning the virtual disk image into a sparse file itself. :) Does it? Note: For some reason, sudo dd if=/dev/zero of=./zero.file works when cat does not on a mounted disk image.

    Read the article

  • How to increase hard drive transfer speed

    - by atif089
    This is my motherboard GA-M61PME-S2 (SATA upto 3.0 Gbps) and This is my Hard Disk Samsung hd502hi Capacity 500 GB Cache 16MB Disks / Heads 1 / 2 Interface SATA 3Gb/s Spindle Speed 5400 RPM Sustained Data Rate OD 100 MB/s Average Seek 8.9 ms Average Latency 5.56 ms Data Transfer Rate 300 MB/sec Weight 470 grams Power: Idle / Seek / R-W / Spin-up 3.9W / 4.8W / 5.1W / ~24W Acoustics (sound power) 2.2 / 2.7 Bel (idle / quiet seek / performance seek) When I copy things from one partition to another they transfer at a maximum of 30 MBps. However the drive supports upto 300 MBps right ? How do I increase the transfer speeds? P.S - Using Windows XP, All partitions are NTFS.

    Read the article

  • Which is faster? 4x10k SAS Drives in RAID 10 or 3x15k SAS Drives in RAID 5?

    - by Jenkz
    I am reviewing quote for a server upgrade. (RHEL). The server will have both Apache and MySQL on it, but the reason for upgrade is to increase DB performance. CPU has been upgraded massively, but I know that disk speed is also a factor. So RAID 10 is faster performance than RAID 5, but how much difference does the drive speed make? (The 15k discs in the RAID 5 config is at the top of my budget btw, hence not considdering 4x15k discs in RAID 10, which I assume would be the optimum.)

    Read the article

  • Partimage and autocheck problem when restoring Windows XP from image

    - by Xolstice
    I'm trying to create an image of Windows XP and clone it to several partitions on the same hard drive using Partimage. I seem to be running into a problem when I restore the image onto another partition - when I boot into the OS from the partition I just restored, it brings up this message during the boot sequence: autochk program not found - skipping autocheck, and then after this, the OS reboots the PC and the whole process repeats itself in an infinite loop. After doing some Google search, it is suggested that this loop was caused by the partition being hidden or the mountmgr.sys file is missing. I checked my configuration and verified that this was not the case. I'm just wondering: Has anyone else experienced this and is there a solution for it? Is this what happens when you try to restore the image to a different partition on the same hard disk or is Partimage itself the problem? Should I be trying out a different partition cloning software?

    Read the article

  • mod_cache serving the wrong content

    - by J. Pablo Fernández
    I'm trying to use mod_disk_cache to speed up a web site that is running on WordPress. Whenever I enable it with CacheEnable disk / and the rest being the stock Ubuntu configuration I start to get the wrong results. When I see the main page it's fine, but when I go to a specific post I get a RSS feed instead. Like if the cache is returning the wrong content. I've disabled my RewriteRules as it seems mod_cache doesn't work with that. I'm not even sure where to start to debug such a thing. Any ideas?

    Read the article

  • Image file can't be opened by windows store app if the file is in the Ext4's external hard disk

    - by ? ?
    My question is described below: I have two disks, external hard disk and removable disk. They are formatted with EXT4. I put the same image in the disks, and use Ext2Fsd to mount the disks. I open the file in win8, and it will default open by the windows store app : photos. It will be success to open if the file is in the Ext4's removable disk. It will be failed to open if the file is in the Ext4's external hard disk. I don't know why it will be failed to open if the file is in the Ext4's external hard disk. Does anyone have similar experiences?

    Read the article

  • Verify server performance

    - by George Kesler
    I'm looking for a quick and SIMPLE way to verify that new servers are performing as expected. The most important metric is disk performance, second is network performance. I’m trying to prevent problems caused by misconfiguration of RAID arrays, NIC teaming etc. The solution should work with both physical and virtual servers. I don’t need sophisticated analysis with different workloads, just one set of benchmarks which I would run against a reference server and later compare to new ones. One problem is that most benchmarks are not giving accurate results when running on a VM.

    Read the article

  • Apache2 BufferedLogs On - anybody using it ?

    - by Qiqi
    Greetings, I am wondering, whether anybody is using BufferedLogs On with Apache2 and found any issues ? Feature is marked as experimental, but for many years now, so I guess it's rather pretty stable. I am running some servers with constrained disk IO capacity at the moment, so I turned it on hoping that even a small benefit could help in the long run ;-) I do have several to several hundreds requests per seconds so by my thoughts there is really no need to write to log after each request, cause honestly I don't think that my filesystem is the best handler for many unnecessary writes. (OCFS2 shared among several DomUs in the Xen)

    Read the article

  • How to increase virtual hard drive space

    - by Chris
    I have a Microsoft Virutal PC hard drive (.vhd format) that's maxed out it's 16 gig hard drive space. What would be the best way to increase this diskspace? Booting into the machine (windows xp professional) and using the disk management snap in, I can see that the virtual drive has approximately 40 more unused gigs of space. Trying to use diskpart, I find out that Windows XP can't extend the boot partition. So I'm at an empass, any suggestions on how to increase the partion or to increase the actual virtual hard drive would be great. Note: The virtual hard drive is running on Windows 7 using XP mode.

    Read the article

  • How can I connect a SAS drive to USB? [closed]

    - by dave
    I have a Dell T710 with Seagate Cheetah 15k.7 SAS disks. If the T710 motherboard dies, I'll need to resort to one of my nightly off-site backups and salvage the journal/logfile from the SAS disk to bring the backup bang up-to-date. I need a way of reading the healthy-but-inaccessible SAS disc that does not depend on the only SAS-capable machine I have to hand. So I bought: SAS to SATA Adapter and: USB 2.0 to SATA Adapter with Power ...so that I could read the SAS drive via USB. I can plug it all together just fine. The chain looks like: USB - SATA - SAS. But the drive does not spin up and the computer doesn't even acknowledge anything being attached by USB. Is there a cheap external enclosure I can buy for SAS drives? I can't believe these USB to SATA adapters are everywhere but the USB to SAS adapters are almost non-existent...

    Read the article

  • Scan dis problem on xp

    - by Sarfraz Ahmed
    hi, I have four drives on my computer. The problem is that each time i start a computer the scan disk check runs for a drive even if i shut down my computer properly. I ran the thorough scandisk check but still for that drive, the scandisk check is always performed no matter what. I wonder what is wrong although everything is fine and accessible along with drive data. Could you guys please help me out of this? I am using Windows XP SP2. Thanks

    Read the article

  • Throughput = BS * IOPS?

    - by Marvin
    I've seen in many places that throughput = bs * iops should be true. For example writing at 128k block size to a SAS disk that can support 190 IOPS should give a throughput of ~23 MBps - 23.75(MBs) = 128(BS)*190(SAS-15 IOPS)/1024. Now when I tested it in a VM against a monster NetApp filer I got theses results: # dd if=/dev/zero of=/tmp/dd.out bs=4k count=2097152 8589934592 bytes (8.6 GB) copied, 61.5996 seconds, 139 MB/s To view the IO rate of the VM I used iostat and esxtop, and they both showed around 250 IOPS. So to my understanding the throughput was supposed to be ~1000k: 1000(KBs) = 4(BS)*250(IOPS). dd of 8GB is twice the size of RAM of course, so no page caching here. What am I missing? Thanks!

    Read the article

  • Data drive disappearing.

    - by Mike Keller
    We have a Windows 2003 R2 server with SP 2 here that randomly loses a partition. There are two partitions the C: and the D: (the one that disappears). When I go into Disk Management the space shows available on the drive but that it isn't formated. There are two drives that are set up in a RAID 1 array. There isn't anything sticking out in the event log as to something triggering this problem and thank god we do daily backups of the data, but it gets kind of annoying to have to go back in there and reformat the partition and restore the data. Any places I can poke around to find the cause of this or even better solutions to the problem would be appreciated.

    Read the article

  • copy boot-able partition

    - by Dima
    I have an disk image with 3 partitions: first partition (hd0,0) is boot-able with GRUB1 with the following configuration GRUB file: default=0 timeout=5 title Bank A root (hd0,1) chainloader +1 title Bank B root (hd0,2) chainloader +1 The partitions (hd0,1) and (hd0,2) are also boot-able. I'm trying to clone partition (hd0,1) to (hd0,2) by creating device map using kpartx and copying whole partition using dd command. The problem is: after partition cloning, the cloned partition did not boot (but all files are OK). What the wrong? I need both partitions to bee identical (I'm using them for fail-over purposes into embedded device)

    Read the article

  • Free, Linux-based rescue CD for Windows machines

    - by Adam Matan
    Hi, Too often, I'm being called to help a friend who screwed a Windows machine by some creative methods. Th usual remedy is backing up the hard drive contents and reinstalling. Right now, this is done by removing the defected hard drive to my machine. I figured out that using a rescue disk running some version of Linux might ease the process. I'm looking for: NTFS access Partition tools Large variety of drivers (Network, Hard drives, etc.) GUI and some rescue wizards a great plus. Any ideas? Adam

    Read the article

  • dd clone hard drive: Input/Output Error though "chkdsk" says OK

    - by unknown (google)
    Hi, I've used dd to clone hard drives before using 'dd' and a live cd, but have run into a problem. The issue: dd fails with an "Input/Output Error" on /dev/sda3 , even though windows "check disk" (chkdsk) says it's ok. Context: Trying to replace my laptop hard drive w/ a faster one of the same size Laptop has NTFS on a 320gb hard drive Booting into knoppix Knoppix recognizes 'original' drive (/dev/sda) I am using a usb connection for ‘new' drive (irrelevant, but just an fyi) Knoppix recognizes the usb drive as /dev/sdb Using dd, as follows: dd if=/dev/sda of=/dev/sdb "dd" gives the I/O error above at 82Gb (out of 320Gb) I then tried checking each partition as follows and found it failed on /dev/sda3: dd if=/dev/sda1 of=/dev/null dd if=/dev/sda2 of=/dev/null dd if=/dev/sda3 of=/dev/null I have ran windows xp chkdsk on the offending drive in both "find only" and "find and fix" mode and it reports no errors Question How can I find and fix the error on my original hard drive partition (i.e. /dev/sda3) so that dd reads it successfully?

    Read the article

  • iSCSI RAID1 on two servers, fail scenario

    - by Franz Kafka
    Hallo, a simple question: Image I have two servers, each server has two disks in RAID1. Now I merge the two arrays with iSCSI to one RAID1 disk. Two questions: Can I do the merging of the 4 disks in one go? I can't image how. First I will have to install the os, and then the raid controller is already set up to RAID1. If a whole server fails the other server would continue working without any problems? Does iSCSI notice that the other server is missing and treet this as if the two disks were broken? When the server comes back online the data is resynced, as if I installed new disks into a array? Can I image that this way? Thanks alot.

    Read the article

  • reducing Windows 7 size

    - by Sejanus
    My Windows 7 uses around 16 GB while Windows XP only around 4 GB hard disk space. Seems weird. I use Windows only for gaming so I dont need a lot of stuff they have to offer. What is the best way to reduce Windows 7 size? What can I delete / uninstall and how? Also I'd like reduce RAM and processor usage as much as possible (as long as it doesnt hurt game performance)... turn off all that fancy stuff and so on. What can I turn off and how? Thanks in advance!

    Read the article

  • How to Mirror or Clone a Spanned Volume in Windows 2008

    - by Matt
    I have a spanned volume (3x6+ TB disks spanned to one 20+ TB volume) that I need to mirror or clone to a new 20+ TB (unspanned) volume. Once mirrored or cloned I'm going to destroy the original volume and reuse the storage elsewhere. Windows 2008 will not allow me to mirror it because the original is a spanned volume. I cannot simply copy the data, because there are sparse files on the volume. So the OS thinks there is 150+ TB used on the disk when there really is only around 18TB used physically. When I try to use the copy command it won't run because it thinks the destination volume needs to be 150+ TB to hold it all. A conundrum, but I figure someone here has the answer. Thanks, Matt

    Read the article

  • perfmon reporting higher IOPs than possible?

    - by BlueToast
    We created a monitoring report for IOPs on performance counters using Disk reads/sec and Disk writes/sec on four servers (physical boxes, no virtualization) that have 4x 15k 146GB SAS drives in RAID10 per server, set to check and record data every 1 second, and logged for 24 hours before stopping reports. These are the results we got: Server1 Maximum disk reads/sec: 4249.437 Maximum disk writes/sec: 4178.946 Server2 Maximum disk reads/sec: 2550.140 Maximum disk writes/sec: 5177.821 Server3 Maximum disk reads/sec: 1903.300 Maximum disk writes/sec: 5299.036 Server4 Maximum disk reads/sec: 8453.572 Maximum disk writes/sec: 11584.653 The average disk reads and writes per second were generally low. I.e. for one particular server it was like average 33 writes/sec, but when monitoring in real-time it would often spike up to several hundreds and also sometimes into the thousands. Could someone explain to me why these numbers are significantly higher than theoretical calculations assuming each drive can do 180 IOPs? Additional details (RAID card): HP Smart Array P410i, Total cache size of 1GB, Write cache is disabled, Array accelerator cache ratio is 25% read and 75% write

    Read the article

< Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >