Sponsored Content
Full Discussion: RAM Usage discrepancy
Operating Systems OS X (Apple) RAM Usage discrepancy Post 302749987 by dasx on Sunday 30th of December 2012 11:43:48 AM
Old 12-30-2012
Created a 100MB file and did what you said.
Code:
b=0; while [ $b -eq 0 ]; do ps -A >> Desktop/file; if [ `du -d0 Desktop/file | awk '{print $1}'` -gt 204800 ]; then b=1; fi; done

Did it 4 times. Looks like there isn't a noticeable difference really.

Quote:
~ $ du -d0 -h Desktop/file;time cat Desktop/file > /dev/null
103M Desktop/file

real 0m0.019s
user 0m0.001s
sys 0m0.018s
~ $ du -d0 -h Desktop/file;time cat Desktop/file > /dev/null
103M Desktop/file

real 0m0.020s
user 0m0.001s
sys 0m0.018s
~ $ du -d0 -h Desktop/file;time cat Desktop/file > /dev/null
103M Desktop/file

real 0m0.020s
user 0m0.001s
sys 0m0.019s
~ $ du -d0 -h Desktop/file;time cat Desktop/file > /dev/null
103M Desktop/file

real 0m0.020s
user 0m0.001s
sys 0m0.018s
~ $
I then though that that same file might've been in RAM since the very first beginning as I had just created it, so ran find in terminal to find a 100MB file. Didn't have one so opted for a 50MB one. lol

Here's the output:

Code:
~ $ du -d0 -h Documents/Programación/Flash/Movement/Goma.fla; time cat Documents/Programación/Flash/Movement/Goma.fla > /dev/null 
 50M	Documents/Programación/Flash/Movement/Goma.fla

real	0m0.132s
user	0m0.002s
sys	0m0.023s
~ $ du -d0 -h Documents/Programación/Flash/Movement/Goma.fla; time cat Documents/Programación/Flash/Movement/Goma.fla > /dev/null 
 50M	Documents/Programación/Flash/Movement/Goma.fla

real	0m0.012s
user	0m0.001s
sys	0m0.011s
~ $

Second time is clearly faster now.

Thanks man!
 

10 More Discussions You Might Find Interesting

1. Solaris

RAM Physical Memory usage by each Process.

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

2. UNIX for Dummies Questions & Answers

Command to check RAM usage

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

3. Shell Programming and Scripting

RAM usage Information

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

4. Linux

Ram Usage

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

5. Solaris

Sun X4170 M2 RAM discrepancy

Hi all, We are seeing an odd problem on one of our new servers. It seems to be reporting 4MB less RAM than is installed: # prtconf | grep Mem Memory size: 32764 Megabytes Our other servers for example shows none missing: # prtconf | grep Mem Memory size: 32768 Megabytes Both... (5 Replies)
Discussion started by: wmd
5 Replies

6. Red Hat

High RAM usage, extremely low swapping

Hi team I have three physical servers running on Red Hat Enterprise Linux Server release 6.2 with the following memory conditions: # cat /proc/meminfo | grep -i mem MemTotal: 8062888 kB MemFree: 184540 kB Shmem: 516 kB and the following swap conditions: ... (6 Replies)
Discussion started by: hedkandi
6 Replies

7. Solaris

Solaris Filesystem usage discrepancy after "copy"

I have a query someone may be able to shed some light on... We have a Solaris 10 OS Sun V490 server Sparc. I have a SAN attached EMC Clarrion LUN which we have app data stored on. Pseudo name=emcpower0a CLARiiON ID=CK200070300470 Due to storage requirements - I need to migrate this... (4 Replies)
Discussion started by: ru4n1
4 Replies

8. UNIX for Dummies Questions & Answers

Average CPU and RAM usage for a process

Hi, I will be creating a process myself and I want to know the average CPU and RAM used by the process over the lifetime of the process. I see that there are various tools available(pidstat) for doing , I was wondering if it possible to do it in a single command while creation. Thanks in... (3 Replies)
Discussion started by: koustubh
3 Replies

9. UNIX for Beginners Questions & Answers

Peak Ram Usage

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

10. UNIX for Advanced & Expert Users

Ubuntu 14.04 - how to less ram usage

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
jdshelp(1)							   User Commands							jdshelp(1)

NAME
jdshelp - Java Desktop System Help browser SYNOPSIS
jdshelp [URL] [gnome-std-options] DESCRIPTION
jdshelp displays the Java Desktop System online Help. If a URL is specified, jdshelp displays the topic referenced by the URL. The URL must be a ghelp URL. If no argument is specified, jdshelp displays the complete online Help. OPTIONS
The following options are supported: gnome-std-optionStandard options available for use with most GNOME applications. See gnome-std-options(5) for more information. OPERANDS
The following operands are supported: URL Uniform Resource Locator, the location of a Help topic. EXAMPLES
Example 1: Displaying the Text Editor Online Help example% jdshelp ghelp://usr/share/gnome/help/gedit/C/gedit.xml EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/jdshelp Executable for Java Desktop System Help browser ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-* | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
Latest version of the GNOME Desktop User Guide for your platform. yelp(1) NOTES
Written by Laszlo Kovacs, Sun Microsystems Inc., 2004. SunOS 5.10 29 Oct 2004 jdshelp(1)
All times are GMT -4. The time now is 07:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy