time
The time command returns the total execution time of your program or command.
The format of the output depends upon your shell (/bin/csh, /bin/tcsh, /bin/ksh, /bin/bash...). The basic information is :
Real time: the total wall clock (start to finish) time your program took to load, execute, and exit.
User time: the total amount of CPU time your program took to execute.
System time: the amount of CPU time spent on operating system calls in executing your program.
The system and user times are defined differently across different computer architectures.
gprof
The gprof utility is included in most Unix systems. Like prof, it is used to profile program execution at the procedure level. Unlike prof, it profiles procedures according to their call graphs.
LC Platforms: All
gprof displays the following information:
The parent of each procedure.
An index number for each procedure.
The percentage of CPU time taken by that procedure and all procedures it calls (the calling tree).
A breakdown of time used by the procedure and its descendents.
The number of times the procedure was called.
The direct descendents of each procedure.
top
Provides a real-time display with updating on how processes are utilizing a range of machine resources. Sorted in order of %CPU being used.
LC Platforms: All
See the top man page for details.
vmstat - Virtual Memory Statistics
Displays virtual memory statistics. Syntax:
vmstat [options] n [m]
n = interval in seconds
m = count (optional) - number of interval lines to print
First line of output represents statistics since system initialization. Subsequent lines are statistics collected during the specified interval period.
See the vmstat man page for additional details.
netstat - Network Statistics
Displays network statistics. Numerous options and outputs. Syntax
netstat [options] n
n = interval in seconds
First line of output shows summary statistics since system initialization Subsequent lines are statistics collected during the specified interval period.
See the netstat man page for details.
iostat - I/O Statistics
Displays I/O (disk activity) statistics. Syntax:
iostat [options] n [m]
n = interval in seconds
m = count (optional)
First line of output displays statistics since system initialization. Subsequent lines are statistics collected during the specified interval period.
See the iostat man page for details and interpretation of output columns.
ps - Process Status
Shows current status of processes. Many options and outputs.
Provides a quick and easy way to view overall memory and cpu usage by any/all processes on the system.
See the ps man page for details.
linux 性能测试工具
最新推荐文章于 2024-07-08 09:05:27 发布