Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools/shmsnoop: Print shmctl command string #5082

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

Rtoax
Copy link
Contributor

@Rtoax Rtoax commented Aug 15, 2024

Print shmctl command:

$ sudo ./shmsnoop.py
PID    COMM        SYS           RET ARGs
16413  writer   SHMGET            31 key: 0xd2032983, size: 4194304, shmflg: 0x3a4 (IPC_CREAT|0644)
16413  writer    SHMAT  7f7f572b8000 shmid: 0x31, shmaddr: 0x0, shmflg: 0x0
16413  writer    SHMDT             0 shmaddr: 0x7f7f572b8000
16418  reader   SHMGET            31 key: 0xd2032983, size: 4194304, shmflg: 0x1a4 (0644)
16418  reader    SHMAT  7f28e81a4000 shmid: 0x31, shmaddr: 0x0, shmflg: 0x0
16418  reader    SHMDT             0 shmaddr: 0x7f28e81a4000
16418  reader   SHMCTL             0 shmid: 0x31, cmd: 0 (IPC_RMID), buf: 0x0
                                                         ^^^^^^^^^^

tools/shmsnoop.py Outdated Show resolved Hide resolved
Print shmctl command:

    $ sudo ./shmsnoop.py
    PID    COMM        SYS           RET ARGs
    16413  writer   SHMGET            31 key: 0xd2032983, size: 4194304, shmflg: 0x3a4 (IPC_CREAT|0644)
    16413  writer    SHMAT  7f7f572b8000 shmid: 0x31, shmaddr: 0x0, shmflg: 0x0
    16413  writer    SHMDT             0 shmaddr: 0x7f7f572b8000
    16418  reader   SHMGET            31 key: 0xd2032983, size: 4194304, shmflg: 0x1a4 (0644)
    16418  reader    SHMAT  7f28e81a4000 shmid: 0x31, shmaddr: 0x0, shmflg: 0x0
    16418  reader    SHMDT             0 shmaddr: 0x7f28e81a4000
    16418  reader   SHMCTL             0 shmid: 0x31, cmd: 0 (IPC_RMID), buf: 0x0
                                                             ^^^^^^^^^^

Signed-off-by: Rong Tao <[email protected]>
@Rtoax Rtoax force-pushed the patch-74-shmsnoop-shmctlcmd branch from 84cf7b9 to 521a0a8 Compare August 21, 2024 00:59
@yonghong-song yonghong-song merged commit 3130fe8 into iovisor:master Aug 21, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants