linux ipcs确定共享内存使用情况
来源:互联网 发布:nlpir java 使用 编辑:程序博客网 时间:2024/06/04 08:43
环境:
[oracle@simpleit ~]$ uname -aLinux simpleit.domain.cn 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:35 EDT 2010 i686 athlon i386 GNU/Linux[oracle@simpleit ~]$ cat /etc/redhat-releaseCentOS release 5.5 (Final)
ipcs确定共享内存的使用情况,该命令用于输出系统中处于active状态的消息队列,共享内存段以及信号量的有关消息。
DESCRIPTION The ipcs utility shall write information about active interprocess communication facili- ties. Without options, information shall be written in short format for message queues, shared memory segments, and semaphore sets that are currently active in the system. Otherwise, the information that is displayed is controlled by the options specified. -b Write information on maximum allowable size. (Maximum number of bytes in messages on queue for message queues, size of segments for shared memory, and number of semaphores in each set for semaphores.) [oracle@simpleit ~]$ ipcs -bipcs: invalid option -- busage : ipcs -asmq -tclup ipcs [-s -m -q] -i id ipcs -h for help.[oracle@simpleit ~]$ ipcs------ Shared Memory Segments --------key shmid owner perms bytes nattch status0xe9b42ad8 2228225 oracle 640 88080384 130x8cdf18fc 2359299 oracle 640 528482304 26------ Semaphore Arrays --------key semid owner perms nsems0xbbe791cc 98304 oracle 640 440x9d085d3c 491521 oracle 640 154------ Message Queues --------key msqid owner perms used-bytes messages[oracle@simpleit ~]$ ipcs -m------ Shared Memory Segments --------key shmid owner perms bytes nattch status0xe9b42ad8 2228225 oracle 640 88080384 130x8cdf18fc 2359299 oracle 640 528482304 26
通常最好让整个SGA处于一个单一的共享内存段,因为跟踪一个以上的段将需要额外的开销,在这些段来回切换也需要时间。可以增加/etc/sysctl.conf文件kernel.shmmax参数值,以增加一个单一的共享内存段的最大尺寸。
# Controls the maximum shared segment size, in bytes
kernel.shmmax = 4294967295
使用ipcs可以查看系统的SGA是否由多个不连续的内存块组成,如果数据库失败,在释放内存时就会出现问题。使用ipcrm命令(仅仅用于在数据库失败之后SGA碎片没有被释放的情况)可以从内存中去除SGA碎片。不要在一个正在运行的数据库中运行ipcrm命令。
ipcrm命令
DESCRIPTION The ipcrm utility shall remove zero or more message queues, semaphore sets, or shared mem- ory segments. The interprocess communication facilities to be removed are specified by the options. Only a user with appropriate privilege shall be allowed to remove an interprocess communi- cation facility that was not created by or owned by the user invoking ipcrm. -q msgid --队列id Remove the message queue identifier msgid from the system and destroy the message queue and data structure associated with it.-m shmid --共享内存id Remove the shared memory identifier shmid from the system. The shared memory segment and data structure associated with it shall be destroyed after the last detach.-s semid --信号量id Remove the semaphore identifier semid from the system and destroy the set of semaphores and data structure associated with it.比如 ipcrm -m 2359299
两条Linux命令彻底杀死Oracle
http://space.itpub.net/519536/viewspace-619787
- linux ipcs确定共享内存使用情况
- 【linux共享内存】ipcs&ipcrm
- free命令查看内存情况/ipcs命令查看共享内存使用情况
- linux ipcs字段含义 共享内存删除 ipcs dest状态
- Linux IPCs - System V 共享内存
- 用 ipcs 管理oracle unix 共享内存
- Oracle Study之--IPCS管理共享内存
- 共享内存linux C/C++代码实战------顺便玩下ipcs, ipcrm, shmget, shmat, shmdt, shmctl
- linux内存使用情况
- Linux 内存使用情况
- linux使用共享内存
- linux 使用共享内存
- Linux使用共享内存
- 共享内存查看清除命令ipcs和ipcrm
- ipcs用于报告系统的消息队列、信号量、共享内存
- 共享内存查看清除命令ipcs和ipcrm
- ipcs命令查看管道,消息队列,共享内存
- 查看共享信息的内存命令——ipcs
- 1860
- webservice+annotation---ONE
- android ics SystemUI详解(一)
- UIC 2010-2012 GSM-R项目
- java 常用命令及参数
- linux ipcs确定共享内存使用情况
- 目标关键词优化的具体思路
- 新年新开始
- 输入一个n,在屏幕上打印出N*N的矩阵(华为面试题)
- OpenGL几何图元和缓冲区(二)
- iPhone开发中经常用到的控件尺寸大集合
- Symbian安装包管理软件----sisWare和sisContent
- 银行业务调度系统的源码
- BitTorrent种子文件的解析 (1)