Thursday, March 14, 2013

Install Wine on Ubuntu                                                 Check CPU Usage in Linux
Jstat command is a Java Virtual Machine Statistics Monitoring Tool. The  jstat  tool displays performance statistics for an instrumented HotSpot Java virtual machine (JVM). Man page of jstat command is also useful to get idea about this command. The target JVM is identified by its virtual machine identifier.

SYNOPSIS
       jstat [ generalOption | outputOptionsvmid [interval[s|ms] [count]] ]

PARAMETERS
       generalOption :
                        A single general command-line option (-help, -options, or -version)
           
       outputOptions:
                        One or more output options, consisting of a single statOption, plus any of the -t, -h, and                            -J options.

       vmid
                        Virtual machine identifier, a string indicating the target Java virtual machine (JVM). The               general syntax is
                        [protocol:][//]lvmid[@hostname[:port]/servername]
                        The syntax of the vmid string largely corresponds to the syntax of a URI. The vmid can                            vary from a simple integer representing a local JVM to a more complex construction                                  specifying a communications protocol, port number, and  other  implementation-specific                values.  See  Virtual  Machine  Identifier  for details.

       interval[s|ms]
                      Sampling  interval  in the specified units, seconds (s) or milliseconds (ms). Default unit                                are milliseconds.  Must be a positive integer.  If specified, jstat will produce its output at               each interval.

       count
                      Number of samples to display. Default value is infinity; that is, jstat displays statistics                                 until the target JVM terminates or the jstat command is  terminated. Must be a positive                             integer.

Click here to know more about: Jmap Command in Linux

VIRTUAL MACHINE IDENTIFIER
                               The syntax of the vmid string largely corresponds to the syntax of a URI:
                               [protocol:][//]lvmid[@hostname][:port][/servername]
OPTIONS:
            -statOption
                        Determines  the  statistics information that jstat displays. The following table lists                          the available options.  Use the -options general option to display the list of options                               for a particular platform installation.

            -hn
                        Display a column header every n samples (output rows), where n is a positive integer.                                Default value is 0, which displays  the  column  header  above  the first row of data.
           
            -tn
                        Display a timestamp column as the first column of output. The timestamp is the the time               since the start time of the target JVM.

            -JjavaOption
                        Pass javaOption to the java application launcher. For example, -J-Xms48m sets the                                    startup memory to 48 megabytes.
STAT OPTIONS
             -class Option
            -compiler
            -gc Option ( You will get sample output at :  Check Java Process Performance and statistics in Linux )
            -gccapacity Option
            -gccause
            -gcnew Option
            -gcnewcapacity Option
            -gcold Option
            -gcoldcapacity Option
            -gcpermcapacity Option
            -gcutil
            -printcompilation Option


Using the gcutil option
                   This example attaches to lvmid 21891 and takes 7 samples at 250 millisecond intervals and                displays the output as specified by the -gcutil option.

       jstat -gcutil 21891 250 7

         S0     S1     E      O      P     YGC    YGCT    FGC    FGCT     GCT

        12.44   0.00  27.20   9.49  96.70    78    0.176     5    0.495    0.672

        12.44   0.00  62.16   9.49  96.70    78    0.176     5    0.495    0.672

TimeStamp for each sample

                   This example attaches to lvmid 21891 and takes 3 samples at 250 millisecond intervals. The -t option is used to generate a time stamp for each sample in the
       first column.
       jstat -gcoldcapacity -t 21891 250 3

       Timestamp          OGCMN        OGCMX         OGC           OC       YGC   FGC    FGCT    GCT

                 150.1       1408.0      60544.0      11696.0      11696.0   194    80    2.874   3.799

                 150.4       1408.0      60544.0      13820.0      13820.0   194    81    2.938   3.863

                 150.7       1408.0      60544.0      13820.0      13820.0   194    81    2.938   3.863

                   The Timestamp column reports the elapsed time in seconds since the start of the target                       JVM. In   addition, the -gcoldcapacity output shows the old generation capacity (OGC) and the   old space capacity (OC) increasing as the heap expands to meet allocation and/or promotion             demands. The old generation capacity (OGC) has grown to from 11696 KB to 13820 KB after          the 81st Full GC (FGC). The maximum capacity of the generation (and space) is 60544 KB         (OGCMX), so it still has room to expand.

Options details :

S0C
Current survivor space 0 capacity (KB).
S1C
Current survivor space 1 capacity (KB).
S0U
Survivor space 0 utilization (KB).
S1U
Survivor space 1 utilization (KB).
EC
Current eden space capacity (KB).
EU
Eden space utilization (KB).
OC
Current old space capacity (KB).
OU
Old space utilization (KB).
PC
Current permanent space capacity (KB).
PU
Permanent space utilization (KB).
YGC
Number of young generation GC Events.
YGCT
Young generation garbage collection time.
FGC
Number of full GC events.
FGCT
Full garbage collection time.
GCT
Total garbage collection time.

            Memory Pool Generation and Space Capacities
           

NGCMN
Minimum new generation capacity (KB).
NGCMX
Maximum new generation capacity (KB).
NGC
Current new generation capacity (KB).
S0C
Current survivor space 0 capacity (KB).
S1C
Current survivor space 1 capacity (KB).
EC
Current eden space capacity (KB).
OGCMN
Minimum old generation capacity (KB).
OGCMX
Maximum old generation capacity (KB).
OGC
Current old generation capacity (KB).
OC
Current old space capacity (KB).
PGCMN
Minimum permanent generation capacity (KB).
PGCMX
Maximum Permanent generation capacity (KB).
PGC
Current Permanent generation capacity (KB).
PC
Current Permanent space capacity (KB).
YGC
Number of Young generation GC Events.
FGC
Number of Full GC Events.


                        Garbage Collection Statistics, Including GC Events                    


LGCC
Cause of last Garbage Collection.
GCC
Cause of current Garbage Collection.

If you want to get details about CPU utilization then click on : Check CPU uitlization by mpstat command
Posted by Machindra Dharmadhikari On 3/14/2013 11:11:00 AM 1 comment

1 comments:

Post a Comment

  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube

    Chitika Ads 2

    Histat

    About

    Enter your email address:

    Delivered by FeedBurner