/[gomd]/gomd/daemon/chpoxSupport.cpp
ViewVC logotype

Log of /gomd/daemon/chpoxSupport.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (download) (annotate)
Sticky Tag:

Revision 1.19 - (view) (download) (annotate) - [select for diffs]
Fri Apr 2 17:07:14 2004 UTC (20 years ago) by rejected
Branch: MAIN
CVS Tags: HEAD
Changes since 1.18: +11 -3 lines
Diff to previous 1.18
IN chpoxSupport.h/chpoxSupport.cpp/
     llSupport.h/llSupport.cpp/
     lmsSupport.h/lmsSupport.cpp
(+) now all the support files adopt the standard support-class interface.
For more infos, check the HOWTO_support_class.pdf file in the docs/howto directory.

IN globalInitiliazer.h/globalInitiliazer.cpp
(+) some changes for conformance to the new standard support class-interface.


Revision 1.18 - (view) (download) (annotate) - [select for diffs]
Sat Feb 7 22:32:24 2004 UTC (20 years, 2 months ago) by rejected
Branch: MAIN
Changes since 1.17: +15 -17 lines
Diff to previous 1.17
IN several files
(+) cleanups
(+) comment cleanups (for Doxygen)


Revision 1.17 - (view) (download) (annotate) - [select for diffs]
Sat Feb 7 20:13:50 2004 UTC (20 years, 2 months ago) by rejected
Branch: MAIN
Changes since 1.16: +1 -1 lines
Diff to previous 1.16
IN csCollector.h/csCollector.h
(r) class was renamed globalInitializer (so its purpose is more understandable)

NOTE: This change was propagated to several files


Revision 1.16 - (view) (download) (annotate) - [select for diffs]
Sun Feb 1 20:31:43 2004 UTC (20 years, 2 months ago) by rejected
Branch: MAIN
Changes since 1.15: +3 -3 lines
Diff to previous 1.15
IN chpoxSupport.cpp
(+) in getLibsList() and restoreProcess(): using new format of executeCommandAndReturnChildOutput()

IN chSupport.cpp
(+) added  new info support: "get temp/tm/107"

IN connHandler.cpp
(+) using new format of executeCommandAndReturnChildOutput()

IN scxCheck.cpp
(+) changed tryToExecuteCommand() to support change in utils class

IN utils.h/utils.cpp
(+) in executeCommandAndReturnChildOutput(): added RealTime mode (added a second param)


Revision 1.15 - (view) (download) (annotate) - [select for diffs]
Fri Dec 26 20:59:26 2003 UTC (20 years, 3 months ago) by uid68045
Branch: MAIN
Changes since 1.14: +2 -8 lines
Diff to previous 1.14
IN chpoxSupport.h/chpoxSupport.cpp
(+) now we'll use the new utils::getLocalTime() function to get the current system time


Revision 1.14 - (view) (download) (annotate) - [select for diffs]
Sun Nov 23 21:51:26 2003 UTC (20 years, 5 months ago) by rejected
Branch: MAIN
Changes since 1.13: +61 -0 lines
Diff to previous 1.13
IN chpoxSupport.h/chpoxSupport.cpp
(+) added getListOfAvailableDumps() function to get the list of all available dump files in the CHPOX_DUMP_DIR directory

IN csCollector.cpp
(+) added call to new chpoxSupport::getListOfAvailableDumps() function


Revision 1.13 - (view) (download) (annotate) - [select for diffs]
Mon Nov 17 23:31:55 2003 UTC (20 years, 5 months ago) by rejected
Branch: MAIN
Changes since 1.12: +7 -2 lines
Diff to previous 1.12
IN chpoxSupport.cpp
(+) show ld-chpox output (while restoring a proc)


Revision 1.12 - (view) (download) (annotate) - [select for diffs]
Mon Nov 17 23:18:32 2003 UTC (20 years, 5 months ago) by rejected
Branch: MAIN
Changes since 1.11: +3 -2 lines
Diff to previous 1.11
IN chpoxSupport.cpp
(+) cosmetics


