xmem
xmem r addr: read 4 bytes from address xmem w addr data: write 4 bytes data to address
- xmem
Added to the shell at runtime rather than built in.
Read or write 4 bytes at an address in the
syncdprocess’s own virtual memory. This is not device memory.xmem r <addr>prints0x<addr>: <8 hex digits>.xmem w <addr> <data>stores<data>. Numbers use the shell’s usual integer syntax. The address is used as a 32-bit pointer, so only the low 4 GiB of the 64-bitsyncdprocess can be reached. Any other first word prints the usage and fails.Warning
Reading or writing an unmapped address crashes
syncd, and a write can corrupt it silently. Do not usexmemon a production switch.On SONiC,
xmemis most likely not available at all: typing it should giveUnknown command: xmem. It is registered only when the classic SDK shell starts, and SONiC starts the SAI’sdrivshell>front-end instead (see Accessing the shell).Unvalidated
drivshell> xmem r <addr>Built-in help
xmem r addr: read 4 bytes from address xmem w addr data: write 4 bytes data to address
Further reading