Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sgautil

sgautil is a small Linux C utility for attaching Oracle SGA shared memory segments read-only and dumping bytes from a target virtual address in a hex/ASCII table.

The tool reads shared memory segment IDs and attach addresses from ./shminfo, attaches each segment with shmat(..., SHM_RDONLY), verifies the requested address range is inside one of the attached segments, and prints the requested bytes.

Repository Contents

  • sgautil.c - command-line utility implementation.
  • sgautil.h - SGA-related structure definitions and function declarations.
  • Makefile - build and clean targets.
  • shminfo - sample/input file containing shared memory IDs and attach addresses.

Requirements

  • Linux with System V shared memory support.
  • A C compiler such as gcc or clang.
  • Permission to inspect the target shared memory segments.

Build

make

This creates the sgautil executable in the repository root.

To remove the binary:

make clean

Configure Shared Memory Segments

Create or update shminfo in the repository root. Each line should contain:

<shmid> <attach_address_hex>

Example:

0 0x60000000
1 0x60c00000
2 0x8fc00000
3 0x90400000

The utility uses this file to attach the listed segments before reading memory.

Usage

./sgautil <address_hex> <size_decimal> [columns]

Arguments:

  • address_hex - target address to read, in hexadecimal.
  • size_decimal - number of bytes to read, in decimal.
  • columns - optional number of bytes per output row. Defaults to 16.

Example:

./sgautil 0x60000000 128

Safety Notes

  • The program attaches shared memory read-only.
  • It exits if the requested address range is outside the attached shared memory ranges.
  • shminfo values are environment-specific. Review them before running against a different database or host.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages