[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gomd-devel] <DAEMON> chpox-support: correct handling for yet registered
From: |
Gian Paolo Ghilardi |
Subject: |
[gomd-devel] <DAEMON> chpox-support: correct handling for yet registered procs |
Date: |
Sun, 2 Nov 2003 01:42:58 +0100 |
Hi all.
New CVS commit for chpox support.
Now we can correctly handle process yet registered (and saved in a special
linked list).
In the CVS notes (below) I've added an example of test output.
I hope you like this new stuff... ;)
Byez.
<rejected>
<< CVS NOTES >>
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]: 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 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)
- [gomd-devel] <DAEMON> chpox-support: correct handling for yet registered procs,
Gian Paolo Ghilardi <=