4 Monitoring Applications ............................................................................................

36

Controlling Data Collection and Display.............................................................................................

36

Setting Data Collection Preferences......................................................................................................

36

Managing Node Agents........................................................................................................................

37

Managing Node Agents On HP-UX................................................................................................

37

Running Node Agent as a Daemon...........................................................................................

37

Verifying HP-UX Daemon is Running.......................................................................................

37

Starting Node Agents Manually................................................................................................

37

Stopping Node Agents...............................................................................................................

38

Node Agent Access Restrictions......................................................................................................

38

Running Multiple Node Agents......................................................................................................

38

Saving Monitoring Metrics Information...............................................................................................

38

Saving Data from the Console.........................................................................................................

39

Naming Monitoring Data Files.............................................................................................................

39

Diagnosing Errors When Monitoring Running Applications..............................................................

39

Identifying Unexpected CPU Usage by Method.............................................................................

39

Viewing the Application Load........................................................................................................

40

Checking for Long Garbage Collection Pauses...............................................................................

40

Checking for Application Paging Problems....................................................................................

40

Identifying Excessive Calls to System.gc()......................................................................................

41

Reviewing the Percentage of Time Spent in Garbage Collection....................................................

41

Checking for Proper Heap Sizing....................................................................................................

43

Confirming Java Memory Leaks......................................................................................................

43

Determining the Severity of a Memory Leak..................................................................................

43

Identifying Excessive Object Allocation..........................................................................................

44

Identifying the Site of Excessive Object Allocation.........................................................................

44

Identifying Abnormal Thread Termination....................................................................................

44

Identifying Multiple Short-lived Threads.......................................................................................

44

Identifying Excessive Lock Contention...........................................................................................

45

Identifying Deadlocked Threads.....................................................................................................

45

Identifying Excessive Thread Creation...........................................................................................

45

Identifying Excessive Method Compilation....................................................................................

46

Identifying Too Many Classes Loaded............................................................................................

47

Using the JMX Viewer...........................................................................................................................

47

Understanding the JMX Summary View.........................................................................................

48

JMX Summary Tab.....................................................................................................................

48

JMX Memory Tab.......................................................................................................................

49

JMX Threads Tab........................................................................................................................

51

JMX Runtime Tab.......................................................................................................................

52

JMX Notifications Tab................................................................................................................

52

Changing Mbean Values and Monitoring the Result......................................................................

52

Using the Functions in the JMX Server View..................................................................................

53

The MBean Filter........................................................................................................................

53

The MBean Attribute Tab...........................................................................................................

54

The MBean Operations Tab........................................................................................................

55

The MBean Notifications Tab.....................................................................................................

56

The MBean Information Tab......................................................................................................

56

5 Profiling Applications .................................................................................................

58

Profiling Overview................................................................................................................................

58

Tracing.............................................................................................................................................

59

Sampling..........................................................................................................................................

59

Tuning Performance........................................................................................................................

59

Preparing a Benchmark........................................................................................................................

60

Collecting Profile Data..........................................................................................................................

61

4Table of Contents