ram

How to see top processes sorted by actual memory usage?

佐手、 提交于 2019-11-28 02:32:43
I have a server with 12G of memory. A fragment of top is shown below: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 12979 frank 20 0 206m 21m 12m S 11 0.2 26667:24 krfb 13 root 15 -5 0 0 0 S 1 0.0 36:25.04 ksoftirqd/3 59 root 15 -5 0 0 0 S 0 0.0 4:53.00 ata/2 2155 root 20 0 662m 37m 8364 S 0 0.3 338:10.25 Xorg 4560 frank 20 0 8672 1300 852 R 0 0.0 0:00.03 top 12981 frank 20 0 987m 27m 15m S 0 0.2 45:10.82 amarok 24908 frank 20 0 16648 708 548 S 0 0.0 2:08.84 wrapper 1 root 20 0 8072 608 572 S 0 0.0 0:47.36 init 2 root 15 -5 0 0 0 S 0 0.0 0:00.00 kthreadd The free -m shows the following

Detect CPU Speed/Memory/Internet Speed using Java?

允我心安 提交于 2019-11-28 01:52:59
Is it possible within Java to identify the total CPU speed available as well as the total system memory? Network connection speed to the web would also be awesome. This really depends on your OS, since Java will tell you little about the underlying machine. Unfortunately you have to use differing approaches depending on your OS. If you're on Linux, take a look at the /proc/cpuinfo filesystem for CPU info. /proc generally has a wealth of information. Network (IO) will be reflected via the command ifconfig . If you're on Windows, a useful tool is WMI , which provides access to all sorts of low

How do you determine the amount of Linux system RAM in C++?

半城伤御伤魂 提交于 2019-11-27 19:05:30
I just wrote the following C++ function to programatically determine how much RAM a system has installed. It works, but it seems to me that there should be a simpler way to do this. Can someone tell me if I'm missing something? getRAM() { FILE* stream = popen( "head -n1 /proc/meminfo", "r" ); std::ostringstream output; int bufsize = 128; while( !feof( stream ) && !ferror( stream )) { char buf[bufsize]; int bytesRead = fread( buf, 1, bufsize, stream ); output.write( buf, bytesRead ); } std::string result = output.str(); std::string label, ram; std::istringstream iss(result); iss >> label; iss >

How to check the amount of RAM in R

自作多情 提交于 2019-11-27 15:29:55
问题 I want to make a function that imports data in different numbers of batches depending on how much RAM is available on someones system. But how can I find the amount of available RAM in R? I can use memory.size() but that only works for Windows. 回答1: Given the warnings concerning platform-dependency discussed in the earlier comment, you could for example parse /proc/meminfo on Linux: $ grep MemFree /proc/meminfo MemFree: 573660 kB $ awk '/MemFree/ {print $2}' /proc/meminfo 565464 You could try

Android memory types (RAM v Internal Memory)

久未见 提交于 2019-11-27 11:47:52
问题 On a separate thread I demonstrated my ignorance of memory types by asking about the best way to copy a file into "internal memory" and was advised that this was not a good idea and that it would be better to read the file into "RAM". I am now trying to understand how these two types of memory are related and how they can be used. I understand that "internal memory is perceived to be the flash that is used to store APKs, ROM images, etc." The specification for my HTC Hero says that there is

how much memory can be accessed by a 32 bit machine?

北城以北 提交于 2019-11-27 10:43:52
What is meant by 32bit or 64 bit machine? It’s the processor architecture…a 32 bit machine can read and write 32bit data at a time same way with 64 bit machine…. whats the maximum memory that a 32 bit machine can access? It is 2^32=4Gb (4Gigabit = 0.5 GigaByte) That means 4Gb ram? If I consider the same way for a 64 bit machine then I can have a ram of 16ExbiBytes ..is that possible? Are my concepts right? Yes, a 32-bit architecture is limited to addressing a maximum of 4 gigabytes of memory. Depending on the operating system, this number can be cut down even further due to reserved address

Google Colaboratory: misleading information about its GPU (only 5% RAM available to some users)

你。 提交于 2019-11-27 08:57:12
问题 update: this question is related to Google Colab's "Notebook settings: Hardware accelerator: GPU". This question was written before the "TPU" option was added. Reading multiple excited announcements about Google Colaboratory providing free Tesla K80 GPU, I tried to run fast.ai lesson on it for it to never complete - quickly running out of memory. I started investigating of why. The bottom line is that “free Tesla K80” is not "free" for all - for some only a small slice of it is "free". I

C++: Uninitialized variables garbage

喜你入骨 提交于 2019-11-27 08:12:21
问题 int myInt; cout << myInt; // Garbage like 429948, etc If I output and/or work with uninitialized variables in C++, what are their assumed values? Actual values in the memory from the "last user"? e.g.: Program A is closed, it had an int with the value 1234 at 0x1234 -> I run my program, myInt gets the address 0x1234 , I output it like above -> 1234 Is it just random garbage? 回答1: "Random garbage" but with emphasis on "garbage", not on "random" – i.e., absolutely arbitrary garbage without even

How do 8-bit and 16-bit processors access more RAM with two registers?

依然范特西╮ 提交于 2019-11-27 07:57:49
问题 Something that has always confused me is how 8-bit computers access more than 256 bytes of RAM. I know that it must use two registers, but can any one show me an example of what this would look like in assembly code? Like: mov a, [x] ??? 回答1: Let's imagine we have LOWER and HIGHER 8bit half of the address in registers L and H. For example, we want to read byte from address 32770 dec = 8002 hex. mov l, 02h ;lower byte of address mov h, 80h ;higher byte of address mov a, [hl] ;a <-- [h*256 + l]

How to get total RAM size of a device?

血红的双手。 提交于 2019-11-27 07:50:54
I want to get full RAM size of a device. memoryInfo.getTotalPss() returns 0. There is not function for get total RAM size in ActivityManager.MemoryInfo . How to do this? Standard unix command: $ cat /proc/meminfo Note that /proc/meminfo is a file. You don't actually have to run cat , you can simply read the file. Leon Lucardie As of API level 16 you can now use the totalMem property of the MemoryInfo class. Like this: ActivityManager actManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); ActivityManager.MemoryInfo memInfo = new ActivityManager.MemoryInfo();