Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I have to add my thanks and appreciation for your wonderful site... People who frequent the site are the two best things - nice and smart..."

Geography

Where in the world do Tek-Tips members come from?
yi (Programmer)
9 Aug 00 16:52
I need to find out how much memory a C code uses and how long it takes to run.  What command should I use to get this information?
MikeLacey (MIS)
10 Aug 00 7:56
Hi,

The command 'ps u' gives you size and resident set size figures -- use 'man ps' for some good definitions of these fields

USER       PID %CPU %MEM   SZ  RSS    TTY STAT    STIME  TIME COMMAND
root     13772  0.0  0.0  352  412  pts/0 A    11:06:42  0:00 ksh
root     11394  0.0  0.0  208  260  pts/0 A    13:13:40  0:00 ps u


Use the 'time' command to see how long your programs take to run -- like this 'time ls'

Mike
michael.j.lacey@ntlworld.com
Cargill's Corporate Web Site

fenris (Programmer)
10 Aug 00 8:37
You could also try the "top" command for memory as well. I just learned about a week or so ago.

Troy Williams B.Eng.
fenris@hotmail.com

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close