04-30-2010
Please add code tags to your previous posting; It is hard to read as is.
What is unclear in my sentence about shared memory segments ?
9 More Discussions You Might Find Interesting
1. Linux
Hello, guys !
Long time no seen. I have a question about Linux web servers. I guess it is a more general question, but in my case it is a Linux web server. I want to know how much RAM memory should I put on my servers. Do you have some formula or guidelines on how should I calculate the amount... (1 Reply)
Discussion started by: Sergiu-IT
1 Replies
2. Solaris
Hi All,
I am trying to find the physical memory usage by each process/users.
Can you please let me know how to get the memory usage?.
Thanks,
bsraj. (12 Replies)
Discussion started by: bsrajirs
12 Replies
3. UNIX for Dummies Questions & Answers
Hi Guys,
How can i check the RAM usage for a particular user on the Linux machine.
What command can be used.
Thanks in advance,
Swapna (1 Reply)
Discussion started by: Swapna173
1 Replies
4. Shell Programming and Scripting
Hi i just wanted to know what is the code to display amount of RAM and also the percentage used? I know i can possibly use the vmstat code but what part indicates the RAM? Any help would be much appreciated. Thanks (1 Reply)
Discussion started by: warlock129
1 Replies
5. AIX
How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies
6. Linux
Hi
one of our applications that runs on our Linux server leaks memory resulting in Ram that was used by the program not being released back to the operating system once a file has been processed. the result is over a very short period virtual all the memory has been used. an example currently
... (8 Replies)
Discussion started by: treds
8 Replies
7. OS X (Apple)
Hey there! I'm a new user here who registered because I couldn't get these kind of questions answered in the place I directly com from. :o
I've found a discrepancy in total RAM used and I can't figure out why it is. My only guess is there are some RAM used by some stuff impossible to identify,... (2 Replies)
Discussion started by: dasx
2 Replies
8. UNIX for Beginners Questions & Answers
grpdsku program allows user to check their group disk space in a server environment. The data in the dialog box queries a text file. Each text file is labeled with a current timestamp. Results output to a msgbox. Also, results output to a csv file. The csv file is sent to the user via email
... (13 Replies)
Discussion started by: dellanicholson
13 Replies
9. UNIX for Advanced & Expert Users
Hello,
I have an ubuntu14.04 installed pc with 32GB ram.
Operating System: Ubuntu 14.04.5 LTS
Kernel: Linux 4.9.148-xxxx-std-ipv6-64
Architecture: x86_64
When I check free memory it shows:
total used free shared buffers cached
Mem: 31882 ... (2 Replies)
Discussion started by: baris35
2 Replies
SHMAT(2) BSD System Calls Manual SHMAT(2)
NAME
shmat, shmdt -- map/unmap shared memory
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <sys/shm.h>
void *
shmat(int shmid, const void *shmaddr, int shmflg);
int
shmdt(const void *shmaddr);
DESCRIPTION
shmat() maps the shared memory segment associated with the shared memory identifier shmid into the address space of the calling process. The
address at which the segment is mapped is determined by the shmaddr parameter. If it is equal to 0, the system will pick an address itself.
Otherwise, an attempt is made to map the shared memory segment at the address shmaddr specifies. If SHM_RND is set in shmflg, the system
will round the address down to a multiple of SHMLBA bytes (SHMLBA is defined in <sys/shm.h>).
A shared memory segment can be mapped read-only by specifying the SHM_RDONLY flag in shmflg.
shmdt() unmaps the shared memory segment that is currently mapped at shmaddr from the calling process' address space. shmaddr must be a
value returned by a prior shmat() call. A shared memory segment will remain in existence until it is removed by a call to shmctl(2) with the
IPC_RMID command.
RETURN VALUES
shmat() returns the address at which the shared memory segment has been mapped into the calling process' address space when successful,
shmdt() returns 0 on successful completion. Otherwise, a value of -1 is returned, and the global variable errno is set to indicate the
error.
ERRORS
shmat() will fail if:
[EACCES] The calling process has no permission to access this shared memory segment.
[ENOMEM] There is not enough available data space for the calling process to map the shared memory segment.
[EINVAL] shmid is not a valid shared memory identifier.
shmaddr specifies an illegal address.
[EMFILE] The number of shared memory segments has reached the system-wide limit.
shmdt() will fail if:
[EINVAL] shmaddr is not the start address of a mapped shared memory segment.
SEE ALSO
ipcrm(1), ipcs(1), mmap(2), shmctl(2), shmget(2)
STANDARDS
The shmat and shmdt system calls conform to X/Open System Interfaces and Headers Issue 5 (``XSH5'').
HISTORY
Shared memory segments appeared in the first release of AT&T System V UNIX.
BSD
June 17, 2002 BSD