The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to find Total and Free Physical Memory and Logical Memory in SOLARIS 9 0ktalmagik SUN Solaris 4 02-03-2009 09:37 AM
current CPU usage, memory usage, disk I/O oid(snmp) S_venkatesh SUN Solaris 2 12-13-2008 06:19 AM
how can I find cpu usage memory usage swap usage and logical volume usage alert0919 HP-UX 3 12-02-2008 02:38 PM
How to determine cpu&memory percentage usage per user hp-ux-user HP-UX 4 03-10-2005 07:53 AM
Total Memory/Swap Memory ghe1 Filesystems, Disks and Memory 4 04-01-2002 11:33 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-22-2009
yoavbe yoavbe is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 43
Total usage memory by user

Hi,

When running top on linux redhat machine , i see that i have 16gb of memory
in my machine and about 14.5gb of memory are in use:

Mem: 16395780k total, 14970960k used, 1424820k free, 370264k buffers
Swap: 4192956k total, 25824k used, 4167132k free, 12029400k cached

How can i sum the size of memory in use by USER.

Thanks
Yoav
  #2 (permalink)  
Old 04-22-2009
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,285
It is not that plain easy; you might want to read this article to see why:

Virtual Threads: Understanding memory usage on Linux
  #3 (permalink)  
Old 04-22-2009
reddybs reddybs is offline
Registered User
  
 

Join Date: Jan 2009
Location: Sriharikota-AP-India
Posts: 53
Quote:
Originally Posted by zaxxon View Post
It is not that plain easy; you might want to read this article to see why:

Virtual Threads: Understanding memory usage on Linux
Hi zaxxon,

Many thanks for the info. I found many new things going through the link as i just started my carrier with UNIX.
  #4 (permalink)  
Old 04-22-2009
reddybs reddybs is offline
Registered User
  
 

Join Date: Jan 2009
Location: Sriharikota-AP-India
Posts: 53
Quote:
Originally Posted by yoavbe View Post
Hi,

When running top on linux redhat machine , i see that i have 16gb of memory
in my machine and about 14.5gb of memory are in use:

Mem: 16395780k total, 14970960k used, 1424820k free, 370264k buffers
Swap: 4192956k total, 25824k used, 4167132k free, 12029400k cached

How can i sum the size of memory in use by USER.

Thanks
Yoav
Hello,

Try this command:
Code:
ps aux | awk '$1 == "reddybs" {sum +=$4}; END {print sum}'
reddybs is the user name.

OR

When you execute top command, press u and then type the username.
This will give you top processes owned by the user.

Cheers,
Sai
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:48 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0