Revision 1.11 - (view) (download) (annotate) - [select for diffs]
Mon Nov 17 22:49:31 2003 UTC (20 years, 5 months ago) by rejected
Branch: MAIN
Changes since 1.10: +90 -9 lines
Diff to previous 1.10
NOTE: proc restore stuff

IN chpoxSupport.h/chpoxSupport.cpp
(+) in registerAndDumpProcess, added integrity check (hint by Eugen Meshcheryakov, chpox team)
(+) added restoreProcess() used to restore a process

IN csCollector.cpp
(+) reworked testRegisterProcess() function: added proc restore test


Revision 1.10 - (view) (download) (annotate) - [select for diffs]
Mon Nov 10 23:03:07 2003 UTC (20 years, 5 months ago) by rejected
Branch: MAIN
Changes since 1.9: +4 -2 lines
Diff to previous 1.9
NOTE: added chpox binding in the daemon

IN chpoxSupport.h/chpoxSupport.cpp
(+) appendToPendingDumpsQueue() now returns a boolean value

IN connHandler.cpp
(+) added new info: [exec] dump/d/106 [PID] to invoke an append on the queue of procs to be registered&dumped.

IN supported_cmds
(+) added new entry for new info: [exec] dump/d/106 [PID] to invoke an append on the queue of procs to be registered&dumped.

IN docs/guide/gomd_user_manual.sxw
(+) added notes about new chpox support
(+) added entry for new info: [exec] dump/d/106 PID
(+) contribs update: added oracle2gomd
(+) gfx reworked
(+) cleanups


Revision 1.9 - (view) (download) (annotate) - [select for diffs]
Fri Nov 7 19:57:31 2003 UTC (20 years, 5 months ago) by rejected
Branch: MAIN
Changes since 1.8: +8 -8 lines
Diff to previous 1.8
IN chpoxSupport.cpp
(+) cosmetics


Revision 1.8 - (view) (download) (annotate) - [select for diffs]
Thu Nov 6 22:37:45 2003 UTC (20 years, 5 months ago) by rejected
Branch: MAIN
Changes since 1.7: +72 -4 lines
Diff to previous 1.7
NOTE: new import for chpoxSupport class (cleanups, start support for default behaviours)

IN chpsupport.conf
(+) added new configuration file sample

IN chpoxSupport.h/chpoxSupport.cpp
(+) added step #9 in run() function. It will invoke the re-appending of a PID if the process is included in the new chpox support configuration map.
(+) added chpox status check in appendToPendingDumpsQueue() function.
(+) added fillChpSupportConfiguration() function to fill the new m_chpSupportConfiguration map.
(+) added printChpSupportConfiguration() fuction to pront the contents of m_chpSupportConfiguration map.
(+) added stringToAutodumpType() functin to convert a string into its equivalent chpox_autodump_t.

IN constants.h
(+) added new constants:
#define CHPOX_DUMP_ONCE 0 => dump once teh process
#define CHPOX_DUMP_PERSISTENT 1 => dump periodically the process
#define CHPOX_ALL_APPS 10 => default behaviour for all apps

IN csCollector.cpp
(+) added calls to new chpoxSupport::fillChpSupportConfiguration() e chpoxSupport::printChpSupportConfiguration() functions (to read the chpox support configuration file)

IN Makefile.with_libgtop/Makefile.no_libgtop
(+) added chpsupport.conf to "make install" and "make cw_install"

