to see the contents of an export file using date format starting byte xx od -j 452720 -N 100 -tdC -a avant.logto see it in hexa
od -j 452720 -N 100 -txC -a avant.log
exemple d'une session avec dbx:
type=5 len 17 dbtype=12 dbsize 16 prec 0 scale 0 type=5 len 17 dbtype=12 dbsize 16 prec 0 scale 0 ldr file <toto_IAC.ldr> open succesfully par file <toto_IAC.par> open succesfully data file <toto_IAC.dat> open succesfully[1] stopped in print_rowsat line 913 i n file "download2.c" 913 if (ofetch(cda)) (dbx) where print_rows(cda = 0x2000dee8, ncols = 269901028), line 913 in "download2.c" main(argc = 0, argv = (nil)), line 392 in "download2.c" (dbx) list 914 { 915 if (cda->rc == NO_DATA_FOUND) 916 break; 917 if (cda->rc != NULL_VALUE_RETURNED) 918 oci_error(cda); 919 } 920 buffer[0]='\0'; 921 taille=0; 922 for (col = 0; col < ncols ; col++) 923 { (dbx) .... (dbx) l 974 if (convert) 975 osOemToAnsi((LPCSTR)(def [col].buf),(LPSTR)(def[col].buf)); 976 my_write(def[col].buf,retlen); 977 n = desc[col].dbsize - retlen; 978 if (n > 0) 979 my_sprintf "%*c", n, ' '); 980 fprintf(stddbg,"retlen %d n %d taille %d def <%s> buff<%.*s>",retlen,n,taille,def[col].buf,retlen,buffer+taill e-retlen); 981 break; 982 } 983 } (dbx) stop at 978 [4] stop at "download2.c":978 (dbx) status [1] stop in print_rows [4] stop at "download2.c":978 (dbx) cont [4] stopped in unnamed block $b4 at line 978 in file "download2.c" 978 if (n > 0)
gdb [-x gdb_command_file] PROGRAM [CORE]
help breakpoints: (gdb)[break] m4_changequote (gdb)[clear] -> clear breakpoints (gdb)[disable] (bk or auto display (gdb)[condition] assign condition to breakpoint (gdb)[info break] -> give NbOfTime Hited
(gdb)[command] # print ... end (gdb)[command] -> delete end
(gdb)[display] expression (->display it whenever break) (gdb)[info display] (gdb)[wa] watch expression => break whenever expression change (gdb)[info break]
help (runn)ing
(gdb)[run] ^C => break (gdb)until (gdb)[where] cont => continue. (gdb)n [next] Next Line (gdb)s [next] Next C Instuction (gdb)u [until] # (gdb)fin [finish] -> end of function f,s -> end of function next line
(gdb) s Step Inside Procedure (gdb) bt Stack (gdb) fin Execute until end of fn
`frame N' `f N' Select frame number N. Recall that frame zero is the innermost (currently executing) frame, frame one is the frame that called the innermost one, and so on. The highest-numbered frame is the one for `main'. up goto to upper frame i f => info about the frame
Printing source lines && others information
Usage of Print value of expression EXP. =======================================
Variables accessible are those of the lexical environment of the selected stack frame, plus all those whose scope is global or an entire file.
$NUM gets previous value number NUM. $ and $$ are the last two values. $$NUM refers to NUM'th value back from the last one. Names starting with $ refer to registers (with the values they would have if the program were to return to the stack frame now selected, restoring all registers saved by frames farther in) or else to debugger "convenience" variables (any such name not a known register). Use assignment expressions to give values to convenience variables.
{TYPE}ADREXP refers to a datum of data type TYPE, located at address ADREXP. @ is a binary operator for treating consecutive data objects anywhere in memory as an array. FOO@NUM gives an array whose first element is FOO, whose second element is stored in the space following where FOO is stored, etc. FOO must be an expression whose value resides in memory.
EXP may be preceded with /FMT, where FMT is a format letter but no count or size letter (see "x" command).
Examining Data **************
The usual way to examine data in your program is with the `print' command (abbreviated `p'), or its synonym `inspect'. It evaluates and prints the value of an expression of the language your program is written in (*note Using GDB with Different Languages: Languages.).
`print EXP' `print /F EXP' EXP is an expression (in the source language). By default the value of EXP is printed in a format appropriate to its data type; you can choose a different format by specifying `/F', where F is a letter specifying the format; *note Output formats: Output Formats.. set print elements 4000 p /s gChampTexte.gptr->szchamptextedoctexte
`print' `print /F' If you omit EXP, GDB displays the last value again (from the "value history"; *note Value history: Value History.). This allows you to conveniently inspect the same value in an alternative format.
A more low-level way of examining data is with the `x' command. It examines data in memory at a specified address and prints it in a specified format. *Note Examining memory: Memory.
If you are interested in information about types, or about how the fields of a struct or class are declared, use the `ptype EXP' command rather than `print'. *Note Examining the Symbol Table: Symbols.
List of classes of commands: ============================
running -- Running the program stack -- Examining the stack data -- Examining data breakpoints -- Making program stop at certain points files -- Specifying and examining files status -- Status inquiries support -- Support facilities user-defined -- User-defined commands aliases -- Aliases of other commands obscure -- Obscure features internals -- Maintenance commands
(I)nfo: ------- Generic command for showing things about the program being debugged.
List of info subcommands:
(i)nfo set -- Show all GDB settings (i)nfo terminal -- Print inferior's saved terminal status (i)nfo common -- Print out the values contained in a Fortran COMMON block (i)nfo dcache -- Print information on the dcache performance (i)nfo sharedlibrary -- Status of loaded shared object libraries (i)nfo warranty -- Various kinds of warranty you do not have (i)nfo copying -- Conditions for redistributing copies of GDB (i)nfo handle -- What debugger does when program gets various signals (i)nfo signals -- What debugger does when program gets vari1ous signals (i)nfo float -- Print the status of the floating point unit (i)nfo program -- Execution status of the program (i)nfo (al)l-registers -- List of all registers and their contents (i)nfo registers -- List of integer registers and their contents (i)nfo sources -- Source files in the program (i)nfo types -- All type names (i)nfo functions -- All function names (i)nfo variables -- All global and static variable names (i)nfo display -- Expressions to display when program stops (i)nfo address -- Describe where variable VAR is stored (i)nfo line -- Core addresses of the code for a source line (i)nfo source -- Information about the current source file (i)nfo (th)reads -- IDs of currently known threads (i)nfo catch -- Exceptions that can be caught in the current stack frame (i)nfo (ar)gs -- Argument variables of current stack frame (i)nfo locals -- Local variables of current stack frame (i)nfo frame -- All about selected stack frame (i)nfo stack -- Backtrace of the stack (i)nfo watchpoints -- Synonym for ``info breakpoints'' (i)nfo breakpoints -- Status of user-settable breakpoints (i)nfo files -- Names of targets and files being debugged (i)nfo (ta)rget -- Names of targets and files being debugged
(SET): --- set watchdog -- Set watchdog timer set write -- Set writing into executable and core files set check -- Set the status of the type/range checker set language -- Set the current source language set remotedevice -- Set device for remote serial I/O set remotecache -- Set cache use for remote targets set remotebreak -- Set whether to send break if interrupted set remotetimeout -- Set timeout value for remote read set auto-solib-add -- Set autoloading of shared library symbols at startup set loadtype -- Set the type of the remote load protocol set stop-on-solib-events -- Set stopping for shared library events set environment -- Set environment variable value to give the program set args -- Set arguments to give program being debugged when it is started set symbol-reloading -- Set dynamic symbol table reloading multiple times in one run set variable -- Evaluate expression EXP and assign result to variable VAR set radix -- Set default input and output number radices set output-radix -- Set default output radix for printing of values set input-radix -- Set default input radix for entering numbers set print -- Generic command for setting how things print set listsize -- Set number of source lines gdb will list by default set height -- Set number of lines gdb thinks are in a page set width -- Set number of characters gdb thinks are in a line set targetdebug -- Set target debugging
(SET) (P)RINT Generic command for setting how things print.
List of set print subcommands:
set print object -- Set printing of object's derived type based on vtable info set print vtbl -- Set printing of C++ virtual function tables set print static-members -- Set printing of C++ static members set print symbol-filename -- Set printing of source filename and line number wit h <symbol> set print max-symbolic-offset -- Set the largest offset that will be printed in <symbol+1234> form set print address -- Set printing of addresses set print array -- Set prettyprinting of arrays set print union -- Set printing of unions interior to structures set print pretty -- Set prettyprinting of structures set print repeats -- Set threshold for repeated print elements set print null-stop -- Set printing of char arrays to stop at first null char set print elements -- Set limit on string chars or array elements to print set print asm-demangle -- Set demangling of C++ names in disassembly listings set print sevenbit-strings -- Set printing of 8-bit characters in strings as \nn n set print demangle -- Set demangling of encoded C++ names when displaying symbol s
Code Generation: -ansi: strict ansi. -fsigned_char -funsigned_char
Misc Generation. -dm: print stat about memory usage after execution. -E: preprocess -dM: print macro definition in used -P: do not include #line (used with -E) -O: optimize -O2: maximum safe optimize Level: Speed/Size -fthread-jumps
-fdelayed-branch -fcaller-saves: -fforce-mem : -fforce-addr: RISC register/memory optimisation -fomit-frame_pointer: omit frame pointer (canot be debuged) -finline_fonction: inline worth function. -S: generate assembly code Unsafe: -ffast-math: break some IEEE/ANSI to go faster.
-c: compile without linking
-M: autogenerate dependancy #include line for makefile. -MM: only #include ""
-MD: -MMD: same as -M but compile it to (output in file.d)
-H: print include file to stdout.
-o: name output -shared:produce share object
-Wid-clash-len Warn for compiler using short variable name. Wcast-align: warn about alignment. Wwrite-strings default casting of string is const. Wmissing-prototypes global fonction not defined in header file.
FastCompile -pipe: use pipe to use as (work with gas)
Predifined Macros: __unix__. __STRICT_ANSI__ GCC: ansi: __typeof__ typeof __inline__ inline __asm__ asm
See predifined macro: gcc -E -dM empty.c
Predifined macros for sco-unix: #define M_BITFIELDS 1 #define __SCO__ 1 #define __i386__ 1 #define SCO 1 #define __i386 1 #define M_WORDSWAP 1 #define i386 1 #define M_UNIX 1 #define M_SYSV 1 #define M_I386 1 #define __unix 1 #define __unix__ 1 #define M_COFF 1 #define __GNUC__ 2 #define __SCO 1 #define unix 1
0 Process ****************************************************************
ex: ps -ef => tous les process ps -ft p02 => tous les process associés au process ttyp02 Basculer un process en background: <stty> susp ^Z Puis utiliser ^Z
ps -fo args=> arguments of processes ex:
ps egww => show environment variable ex:
<kill> kill -SIGTSTP 25 process => pause kill -SIGCONT 26 process => cont kill -SIGSTOP 24 process => STOPit kill -SIGTERM 15 process => soft kill kill -SIGQUIT 3 process => generate core kill -SIGKILL 9 => hard kill <zonk>
Checking for I/O unbalanced: $iostat
Disks: % tm_act Kbps tps Kb_read Kb_wrtn hdisk0 0.9 3.7 0.8 3991125 6720665 hdisk1 0.5 2.2 0.5 3399296 3037824 hdisk2 0.1 0.8 0.1 1912333 282736 hdisk3 0.2 2.6 0.3 6790472 766852 hdisk4 1.5 18.9 1.2 10294911 44818360 hdisk5 1.2 12.7 1.0 1150167 36084992 hdisk6 0.7 21.6 0.7 23348471 39906708 hdisk11 15.2 139.4 17.5 188141559 219275322 hdisk10 11.8 51.4 14.3 57789179 92322810 hdisk7 1.5 8.2 1.8 602505 23498216 hdisk8 1.9 14.9 2.1 7843795 35560144 hdisk9 0.5 3.9 0.6 3854169 7495464 cd0 0.0 0.0 0.0 0 0You can see that the activity is concentrated on disk 11 and disk 10. There is much more writting than reading on disk 4 and disk 5. It's normal because they are disk used to backup.
Detecting CPU intensive program.
This is a classical of CPU intensive consuption. User sytem (us) + system time (sy) are > 80%. Here they are at 100%.
vmstat 1kthr memory page faults cpu ----- ----------- ------------------------ ------------ ----------- r b avm fre re pi po fr sr cy in sy cs us sy id wa 2 1 74747 320 0 0 3 104 126 0 765 5216 737 63 37 0 0 3 1 74747 324 0 0 1 8 13 0 723 5162 708 63 37 0 0 5 1 74741 338 0 0 0 8 11 0 734 5225 721 67 33 0 0 3 1 74747 323 0 0 0 0 0 0 983 4917 956 70 30 0 0 6 2 74836 326 0 0 2 112 166 0 483 5536 475 61 39 0 0 3 1 74966 184 0 0 0 8 14 0 457 5761 460 55 45 0 0 7 1 74983 121 0 44 0 56 87 0 519 4879 634 58 42 0 0 6 1 75006 243 0 48 14 256 395 0 595 4736 654 61 39 0 0 2 2 74850 350 0 44 0 0 0 0 834 4453 858 69 31 0 0 4 2 75014 276 0 22 31 160 215 0 471 5152 504 50 50 0 0 5 1 75005 191 0 46 0 0 0 0 688 4962 780 66 34 0 0 Here you can see that the machine is CPU saturated You can see too that pi (page in), po (page out), fr (page freed due to page replacement), sr (page scanned) shows that the VM managment is extremely active to swap current process out of memory, to allow less proces to run concurently. It's not trashing wait cy (cycle used by VM) is still = to 0. Having a pi/po different to zero shows that the machine is close to memory saturation. Having CPU>80% for a long period ( >5s) shows that the CPU limit is reached.
ps vg|sort +10 -r|head -n 10
-81 516 - A 36676:45 0 16 4 xx 0 0 75.3 0.0 kproc 20226 - A 22:39 135 352 1452 32768 1526 1048 22.5 0.0 download 28916 - A 22:12 277 400 1500 32768 1526 1048 22.0 0.0 download 40714 - A 21:58 7 476 5340 32768 7851 4808 21.8 1.0 oracleINF 17166 - A 19:36 14 472 5336 32768 7851 4808 19.4 1.0 oracleINF PID TTY STAT TIME PGIN SIZE RSS LIM TSIZ TRS %CPU %MEMCOMMAND 18138 - A 0:23 31 408 4896 32768 7980 4432 4.4 1.0 oracleSGP 15124 - A 625:38 3736 356 4952 32768 7851 4808 1.3 1.0 ora_lgwr_ 7470 - A 40:40 173 3552 376 32768 709 64 0.4 0.0 /u02/app/ 22442 - A 47:20 10 2892 364 32768 709 64 0.4 0.0 /u02/app/ -82 516 - A 36676:45 0 16 4 xx 0 0 75.3 0.0 kproc 20226 - A 22:39 135 352 1452 32768 1526 1048 22.5 0.0 download 28916 - A 22:12 277 400 1500 32768 1526 1048 22.0 0.0 download 40714 - A 21:59 7 476 5340 32768 7851 4808 21.8 1.0 oracleINF 17166 - A 19:36 14 472 5336 32768 7851 4808 19.4 1.0 oracleINF PID TTY STAT TIME PGIN SIZE RSS LIM TSIZ TRS %CPU %MEMCOMMAND 18138 - A 0:23 31 408 4896 32768 7980 4432 4.4 1.0 oracleSGP 15124 - A 625:38 3736 356 4952 32768 7851 4808 1.3 1.0 ora_lgwr_ 7470 - A 40:40 173 3552 376 32768 709 64 0.4 0.0 /u02/app/ 22442 - A 47:20 10 2892 364 32768 709 64 0.4 0.0 /u02/app/
ps -ef|sort +3 -r|head -n 10
root 35480 37780 6 13:45:21 pts/9 0:00 -ksh nobody 29708 5824 1 13:50:34 - 0:00 smbd SGPV 30728 35830 0 16:30:15 - 0:00 ksh 34 root 11532 39690 42 12:16:06 pts/3 0:04 -ksh root 35480 37780 18 13:45:21 pts/9 0:00 -ksh svFT 20226 42238 18 12:09:55 - 22:38 download /v -mtruncate -d /uINFVB data/ascii3 orcl734 40714 1 15 12:09:56 - 21:58 oracleINFV (LOCAL=NO) root 36708 35480 14 13:50:41 pts/9 0:00 ps -ef serte 12936 29574 14 06:56:55 - 0:21 oracleSERT P:4096,3,6, svFT 28916 36080 12 12:09:54 - 22:12 download /v -mtruncate -d /uINFVB data/ascii2 orcl734 17166 1 6 12:09:56 - 19:35 oracleINFV (LOCAL=NO) root 23650 11532 2 13:50:41 pts/3 0:00 sleep 1 root 31626 5824 1 13:49:48 - 0:00 telnetd 33 root 39544 35480 28 13:50:42 pts/9 0:00 ps -ef orcl734 40714 1 28 12:09:56 - 21:58 oracleINFV (LOCAL=NO) root 11532 39690 25 12:16:06 pts/3 0:04 -ksh svFT 20226 42238 16 12:09:55 - 22:39 download /v -mtruncate -d /uINFVB data/ascii3 svFT 28916 36080 15 12:09:54 - 22:12 download /v -mtruncate -d /uINFVB data/ascii2 root 35480 37780 14 13:45:21 pts/9 0:00 -ksh
Note: To enable lock statistics collection, the <bosboot> -L command must be executed.
donne stat sur la VMMsvmon -P
Adresse 0 ou 255= Broadcast
Nota: ping 193.253.042.020<> 193.253.42.20 cela est vrai aussi pour le fichier <hosts>
file n_unixv_debug.htm end of file
Last Update : $Date: Jul 04 2001 22:00:34 $