8bcc command memory footprint - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Base System > General

General General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere.

Reply
 
Thread Tools Display Modes
  #1  
Old November 30th, 2010, 13:36
tessio tessio is offline
Junior Member
 
Join Date: May 2009
Posts: 29
Thanks: 0
Thanked 1 Time in 1 Post
Default command memory footprint

Hello people,
How can I record the memory footprint of a command?

Something like: memorynator grep '.*thing' big_file

Thanks..

Last edited by DutchDaemon; November 30th, 2010 at 17:42.
Reply With Quote
  #2  
Old November 30th, 2010, 15:47
dandelion's Avatar
dandelion dandelion is offline
Junior Member
 
Join Date: Nov 2010
Posts: 54
Thanks: 0
Thanked 18 Times in 17 Posts
Default

time(1)?
Code:
$ command time -l fgrep 'some thing' big_file_11G
      150.72 real         6.56 user         4.67 sys
      1612  maximum resident set size
       111  average shared memory size
      3953  average unshared data size
       127  average unshared stack size
       194  page reclaims
         0  page faults
         0  swaps
     80875  block input operations
         1  block output operations
         0  messages sent
         0  messages received
         0  signals received
      2378  voluntary context switches
      4917  involuntary context switches
command part is important as many shells including sh(1) and tcsh(1) implement time builtin which may or may not be compatible with /usr/bin/time.
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory usage Jaax Userland Programming & Scripting 4 November 21st, 2010 18:24
[Solved] managing memory in freebsd - inactive memory chrcol General 5 March 12th, 2010 01:33
[Solved] missing memory hedgehog System Hardware 2 December 11th, 2009 14:37
[Solved] Inactive Memory vs. Free Memory dordal General 5 November 23rd, 2009 13:39
Memory check ccc System Hardware 9 July 14th, 2009 18:47


All times are GMT +1. The time now is 14:15.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0