IN utils.h/utils.cpp
(+) added stringToLong() function (type #2).


Revision 1.7 - (view) (download) (annotate) - [select for diffs]
Wed Nov 5 00:27:44 2003 UTC (20 years, 5 months ago) by rejected
Branch: MAIN
Changes since 1.6: +92 -8 lines
Diff to previous 1.6
NOTE: new import for chpoxSupport class (function to get the list of migrated procs)

IN chpoxSupport.h/chpoxSupport.cpp
(+) added getListOfMigratedProcs() to get the list of migrated procs


Revision 1.6 - (view) (download) (annotate) - [select for diffs]
Sun Nov 2 22:19:20 2003 UTC (20 years, 5 months ago) by rejected
Branch: MAIN
Changes since 1.5: +37 -3 lines
Diff to previous 1.5
NOTE: new import for chpoxSupport class (now it's a thread with queue of pending dump-requests)

IN chpoxSupport.h/chpoxSupport.cpp
(N) now the class is a thread with a queue of pending proc dumps.
So there ia a single thread that accepts proc-dump calls and executes them in the safest way possible.
(+) added run() function => here is placed the thread stuff.
(+) added appendToPendingDumpsQueue() => used to append a new dump request to the pending-dumps list (the thread periodically checks this list and executes the dumps)

IN csCollector.cpp
(m) modified testRegisterProcess() => now we invoke 5 insertions in proc-dump queue.

IN utils.h/utils.cpp
(f) fixed execCommandAndGetChildOutput() function => this function made the child procs to defunct. Now it's safe. Thanks to Advanced Linux Programming book (free book at http://www.advancedlinuxprogramming.com)


Revision 1.5 - (view) (download) (annotate) - [select for diffs]
Sun Nov 2 12:33:05 2003 UTC (20 years, 5 months ago) by rejected
Branch: MAIN
Changes since 1.4: +92 -31 lines
Diff to previous 1.4
NOTE: mayor update for chpoxSupport class

IN chpoxProc.cpp
(m) change from CHPOX_MAX_DUMPS to CHPOX_MAX_DUMPS_PER_PROCESS

IN chpoxSupport.h/chpoxSupport.cpp
(+) added dumpRegisteredProces() function => this function invoked process dump (==checkpointing).
(+) in registerProcess() function => lots of changes (clenaups, checkpoint call, check is dump file was correctly generated, wait before checking for dump file,...)
(+) in printRegisteredProcList() => cosmetics
(+) tons of comments.

IN constants.h
(+) added #define CHPOX_DUMP_SIGNAL (signal id for checkpointing)
(m) changed #define CHPOX_MAX_DUMPS to CHPOX_MAX_DUMPS_PER_PROCESS
(m) changed #define CHPOX_DUMP_DIR /var/tmp to /tmp

IN csCollector.h/csCollector.cpp
(+) now the user will be asked for a valid PID to test the testRegisterProcess() function.

OUTPUT EXAMPLE:

[...]

***************************************
*    TESTING CHPOX SUPPORT (ALPHA)    *
***************************************

[TST]: this code is experimental! :)
[TST]: please enter the PID of process to be checkpointed: 17719

[TST]: round #1
[TST]: try registering process with pid=17719
[CHP]: pid: [17719] cmdline: [/bin/bash]
[CHP]: registering the libs needed by program /bin/bash.
       => /lib/libdl.so.2
       => /lib/libc.so.6
       => /lib/ld-linux.so.2
[CHP]: the program needs 3 libs.
[CHP]: registering the app....
       => 17719:31:9:/tmp/bash_20031102_123131_17719.dump
[CHP]: dump signal (31) succesfully sent to target process (pid=17719)
[CHP]: wait 10 seconds before continuing...
[CHP]: dump file correctly created (file=/tmp/bash_20031102_123131_17719.dump)
[CHP]: added a new entry to the list of registered procs.
[CHP]: number of saved dumps for the registered proc: 1
[CHP]: the list of registered procs contains 1 entries.

[TST]: round #2
[TST]: try registering again process with pid=17719
           to test the saved-procs linked list.
[CHP]: pid: [17719] cmdline: [/bin/bash]
[CHP]: registering the libs needed by program /bin/bash.
       => /lib/libdl.so.2
       => /lib/libc.so.6
       => /lib/ld-linux.so.2
[CHP]: the program needs 3 libs.
[CHP]: registering the app....
       => 17719:31:9:/tmp/bash_20031102_123141_17719.dump
[CHP]: dump signal (31) succesfully sent to target process (pid=17719)
[CHP]: wait 10 seconds before continuing...
[CHP]: dump file correctly created (file=/tmp/bash_20031102_123141_17719.dump)
[CHP]: proc yet registered.
[CHP]: updated the proc entry.
[CHP]: number of saved dumps for the registered proc: 2

[TST]: round #3
[TST]: try registering again process with pid=17719
           to test the saved-procs linked list.
[CHP]: pid: [17719] cmdline: [/bin/bash]
[CHP]: registering the libs needed by program /bin/bash.
       => /lib/libdl.so.2
[CHP]: the program needs 1 libs.
[CHP]: registering the app....
       => 17719:31:9:/tmp/bash_20031102_123151_17719.dump
[CHP]: dump signal (31) succesfully sent to target process (pid=17719)
[CHP]: wait 10 seconds before continuing...
[CHP]: dump file correctly created (file=/tmp/bash_20031102_123151_17719.dump)
[CHP]: proc yet registered.
[CHP]: updated the proc entry.
[CHP]: number of saved dumps for the registered proc: 3

[TST]: results...
[TST]: you should see just one entry with 3 dumps
       => Entry #1
          Required libs (3 libs found):
          - /lib/libdl.so.2
          - /lib/libc.so.6
          - /lib/ld-linux.so.2
          Dump filenames (3 dump files found):
          - /tmp/bash_20031102_123131_17719.dump
          - /tmp/bash_20031102_123141_17719.dump
          - /tmp/bash_20031102_123151_17719.dump

[TST]: notice we waited 10 seconds between a round and another one.
[TST]: test end.


Revision 1.4 - (view) (download) (annotate) - [select for diffs]
Sun Nov 2 00:39:50 2003 UTC (20 years, 5 months ago) by rejected
Branch: MAIN
Changes since 1.3: +1 -1 lines
Diff to previous 1.3
IN chpoxSupport.cpp
(+) fixed stupid bug (erroneous size returned for the list of saved procs)


Revision 1.3 - (view) (download) (annotate) - [select for diffs]
Sun Nov 2 00:27:56 2003 UTC (20 years, 5 months ago) by rejected
Branch: MAIN
Changes since 1.2: +136 -46 lines
Diff to previous 1.2
NOTE: new import for chpoxSupport class (added check for yet
registered procs)

IN chpoxProc.h/chpoxProc.cpp
(+) added setRequiredLibs() function to set the libs required by the program
(+) added setNewDump() function to add a new dump to the list of dump filenames.

IN chpoxSupport.h/chpoxSupport.cpp
(+) now registerProcess() function can handle also yet registered procs.
(+) added updateList() function: creates a new entry for every new registered process or updates the entry for process already registered.
(+) added printRegisteredProcList() to show the contents of the list of saved (==yet registered) procs.

IN constants.h
(+) added new #define CHPOX_MAX_DUMPS to set a max number of dumps per-process

IN csCollector.h/csCollector.cpp
(+) added testRegisterProcess() from main.cpp file.
(+) testRegisterProcess() now registers three times the INIT process (PID=1) as test.

IN main.cpp
(+) moved testRegisterProcess() to csCollector class.

IN utils.h/util.cpp
(+) added new cloneStringLinkedLists() to copy a string linked list on another one.


(N) EXAMPLE OF USE:
- Launch gomd with --test-chpox/-tc command line option:
# gomd -nd -tc      (-nd is used to block gomd daemonizing)

- Example of output (for the chpox-support test only):
...
***************************************
*    TESTING CHPOX SUPPORT (ALPHA)    *
***************************************

[TST]: this code is experimental! :)

