ipcs简单介绍

ipcs简单介绍ipcs 是一个 uinx linux 的命令 用于报告系统的消息队列 信号量 共享内存等 1 列出所有的 ipcs 参数 a nbsp nbsp nbsp 他是默认选项及 ipcs 等效于 ipcs a root test ipcs aSharedMemor nbsp nbsp nbsp nbsp nbsp nbsp nbsp shmid nbsp nbsp nbsp nbsp nbsp owner nbsp nbsp nbsp nbsp nbsp perms

 

ipcs是一个uinx/linux的命令。用于报告系统的消息队列、信号量、共享内存等

1、列出所有的ipcs参数: -a

    他是默认选项及ipcs等效于ipcs -a

[root@test ~]# ipcs -a

—— Shared Memory Segments ——–
key        shmid      owner      perms      bytes      nattch     status     
0x00000000 0          root       644        52                             
0x00000000 32769      root       644        16384                          
0x00000000 65538      root       644        268                            



—— Semaphore Arrays ——–
key        semid      owner      perms      nsems    
0x00000000 0          root       600              
0x00000000 98305      root       600              
0x000000a7      root       600              



—— Message Queues ——–
key        msqid      owner      perms      used-bytes   messages

2、列出进程中的消息队列: -q

当前范例中为空
[root@test ~]# ipcs -q

—— Message Queues ——–
key        msqid      owner      perms      used-bytes   messages

3、列出所有的信号量: -s

[root@test ~]# ipcs -s

—— Semaphore Arrays ——–
key        semid      owner      perms      nsems    
0x00000000 0          root       600              
0x00000000 98305      root       600              
0x000000a7      root       600        1



4、列出所有的共享内存信息: -m
[root@test ~]# ipcs -m

—— Shared Memory Segments ——–
key        shmid      owner      perms      bytes      nattch     status     
0x00000000 0          root       644        52                             
0x00000000 32769      root       644        16384                          
0x00000000 65538      root       644        268            



5、要列出进程更详细信息: -i+pid
[root@test ~]# ipcs -m -i 32769

Shared memory Segment shmid=32769
uid=0   gid=0   cuid=0  cgid=0
mode=0644       access_perms=0644
bytes=16384     lpid=1051       cpid=1047       nattch=2
att_time=Fri Aug 13 09:10:30 2010 
det_time=Fri Aug 13 09:10:30 2010 
change_time=Fri Aug 13 09:10:30 2010





6、列出系统中的限额: -l(列出全部,也可指定要查看的限额)

[root@test ~]# ipcs -l

—— Shared Memory Limits ——–
max number of segments = 4096
max seg size (kbytes) = 32768
max total shared memory (kbytes) =
min seg size (bytes) = 1



—— Semaphore Limits ——–
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767




—— Messages: Limits ——–
max queues system wide = 998
max size of message (bytes) = 8192
default max size of queue (bytes) = 16384


7、列出创建者以及属主的uid和gid: -c

[root@test ~]# ipcs -c

—— Shared Memory Segment Creators/Owners ——–
shmid      perms      cuid       cgid       uid        gid      
         644        root       root       root       root     
32769      644        root       root       root       root     
65538      644        root       root       root       root     



—— Semaphore Arrays Creators/Owners ——–
semid      perms      cuid       cgid       uid        gid      
         600        root       root       root       root     
98305      600        root       root       root       root     
     600        root       root       root       root     



—— Message Queues: Creators/Owners ——–
msqid      perms      cuid       cgid       uid        gid

8、列出最后的访问时间: -t

[root@test ~]# ipcs -t

—— Shared Memory Attach/Detach/Change Times ——–
shmid      owner      attached             detached             changed            
         root       Aug 13 09:10:30      Aug 13 09:10:30      Aug 13 09:10:30    
32769      root       Aug 13 09:10:30      Aug 13 09:10:30      Aug 13 09:10:30    
65538      root       Aug 13 09:10:30      Aug 13 09:10:30      Aug 13 09:10:30    



