From: Ankit G. <Ank...@me...> - 2014-10-01 05:26:54
|
Thanks a lot Rohan, It works. Regards Ankit On 09/30/2014 10:22 PM, Rohan Garg wrote: > Hi Ankit, > > By restore I’m assuming you mean that DMTCP should restore the deleted > file to > the state it was in at the time of checkpoint. If yes, then you could > try using > the --ckpt-open-files flag with dmtcp_launch. This should save a copy > of all the > files open at the time of checkpoint, and then restores them on > restart, even if > they were deleted. > > Thanks, > Rohan > > On Sep 30, 2014, at 8:51 AM, Ankit Garg <Ank...@me... > <mailto:Ank...@me...>> wrote: > >> Hi, >> I guess it will not work. I tried the following code segment >> >> #include <stdio.h> >> #include <string.h> >> #include <stdlib.h> >> #include <unistd.h> >> #include "dmtcp.h" >> >> int main(int argc, char *argv[]) >> { >> FILE *fp = fopen("msg", "r"); >> printf("Hello world \n"); >> char buff[256]; >> //char s[100]; >> int s = 0; >> //memset(s, 1, sizeof(s)); >> while(1) >> { >> sleep(1); >> printf("S == %d\n", s); >> s++; >> >> if(fgets(buff, 256, fp) != NULL) >> printf("Read value = %s\n", buff); >> if(s == 8) >> { >> if (*dmtcp_checkpoint*() != DMTCP_AFTER_CHECKPOINT) >> printf("Checkpoint Not successful\n"); >> else >> printf("Hurray \n"); >> } >> if(s == 20) >> { >> *unlink*("msg"); >> exit(0); >> } >> } >> } >> >> I got following error on restart >> >> ./dmtcp_restart_script.sh >> *[43000] ERROR at fileconnection.cpp:708 in refill; >> REASON='JASSERT(jalib::Filesystem::FileExists(_path)) failed' >> _path = msg* >> Message: File not found. >> a.out (43000): Terminating... >> >> >> Is there a way above can work ? >> >> >> Regards >> Ankit >> >> >> >> On 09/30/2014 06:09 PM, Ankit Garg wrote: >>> Hi, >>> I want ask whether following application can restored using dmtcp. >>> >>> Consider an application which reads contents from some file and then >>> takes checkpoint in between using *dmtcp_checkpoint* API interface. >>> Now if the end of application this files gets deleted, would >>> restore still work from checkpoint database ? >>> >>> >>> Regards >>> Ankit >>> >> >> >> ------------------------------------------------------------------------------ >> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer >> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports >> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper >> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer >> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk_______________________________________________ >> Dmtcp-forum mailing list >> Dmt...@li... >> https://lists.sourceforge.net/lists/listinfo/dmtcp-forum > |