System Resource Monitoring

Unix has following major resource types that need to be monitored and tuned

  • CPU
  • Memory
  • Disk space
  • Communications lines
  • I/O Time
  • Network Time
  • Applications programs

Performance Components

The following table lists out five major components which take up the system time

Sr. No.Component & Description
1User State CPU The actual amount of time the CPU spends running the usersÖ program in the user state. It includes the time spent executing library calls, but does not include the time spent in the kernel on its behalf
2System State CPU This is the amount of time the CPU spends in the system state on behalf of this program. AllI/O routinesrequire kernel services. The programmer can affect this value by blocking I/O transfers
3I/O Time and Network Time This is the amount of time spent moving data and servicing I/O requests
4Virtual Memory Performance This includes context switching and swapping
5Application Program Time spent running other programs ô when the system is not servicing this application because another application currently has the CPU

Performance Tools

Unix provides following important tools to measure and fine tune Unix system performance

Sr. No.Command & Description
1nice/renice Runs a program with modified scheduling priority
2netstat Prints network connections, routing tables, interface statistics, masquerade connections, and multicast memberships
3time Helps time a simple command or give resource usage
4uptime This is System Load Average
5ps Reports a snapshot of the current processes
6vmstat Reports virtual memory statistics
7gprof Displays call graph profile data
8prof Facilitates Process Profiling
9top Displays system tasks