[TST]: round #1
[TST]: try registering INIT process (pid=1)
[CHP]: pid: [1] cmdline: [/sbin/init]
[CHP]: registering the libs needed by program /sbin/init.
       => /lib/libc.so.6
       => /lib/ld-linux.so.2
[CHP]: the program needs 2 libs.
[CHP]: registering the app....
       => 1:31:9:/var/tmp/init_20031102_002433_1.dump
[CHP]: added a new entry to the list of registered procs.
[CHP]: the list of registered procs contains 0 entries.
[CHP]: number of saved dumps for the registered proc: 1

[TST]: round #2
[TST]: try registering again INIT process (pid=1)
           to test the saved-procs linked list.
[CHP]: pid: [1] cmdline: [/sbin/init]
[CHP]: registering the libs needed by program /sbin/init.
       => /lib/libc.so.6
[CHP]: the program needs 1 libs.
[CHP]: registering the app....
       => 1:31:9:/var/tmp/init_20031102_002433_1.dump
[CHP]: proc yet registered.
[CHP]: updated the proc object.
[CHP]: number of saved dumps for the registered proc: 2

[TST]: round #3
[TST]: try registering again INIT process (pid=1)
           to test the saved-procs linked list.
[CHP]: pid: [1] cmdline: [/sbin/init]
[CHP]: registering the libs needed by program /sbin/init.
       => /lib/libc.so.6