—— Semaphore Operation/Change Times ——–
semid    owner      last-op                    last-changed             
       root        Fri Aug 13 09:10:19 2010   Fri Aug 13 09:10:16 2010 
98305    root        Fri Aug 13 09:10:24 2010   Fri Aug 13 09:10:20 2010 
   root        Fri Aug 13 09:10:32 2010   Fri Aug 13 09:10:30 2010 



—— Message Queues Send/Recv/Change Times ——–
msqid    owner      send                 recv                 change

9、列出创建者和对应的进程id: -p 
[root@test ~]# ipcs -p

—— Shared Memory Creator/Last-op ——–
shmid      owner      cpid       lpid     
         root       1047       1051     
32769      root       1047       1051     
65538      root       1047       1051



10、列出当前的使用状况: -u

[root@test ~]# ipcs -u

—— Shared Memory Status ——–
segments allocated 3
pages allocated 6
pages resident  6
pages swapped   0
Swap performance: 0 attempts     0 successes




—— Semaphore Status ——–
used arrays = 3
allocated semaphores = 3

—— Messages: Status ——–
allocated queues = 0
used headers = 0
used space = 0 bytes


 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/221636.html原文链接:https://javaforall.net

(0)
上一篇 2026年3月17日 下午5:38
下一篇 2026年3月17日 下午5:38


相关推荐

  • 汉字与 Unicode 转换

    汉字与 Unicode 转换

    2021年8月31日
    53
  • android 存储作假,对《纯活人伪造一个Android Killer或APK IDE或apktool反编译失败》的一点讨论…

    android 存储作假,对《纯活人伪造一个Android Killer或APK IDE或apktool反编译失败》的一点讨论…法王遇到的问题平时也遇到过 作为小白 也想参与讨论一下心得 奈何不知道怎么在回帖的时候插入图片 所以另起一个帖子 遇到的这个问题 个人觉得其实是反编译软件对多 dex 的 app 支持的问题 具体问题是插件本身不支持 还是插件已经支持了 但软件本身没有更新不支持 因为知识储备不够 无法得出结论 一 测试 androidkille 反编译结果 1 jpg 88 67KB 下载次数 0 2018 1

    2025年10月15日
    6
  • Matlab imfilter函数

    Matlab imfilter函数imfilter 函数 imfilter 函数是对图像进行滤波的函数 matlab 语句格式为 B imfilter A h 使用多维滤波器 hhh 对多维数组 AAA 进行滤波 并在 BBB 中返回结果 B imfilter A h options 根据一个或多个指定的选项进行多维滤波 options 控制滤波运算的选项有 选项说明填充选项数值标量 xxx 边界之外的输入数组值被赋予值 xxx 默认值为 0 symmetric 边界之外的输入数组值是通过沿数组边界对数

    2026年3月18日
    2
  • pycharm使用虚拟环境_pycharm配置虚拟环境

    pycharm使用虚拟环境_pycharm配置虚拟环境Pipenv,它的项目简介为PythonDevelopmentWorkflowforHumans,是Python著名的requests库作者kennethreitz写的一个包管理工具,它可以为我们的项目自动创建和管理虚拟环境并非常方便地管理Python包,现在它也已经是Python官方推荐的包管理工具。溯源起初,Python没有便利的方式来安装软件包。后来,Easy…

    2022年8月27日
    14
  • 探索Python与文心一言的交互:构建智能对话系统新实践

    探索Python与文心一言的交互:构建智能对话系统新实践

    2026年3月12日
    2
  • Python和Pycharm安装requests库

    Python和Pycharm安装requests库1 Python 安装 requests 和之前安装 tkinter 一样 在 cmd 命令行中输入 pip3installr 命令 会自动安装 2 Pycharm 安装 requests 步骤和安装 tkinter 一样 在 setting 中选择 project 选项 点击加号 进行 requests 搜索安装 3 requestsrequ 用来网络爬虫 可以向目标网站发送 HTTP 请求 而目标网站会响应请求 requests 可以把返回的内容进行解析 清洗 入数据库

    2026年3月18日
    2

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号