Programming :: Total Amount Of Allocated SHM Memory?

Aug 25, 2010

Is there an easy way in C to get the total amount of allocated SHM memory on a machine?

View 7 Replies


ADVERTISEMENT

Programming :: Write A Script To Calculate The Total Amount Of Installed Memory?

Apr 4, 2011

I am trying to write a script to calculate the total amount of installed memory to use during an anaconda kickscript, so the swap file is created at 2 x the installed memory. I so far have the amount of installed RAM DIMMS but need a way to total them up and produce a varible I can use in the pre section of the install.

Code:

dmidecode -t 17 | grep Size | awk ' { print $2 }'
Output:
2048
2048

Note: on some servers there could be from 1 DIMM up to 16 DIMMS installed so the script needs to be able to handle this. I also can not use bc as it does not exist during the install stage. I am guessing I need a while loop to do this and use expr but do not know where to start for this logic.

View 3 Replies View Related

Ubuntu :: Understand A Large Amount Of Allocated Memory That Seems Not To Be Accounted For On System?

Mar 24, 2010

I am trying to understand a large amount of allocated memory that seems not to be accounted for on my system.I'll say up front that I am discussing memory usage without cache and buffers, 'cause I know that misunderstanding comes up a lot.I am in a KDE 4.3 desktop (Kubuntu 9.10), using a number of java apps like Eclipse that tend to eat up a lot of memory.after a few days, even if I quit most apps, 1 gb of ram remains allocated (out of 2 gb).this appeared excessive, and I took the time to add up all values of the RES column in htop (for all users).the result was about 1/2 gb.am I trying to match the wrong values?or could some memory be allocated and not show up in the process list?this is the output of free

Code:
total used free shared buffers cached
Mem: 2055456 1940264 115192 0 123864 702900

[code]...

View 6 Replies View Related

Server :: Calculate The Total Amount Of Memory Used By The System?

Jul 15, 2010

I want to calculate the total amount of memory used by the system, Someone please confirm if the below formula is correct.Quote:

((memUsed-mebBuffers-memCached)*100)/memUsed => totalMemoryUsed%
Code:
free -o
total used free shared buffers cached
Mem: 8167004 8115292 51712 0 87680 1444676
Swap: 8388584 3252996 5135588
((8115292-87680-1444676)*100/8115292) => 81%

As per the above calculation 81% of memory is used.Is this correct? and if so Am I running out of memory?what is the limit in % that I should maintain for a better performance?

View 3 Replies View Related

Programming :: Write A Script That Can Show Me Total Memory Vs Used Memory?

Apr 13, 2010

How do I write a script for my Linux that can show me total memory vs used memory and have it email me results if it's over 70 percent?

View 2 Replies View Related

Server :: Total Free Allocated File Descriptors Always Zero

Jul 23, 2010

I have problem with free allocated file descriptors it's always zero!

View 2 Replies View Related

Programming :: Checking Amount Of System Memory?

Nov 8, 2010

I need to allocate a % of the total system memory for a buffer but what is the best method to determine how much memory is in the system? So far the only way I have found is to get the pages of memory:

Code:
long sysconf(_SC_PHYS_PAGES)
Is that the only option?

View 2 Replies View Related

Programming :: Possible To Know The Amount Of Memory Used By A Program Before Running It?

Mar 3, 2009

I would like to know if there is a linux command to verify the amount of memory used by a program. The programs I am using were compiled with gfortran.

View 2 Replies View Related

Server :: Java Uses More Than The Allocated Memory?

Aug 18, 2010

I am still confused about the memory issues. i have allocated JAVA_OPTS='-Djava.awt.headless=true -Xms512M -Xmx512M -XX:MaxPermSize=512M' think that it means that i have allocate java to use only 512mb of my memory. but when i run top here is my output.

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
15932 root 23 0 1495m 1.2g 3732 S 12.0 36.0 121:52.98 java
5070 postgres 15 0 55392 39m 35m R 11.6 1.2 0:51.61 postmaster

[code]....

View 6 Replies View Related

Red Hat / Fedora :: Increase Memory Space Allocated For Process?

Jun 1, 2010

I want to know if i can increase the memory space allocated for a process manually while the process is running ,,,, and if it is possible how i can do this .

View 2 Replies View Related

General :: Clearing Of Memory Allocated By Using Malloc/kmalloc/vmalloc

Aug 8, 2011

