The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need help collecting addational data Garlandxj Shell Programming and Scripting 0 03-25-2008 12:01 AM
Open Aerial Map project is collecting free data iBot UNIX and Linux RSS News 0 01-29-2008 01:20 PM
Need Help: Collecting similar messages in a file ashish.kapil Shell Programming and Scripting 2 01-16-2008 02:57 AM
Using loop reading a file,retrieving data from data base. Sonu4lov Shell Programming and Scripting 1 01-18-2007 11:38 PM
Collecting software inventory superghost UNIX for Advanced & Expert Users 2 11-26-2005 02:01 AM

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-04-2001
Registered User
 

Join Date: Aug 2001
Posts: 179
Collecting data from TOP to a file

Is there a way to collect data from top command to a file at regular intervals. I need this on HP-UX. I need to gather resident memory usage. I know that sar will give %cpu usage. There is a pmap command which gives memory usage in solaris. Is there a similar command in HP-UX

Thanks
Forum Sponsor
  #2 (permalink)  
Old 09-05-2001
patvdv's Avatar
Registered User
 

Join Date: Jul 2001
Location: Belgium
Posts: 83
vmstat

You could use vmstat
__________________
Patrick Van der Veken - UNIX consultant (c) 2001 - 2001 http://www.baanboard.com - http://www.ux-core.com
'True strength lies in gentleness' - Irish proverb
  #3 (permalink)  
Old 09-05-2001
Registered User
 

Join Date: Aug 2001
Posts: 179
Thank you for your response. But i think vmstat will give the info about virtual memory only and not on per process base. I need to gather the usage of physical Memory used by a particular process
  #4 (permalink)  
Old 09-05-2001
Neo's Avatar
Neo Neo is offline
Administrator
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 4,182
Have you considered using ps ? There are lots of flags and switches that might give you the data you are looking for.
  #5 (permalink)  
Old 09-05-2001
LivinFree's Avatar
Goober Extraordinaire
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584

I checked the man page here at work for top(1). Try using the -f flag. For example, top -f proc.log will save the first 16 processes to the file proc.log. top -n 37 -f proc-long.log will save the first 37 processes to a file called proc-long.log. For more information, please check out man 1 top on your system.

[Note: The flags and arguments are not always portable between systems. Please check the top manpage on your flavor before using]
  #6 (permalink)  
Old 09-06-2001
Registered User
 

Join Date: Aug 2001
Posts: 179
This option looks to be appropriate. It is working fine on HP-UX.
Thank you very much livinfree and all others
Google UNIX.COM
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:19 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0