Servicios

Web hosting
Ver »
Páginas Web
Ver »
Soporte UNIX
Ver »
UNIX TIPS
Ver »

Solaris Modular Debugger Guide

mdb was introduced in Solaris 8 as a replacement for the adb and crash commands
For more details Solaris Modular Debugger Guide 816-5041

Modular Debugger

Besides being able to analyze a core dump in the same way as adb, mdb is a modular debugger which allows the end user to create custom tools and commands to do almost anything.
The modularity of mdb is its main strength. Modules can allow us to look at programs in a number of contexts, both live and post-mortem. These tools are located in loadable modules which can be accessed via dlopen(). These modules are called dmods and include both dcmds (commands) and walkers. ("Walker" commands allow mdb to change the target to a different part of the program structure.)
mdb also has a number of good interactive features, including command line history, editing and logging. In addition, there is a syntax-checking facility and a built-in output pager.

Example: Analyze a core dump

root@ # mdb -k unix.3 vmcore.3
Loading modules: [ unix genunix specfs dtrace ufs sd pcisch ipc md ip hook neti sctp arp usba wrsm fcp fctl nca zfs random cpc sppp ]
> *panicstr/s
> $ < msgbuf
> $ < modules
> $ < cpus
> rootfs $< bootobj, swapfile $ < bootobj, dumpfile $ < bootobj
> $ < traceall
> < sp $ < stacktrace
Display status information about the system or dump being examined by the debugger
> ::status
List available functions
> ::dcmds
Display events in kernel memory allocator transaction log
> ::kmalog
Print Kernel Memory Caches
> ::kmastat
Finding Memory Leaks
> ::findleaks
Finding Corrupt Buffers
> ::kmem_verify
Allocator Logging Facility
> ::kmem_log
Print information about the threads dispatched on the system CPUs
> ::cpuinfo
Print a table of the active processes
> ::ps
Quit the debugger
::quit

Regresar


Random TIPS

COPIA DE ARCHIVOS EN UNA UNIDAD DE CINTA REMOTA (tar y dd)

# tar cvf - * | rsh remote-host dd of=/dev/rmt/0 obs=126b

EXTRAER ARCHIVOS DE UN DISPOSITIVO DE CINTA REMOTO
Inserte la cinta en la unidad de cinta.
Cambie a un directorio temporal.
$ cd /var/tmp
Extraiga los archivos de un dispositivo de cinta remoto.
$ rsh remote-host dd if=/dev/rmt/n | tar xvBpf -

CÓMO COPIAR TODOS LOS ARCHIVOS DE UN DIRECTORIO EN UNA CINTA (cpio)

$ ls -l | cpio -oc > /dev/rmt/0n
Compruebe que los archivos se hayan copiado en la cinta.
$ cpio -civt < /dev/rmt/0n
Cómo recuperar todos los archivos de una cinta (cpio)
Cambie al directorio donde desea colocar los archivos.
Extraiga todos los archivos de la cinta.

$ cpio -icvd < /dev/rmt/0n

free counters