[Packer01] Section 20.3. Other Monitoring Tools

来源:百度文库 编辑:神马文学网 时间:2024/05/02 03:08:30

Other Monitoring Tools

An extremely useful set of tools, based on information held in/proc, can be found in/usr/proc/bin (as of Solaris 8, these tools are located in/bin, with symlinks in/usr/proc/bin pointing to the new location). They include the following:

  • pcred— Prints the credentials (effective, real, and saved user IDs, or UIDs, and group IDs, or GIDs) of each process.

  • pfiles— Reports fstat (2) and fcntl (2) information for all open files in each process.

  • pflags— Prints the /proc tracing flags, pending and held signals, and other /proc status information for each lwp in each process.

  • pldd— Lists the dynamic libraries linked into each process, including shared objects explicitly attached by dlopen (3X).

  • pmap— Prints the address space map of each process.

  • psig— Lists the signal actions of each process.

  • pstack— Prints a hex+symbolic stack trace for each lwp in each process.

  • pstop/prun— Stops or starts each process.

  • ptime— Times a command, like the time (1) command but uses microstate accounting for reproducible precision.

  • ptree— Prints the process trees containing the specified process IDs (PIDs) or users, with child processes indented from their respective parent processes. An argument of all digits is taken to be a process ID; otherwise, it is assumed to be a user login name. Default is all processes.

  • pwait— Waits for all of the specified processes to terminate.

  • pwdx— Prints the current working directory of each process.

Network traffic can be monitored with bothnetstat andstatit, although both tools focus on the number of packets sent and received. An undocumentednetstat option,-k, reports the number of packets received and sent by each network interface (ipackets and opackets), along with an almost overwhelming quantity of other kernel data. As of Solaris 2.6,netstat -k also reports the number of bytes received and sent (rbytes andobytes).The combination of packet count and byte statistics count allows theaverage packet size to be calculated for both incoming and outgoingpackets. A new utility,kstat, introducedin Solaris 8, presents the same information in a more flexible manner,allowing statistics to be selectively extracted. An example of howkstat can be used is given on page 293.

A sophisticated tool referred to asmemtool(developed by Richard McDougall) is also not officially supported butprovides extremely useful information about memory usage for allprocesses on the system.memtool is available on the book website. A script based on this tool,procmem, is also included on the book website and is described on page 286.

Another useful tool istruss, which displays all system calls made by a running process. With the-c option,truss summarizes system call statistics for a monitored process. The statistics are reported when you interrupttruss with Control-C. Note, though, that truss can be intrusive on heavily loaded systems.

  • Create Bookmark (Key: b)Create Bookmark
  • Create Note or Tag (Key: t)Create Note or Tag
  • Download (Key: d)Download
  • Email This Page (Key: e)Email This Page
  • PrintPrint
  • Html View (Key: h)Html View
  • Zoom Out (Key: -)Zoom Out
  • Zoom In (Key: +)Zoom In
  • Toggle to Full Screen (Key: f)
  • Previous (Key: p)Previous
  • Next (Key: n)Next

Related Content

Monitoring Processes with the Activity Monitor
From: Microsoft® SQL Server 2005 Management and Administration

System Monitor
From: Linux® For Dummies®, 8th Edition

More Advanced and Graphical Performance Tools
From: UNIX® User’s Handbook, Second Edition

Graphical Process and System Management Tools
From: Ubuntu 7.10 Linux® Unleashed, Third Edition

Graphical Process and System Management Tools
From: Fedora™ 7 Unleashed

Performance Tool
From: System Administration Guide: Virtualization Using the Solaris Operating System

Graphical Process and System Management Tools
From: Fedora™ Unleashed, 2008 Edition, Eighth Edition

More Advanced and Graphical Performance Tools
From: HP-UX 11i System Administration Handbook and Toolkit, Second Edition

Multipurpose Diagnostic Tools
From: HP-UX 11i Tuning and Performance