Let's analyse this While registering a Char deriver to kernel think that we had allocated memory using any of malloc/kmalloc/vmalloc.

If we forgot to Free that allocated memory while unregistering, will that memory be allocated aside or kernel clears it...?

View 2 Replies View Related

Hardware :: Reduced Disk Space / Use The Total Amount Of Space?

Aug 25, 2009

OS: RHEL AS 5 64-bit

HDD:300 GB Hardware mirror (HP blade bl460c)

While installing OS, in partition window after OS file system structure I've left 277 GB. But after installation it shows Size - 255GB and available disk space is 242 GB.

Isn't it weired? How can I use the total amount of space in Linux? I need the whole 277GB exactly. What should be my workaround?

View 6 Replies View Related

Hardware :: Different Amount Of Memory (RAM) Shown

May 14, 2009

On a new box with Debian Lenny, I have 2x2 gig of ddr2 but the karamba applet show only 3291mb. And dmesg show this:
Code:
dmesg | grep Memory
[0.004000] Memory: 3362976k/4194304k available (1769k kernel code, 43092k reserved, 752k data, 244k init, 2489792k highmem)

View 2 Replies View Related

General :: Vmstat's Total Memory Statistic?

Sep 20, 2011

I am analyzing memory usage on a Linux system. When I run vmstat -s, I see the following:

waffleman@waffle-iron:~$ vmstat -s
3549184 K total memory
3206708 K used memory
1918012 K active memory
1037320 K inactive memory
342476 K free memory

[Code]...

I know the system has 4096 MB of RAM installed, but why does it show only 3466 MB? Can this be interpreted as total "available" memory? Perhaps the missing 630 MB is being used by the kernel and cannot paged out?

I also tried this on on an Embedded Linux system and saw a similar result. The DRAM chip has 128 MB, but only 124 MB shows up in vmstat.

View 1 Replies View Related

General :: Noticed That The Total Used Memory A Lot Higher Than Sum Of RSS?

Jul 9, 2010

i got a RHEL 5.2 machine.and i noticed that the total used memory(as shown in "free" command) is 3GB higher thanthe sum of RSS size of all processes(collected using "ps aux").i know that its not suppose to be exact because RSS counts ultiple times shared memory (so actually it suppose to be higher than the used memory).the server runs apache which runs a pretty heavy php program.my suspicion is that its memory leak?

View 14 Replies View Related

Slackware :: Total Memory Being Reported Incorrectly?

Jan 20, 2011

I'm running 13.1 on a Dell Latitude D630 with 4GB of RAM. My problem is that Slackware doesn't seem to see all of the available memory. Here are the #s being reported (just including pertinent #s rather than all output)...

Code:
free -m
total: 3546

[code]...

View 14 Replies View Related

OpenSUSE :: Top Indicating Wrong Amount Of Memory Used?

Jun 4, 2010

as you should see, top is indicating 3.544.864kb (3.5Gb) of memory used while gnome system monitor only 609Mb. What's wrong here? (I am pretty sure Gnome SM is right. Top is updating every sec.)

View 1 Replies View Related

General :: Calculate Total Memory Consumed By User?

Sep 20, 2010

is there a way to calculate the total memory consumed by user ?

View 12 Replies View Related

Hardware :: RHEL5.3 Is Not Showing Total Physical Memory?

Aug 27, 2010

I have rhgel5.3 installed on IBM blade server having 16 GB of physical memory. But it showing only 4GB.

#cat /proc/meminfo
#free -m
#top

[code]...

View 11 Replies View Related

General :: Find Total Memory Usage Of A Program?

Sep 22, 2010

I wrote a program that multiplies 2 matrices using multi-threads and another one using multiple processes and shared memory. Both in C.I need to find the total memory usage of these programs. I know of the top command, but when my matrices are relatively small they don't even show up on top because they complete so fast, how can I find the memory usage for these instances?Also, how can I find the total turnaround time of my programs?

View 3 Replies View Related

Server :: Find Total Apache Memory Usage?

Sep 12, 2010

Top only show the memory usage for individual processes. Apache often runs hundreds of processes, each of which may use only a small amount of memory, however the total memory consumed by all apache processes can be fairly large.Is there a way to see the total memory usage for all apache processes?

View 7 Replies View Related

Slackware :: Limit For Maximum Amount Of Locked Memory?

May 9, 2011

