New answers tagged

0

Total_vm was badly calculated by me and the OOM report is correct. app has allocated 59739 pages which is 233MB. So, this is the correct reason of OOM.


0

I do not know of a tool that gives you the swap size on a per process basis, but it would be easy enough to write one... (see shell script example further down) Linux comes with a tool named smem. To install under Debian/Ubuntu you should be able to use (it will install many python packages in the process): apt-get install smem Then to use it, just type ...


0

rekall Check out the rekall framework, they have a linpmem application for this purpose: http://www.rekall-forensic.com/docs/Tools/index.html The SANS rekall memory forensic cheatsheet has an example of how to dump memory under linux too: # ./linpmem_2.0.1 -o linux.aff4


0

I think you are thinking along the wrong lines. Your goal is clear. The way is not to stop the rest of the processes but to give your main processes near real-time sceduling priority. Use nice for your important user-space-processes for that. The more difficult problem is the PCIe interrupt handling, which resides in kernel-space. Since hardware is ...


0

If you want to check memory of a process which is already running then try this: # ./ps_mem.py Private + Shared = RAM used Program 188.0 KiB + 52.0 KiB = 240.0 KiB atd ..... 25.9 MiB + 66.0 KiB = 26.0 MiB memcached 53.1 MiB + 106.5 KiB = 53.2 MiB named 453.2 MiB + 107.0 KiB = 453.3 MiB mysqld -----------------------...


1

Get the PID of the scala process you want to track using SCALAPID=$! after starting the scala process in background then find the memory usage of the process using ps -o size= -q $SCALAPID the returned value is in kilobytes


0

This is a known bug since 2007 - see System freeze on high memory usage. In this situation, Windows displays a dialog warning the user to close one or more applications.


16

Often a mv is closer to a rename than a copy. In a classic unix type file system, the inodes that contain the file data won't be replicated if the source and the destination are on the same mount point. Instead a new filename is created that points to the same inodes, and the old filename is unlinked. If the mv is to another mount point, then it will be ...


0

I knew that chrome/chromium had a task manager, but it doesn't give the total memory used. It turns out that the "Stats for nerds" link in the task manager leads to chrome://memory-redirect/ which does list the total memory used. It would be nice to have external validation of these numbers, as well as a way to get the information on the command line so more ...


1

this command will display result in "GB" svmon -G -O unit=GB if you want in "MB", just change the unit value to MB


-1

I'm sure that it's not the best solution, still it works for me: #!/bin/sh ps aux | grep "[/]opt/google/chrome/chrome" | awk '{print $5}' | awk '{sum += $1 } END { print sum }' ps aux | grep "[/]opt/google/chrome/chrome" | awk '{print $6}' | awk '{sum += $1 } END { print sum }'


2

Running this: perl -e '$a="x"x1000000000;sleep(10);print"done\n"' takes up 1.8GB RAM. So you would expect running this: perl -e '$a="x"x1000000000;fork;fork;fork;fork;sleep(10);print"done\n"' would take up 16 times as much. But it does not. This is due to the Linux kernel's intelligent copy-on-write: Because the contents of '$a' does not change, then ...


1

I have created a script, kill-process, that kills some processes listed in an array, if CPU usage is greater than XX% for YY seconds or kill processes that's running more than ZZ seconds. You can set XX, YY, ZZ in the top of the file. You can use a ps or top for check processes. There's a dry run mode too, to check but not kill. In the end, the script ...


1

I have a feeling that this document will help you a lot (Sections 5.5 and 5.2 especially). I will try to summarize as best I can here. The best explaination that I have is that the numbers provided in memory.usage_in_bytes are not incredibly precise, but are intended to provide a general idea about the amount of memory something is using. memory.stat is ...


1

Maybe you can use nocache. It's a small program that you use like nocache cmd.


2

No. First the .so file is opened, then mmap() creates the virtual address space necessary to hold the whole file contents. However, only when something tries to access a particular address in the space will the access cause a page fault, and the kernel will read a (4k) block from the file corresponding to the page's offset into real memory. When it is in ...


3

You can use ps together with awk to find the physical memory usage by a user: ps -U root --no-headers -o rss | awk '{ sum+=$1} END {print int(sum/1024) "MB"}' Here it prints memory used by root to the output.


1

I think smem is the better tool in your case. Install smem and try smem -uk If you are using debian you can install it using: apt-get install smem If you cant install nothing on the server you can try: ps haux | awk -v user=$USER '$1 ~ user { sum += $4} END { print user, sum; }' Remember that $USER is a environment variable so you don't need to ...


2

It means that the RAM sticks are driven by a clock signal — as opposed to (older) asynchronous DRAMs. See the Wikipedia page on SDRAMs. To find out whether your RAM is dual-channel, look for “Interleaved Data Depth” in dmidecode output. It should say 1 for single and 2 for dual channel RAM.



Top 50 recent answers are included