[CHP]: the program needs 1 libs.
[CHP]: registering the app....
       => 1:31:9:/var/tmp/init_20031102_002433_1.dump
[CHP]: proc yet registered.
[CHP]: updated the proc object.
[CHP]: number of saved dumps for the registered proc: 3

[TST]: results...
[TST]: you should see just one entry with 3 dumps
       => Entry #1
          Required libs:
          - /lib/libc.so.6
          - /lib/ld-linux.so.2
          Dump filenames:
          - 1:31:9:/var/tmp/init_20031102_002433_1.dump
          - 1:31:9:/var/tmp/init_20031102_002433_1.dump
          - 1:31:9:/var/tmp/init_20031102_002433_1.dump

[TST]: notice the dumps have identical name:
[TST]: this code is really fast (maybe too fast)!!! :))).

(Maybe this is due to Linux time() function)


Revision 1.2 - (view) (download) (annotate) - [select for diffs]
Fri Oct 31 00:32:57 2003 UTC (20 years, 5 months ago) by rejected
Branch: MAIN
Changes since 1.1: +86 -10 lines
Diff to previous 1.1
NOTE: new import for chpoxSupport class

IN chpoxProc.h/chpoxProc.cpp
(+) added new class to save the each registerd proc+libs.

IN chpoxSupport.h/chpoxSupport.cpp
(+) now registerProcess works! This function starts looking for libs needed by a given proc then register the proc and the libs. Then the functions saves the infos about the proc (and libs) in a chpoxProc instance and, finally, adds the new object to a list of registered procs (this list will be used to easily unregister the procs, checks the status,...).

IN constants.h
(+) added new #define CHPOX_REGISTER_MECHANISM "9" and
      #define CHPOX_DUMP_DIR "/var/tmp" constants.

IN main.cpp
(+) added new --test-chpox/-tc command line option to test registering the init proc + all required libs. ;)

IN Makefile.with_libgtop/Makefile.no_libgtop
(+) added new chpoxProc class to compilation line.


Revision 1.1 - (view) (download) (annotate) - [select for diffs]
Thu Oct 30 20:23:11 2003 UTC (20 years, 5 months ago) by rejected
Branch: MAIN
NOTE: new import for chpoxSupport class

IN chpoxSupport.h/chpoxSupport.cpp
(+) added new registerProcess(9 function => ATM is not operational

IN csCollector.h/csColelctor.cpp
(+) added call to chpox::registerProcess for process init (PID=1)

IN scxCheck.h/scxCheck.cpp
(-) moved execCommandAndGetChildOutput() and parseCommand() functions to utils class (as code will be used also by chpoxSupport class)

IN utils.h/utils.cpp
(+) added execCommandAndGetChildOutput() and parseCommand() functions from scxCheck class
(+) added new getFilenamePointedByLink() function to read the filename pointed by a symbolic link.
(+) added new longToString() conversion function


This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26