When I run ardour sound editing I get this message , but it starts ok Your system has a limit for maximum amount of locked memory! This might cause Ardour to run out of memory before your system runs out of memory. You can view the memory limit with 'ulimit -l', and it is normally controlled by /etc/security/limits.conf

bash-4.1$ ulimit -l
64
my limits.conf is like this
audio - rtprio 99
@audio - memlock 250000

[Code]...

View 2 Replies View Related

Ubuntu :: Increase Maximum Amount Of Allowed Shared Memory?

May 17, 2011

My problem is I installed Zone Minder for camera security and I'm testing it on my laptop with the built in webcam and everything seems to work perfectly except when I try to view the live feed from the camera, it's just a black box. No video.

I checked this website and it's exactly the problem I'm having with a fix for it but his fix doesn't work. He says to type:

Code:
user@ubuntu:~$ sudo echo "256000000" > /proc/sys/kernel/shmmax
user@ubuntu:~$ sudo service apache2 restart
user@ubuntu:~$ sudo service zoneminder restart

But when I do the first line, I get this:

Code:
deemar@Clementine:~$ sudo echo "256000000" > /proc/sys/kernel/shmmax
bash: /proc/sys/kernel/shmmax: Permission denied

View 2 Replies View Related

Programming :: C: Segmentation Fault When Freeing Allocated 2D Array?

Jun 1, 2011

I know that seems to be a common question, but information from the web does not So problem is in the title.

Here is what I do:

First I declare the pointers.
Code:
double **rijx,**rijy,**rijz;
Then I allocate the require memory.

[Code]...

View 2 Replies View Related

Programming :: Local Dynamically Allocated Array In Fortran?

Oct 19, 2009

I (my friend) have a fortran program with the code along the following lines:

Code:

SUBROUTINE NY
REAL, DIMENSION(4000,4000) :: a, b, c
...
RETURN
END SUBROUTINE PARAMETERS

The problem is that the huge matrices are retained in memory even after the subroutine ends. Is there an easy way to declare the arrays in a sort of dynamic way, like they were in the following C example?

Code:

void ny(void) {
double a[4000,4000];
...
}

I mean in the C example the memory is released as soon ny() exits.

View 5 Replies View Related

Programming :: Read Any Given Maze.txt Into An Internal Dynamically Allocated Array Of Strings?

Apr 26, 2011

I am looking for an easy way to convert any given maze.txt of any size to a internal array of strings(dynamically allocated). Important is that dimensions of the maze (row, col) shouldn't be written by the user instead they have to be somehow read from the file. This is not my homework assignment! It is a small part of a project that i never dealt with. I never read files to C string.... I made it for specific maze dimensions, but want it to work with any given .txt file.

View 9 Replies View Related

Programming :: Reading In A Outside Text File And Putting In The String On That Line Into A Char Array That Is Already Allocated?

Mar 29, 2011

Here is the issue. I am reading in a outside text file and putting in the string on that line into a char array that is already allocated.

Code:
int main(int argc, char *argv[])
{

[code]....

View 1 Replies View Related

Fedora :: User Memory Allocation - Set A Maximum Limit On The Amount Of Ram A User Can Utilize?

Jul 24, 2009

I have a few multi-user servers in an academic laboratory. I am having a problem with some users maxing out the available RAM, causing such sever slowdowns the machine essentially crashes. My servers are Dell Power Edge's running Ubuntu 8.10 Server Edition (Not my choice). I would like to set a maximum limit on the amount of ram a user can utilize. This morning I experimented with setting limits via /etc/security/limits.conf and using ulimit. Neither of them prevented my test program, a simple infinite loop of mallocs, from crashing the server.

View 7 Replies View Related

Debian Hardware :: Debian Squeeze Memory Amount Incorrect?

Feb 23, 2011

Fresh install of Debian 6.0 (squeeze) and the memory shows 3.8 GB. I have 6 sticks of 2 gb on the board.

Pertinent dmesg lines: AMI BIOS detected: BIOS may corrupt low RAM, working around it.

3083MB HIGHMEM available.
883MB LOWMEM available.
Bios tests 12 gb of ram fine.

View 4 Replies View Related

General :: Get Output Of Text File Containing Account Number, Debit Amount, Credit Amount,date Using Shell Script?

Apr 9, 2011

How to get output of text file containing account number, debit amount, credit amount,date using shell script?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved