Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Collecting Shared Memory in core dump Post 302907751 by Perderabo on Tuesday 1st of July 2014 12:59:47 PM
Old 07-01-2014
Quote:
Originally Posted by rupeshkp728
Is there any way through which shared memory or its details can be collected in core and accessed?
Core dump occur as default action of a few signals. The list is available with "man -s7 signal" on RedHat. You could install a signal handler to catch all those signals. It could then display what ever information you want.

One issue to watch for... You may be getting a core dump because you blew the stack. So you will need to use sigaltstack() to provide an alternate stack to use with your handler to guarantee that it can run.
This User Gave Thanks to Perderabo For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

help, what is the difference between core dump and panic dump?

help, what is the difference between core dump and panic dump? (1 Reply)
Discussion started by: aileen
1 Replies

2. UNIX for Dummies Questions & Answers

core dump

does any one have read a core dump? is there any reader for that? or may i know what is the use of that core which takes sometimes memory in GBs? :) (6 Replies)
Discussion started by: sskb
6 Replies

3. UNIX for Dummies Questions & Answers

core dump

Hi , Working on AIX 4.3. An internal error from my apps engine suddenly causes the engine to die. During this time i do notice a core file being dumped in the directory from where I try to re-start my engine. Q is how does one read this core file, or I should say 'what is this core file'? thnx (2 Replies)
Discussion started by: buRst
2 Replies

4. UNIX for Advanced & Expert Users

Shared memory shortage but lots of unused memory

I am running HP-UX B.11.11. I'm increasing a parameter for a database engine so that it uses more memory to buffer the disk drive (to speed up performance). I have over 5GB of memory not being used. But when I try to start the DB with the increased buffer parameter I get told. "Not... (1 Reply)
Discussion started by: cjcamaro
1 Replies

5. UNIX for Dummies Questions & Answers

Core dump in HP-UX..

Hi All I am new for this forum. I have a core file by using gdb and bt cmd I got the function name but I want to the exact cause of the core dump because of I can not reproduse the binary so if any one know the cmd plz plz plz let me know. (0 Replies)
Discussion started by: gyanusoni
0 Replies

6. Programming

core dump

how to view core dumped file using gdb and how to extract information from the coredumped file.can we get similar information from the other utilites like strace or ptrace. (2 Replies)
Discussion started by: Manabhanjan
2 Replies

7. HP-UX

memory fault(core dump)

i am getting memory fault (core dump) in a C program i want to know which statement execution caused it. i tried following things $ gdb generalised_tapinread_mod HP gdb 5.4.0 for HP Itanium (32 or 64 bit) and target HP-UX 11.2x. Copyright 1986 - 2001 Free Software Foundation, Inc.... (2 Replies)
Discussion started by: junaid.nehvi
2 Replies

8. UNIX for Advanced & Expert Users

collecting memory usage by a process

Hi Guys, I work on a AIX environment and I'm trying to write a script where I can collect all the memory used by a process. Basically I'm executing the command 'ps -fu userid' to get all the process ids and then executing the 'ps v PID' to get all the memory allocated by PPID. My question is... (2 Replies)
Discussion started by: arizah
2 Replies

9. Programming

Shared library with acces to shared memory.

Hello. I am new to this forum and I would like to ask for advice about low level POSIX programming. I have to implement a POSIX compliant C shared library. A file will have some variables and the shared library will have some functions which need those variables. There is one special... (5 Replies)
Discussion started by: iamjag
5 Replies

10. Solaris

core dump

Hi guys, just want to know which core file pattern is best to set for core dumps: 1) per-process file name pattern or 2) global file name pattern. I will really appreciate an explanation why the chosen one is better. Thanks a lot guys. (2 Replies)
Discussion started by: cjashu
2 Replies
XShm(3) 							    X FUNCTIONS 							   XShm(3)

NAME
XShmQueryExtension, XShmQueryVersion, XShmPixmapFormat, XShmAttach, XShmDetach XShmCreateImage, XShmPutImage, XShmGetImage, XShmCre- atePixmap, XShmGetEventBase - X Shared Memory extension functions SYNTAX
#include <X11/Xlib.h> #include <sys/ipc.h> #include <sys/shm.h> #include <X11/extensions/XShm.h> Bool XShmQueryExtension( Display *display); Bool XShmQueryVersion( Display *display; int *major, *minor; Bool *pixmaps); int XShmPixmapFormat( Display *display); Bool XShmAttach( Display *display; XShmSegmentInfo *shminfo); Bool XShmDetach( Display *display; XShmSegmentInfo *shminfo); XImage *XShmCreateImage ( Display *display; Visual *visual; unsigned int depth; int format; char *data; XShmSegmentInfo *shminfo; unsigned int width, height); Bool XShmPutImage( Display *display; Drawable d; GC gc; XImage *image; int src_x, src_y, dest_x, dest_y; unsigned int width, height; bool send_event); Bool XShmGetImage ( Display *display; Drawable d; XImage *image; int x, y; unsigned long plane_mask); Pixmap XShmCreatePixmap( Display *display; Drawable d; char *data; XShmSegmentInfo *shminfo; unsigned int width, height, depth); Status XShmGetEventBase( Display *display); STRUCTURES
Events: typedef struct { int type; /* of event */ unsigned long serial; /* # of last request processed by server*/ Bool send_event; /* true if this came from a SendEvent request*/ Display *display; /* Display the event was read from */ Drawable drawable; /* drawable of request */ int major_code; /* ShmReqCode */ int minor_code; /* X_ShmPutImage */ ShmSeg shmseg; /* the ShmSeg used in the request*/ unsigned long offset; /* the offset into ShmSeg used in the request*/ } XShmCompletionEvent; a structure of type XShmSegmentInfo : typedef struct { ShmSeg shmseg; /* resource id */ int shmid; /* kernel id */ char *shmaddr; /* address in client */ Bool readOnly; /* how the server should attach it */ } XShmSegmentInfo; DESCRIPTION
XShmQueryExtension checks to see if the shared memory extensions are available for the specified display. XShmQueryVersion returns the version numbers of the extension implementation. Shared memory pixmaps are supported if the pixmaps argument returns true. XShmAttach tells the server to attach to your shared memory segment. If all goes well, you will get a non-zero status, back and your XImage is ready for use. XShmDetach tells the server to detach from your shared memory segment. XShmPutImage combines an image in memory with a shape of the specified drawable. If XYBitmap format is used, the depth must be one, or a ``BadMatch'' error results. The foreground pixel in the GC defines the source for the one bits in the image, and the background pixel defines the source for the zero bits. For XYPixmap and ZPixmap, the depth must match the depth of the drawable, or a ``BadMatch'' error results. XShmGetImage reads image data into a shared memory XImage where display is the display of interest, drawable is the source drawable, image is the destination XImage, x and y are offsets within the drawable, and plane_mask defines which planes are to be read. XShmCreateImage allocates the memory needed for an XImage structure for the specified display but does not allocate space for the image itself. XShmPixmapFormat gets the format for the server. If your application can deal with the server pixmap data format, a shared memory segment and shminfo structure are created. XShmCreatePixmap points to a pixmap which you can manipulate in all of the usual ways, with the added bonus of being able to edit its con- tents directly through the shared memory segment. XShmGetEventBase gets the completion event value. SEE ALSO
MIT-SHM - The MIT Shared Memory Extension X Version 11 libXext 1.3.1 XShm(3)
All times are GMT -4. The time now is 04:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy