Thursday, January 31, 2013

How to measure the performance of an Linux C application?

Q. I have written a C code, which uses fread, fwrite,. I want to measure the performance like No_Of_Blocks read and written by the application. disk usage, memory usage etc. Is there any tool to measure the performance of an application in linux?

A. lets see:
You can measure CPU performance using /proc/cpu. You can measure ethernet performance by using /sbin/ifconfig <eth_port>. You can use df to track data written to a filesystem/mountpoint. Take a before and after snapshot using the tool of choice and determine the metric you wish to measure.

What is the corresponding free command on an AIX machine?
Q. I'm programming on a machine running IBM AIX version 6.1. I'm trying to profile the memory usage so I'm looking for a command similar to the free command on Linux distributions. Help

A. svmon and vmstat

How do you show the processes that are running in linux under a command line?
Q. And, how do you show how much memory and cpu each is using?

A. Check out the manpage for ps. The most common syntax is "ps auxww" which will show PID, CPU usage, Memory usage, process name, etc for each process that is running on your system. "top" shows real time information and ranks processes by their CPU/RAM usage.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

No comments:

Post a Comment