Thursday, March 14, 2013

Recover deleted files                                                                  Run Unix command on Windows

Jmap command is specially used to trace memory mapping of process. jmap prints shared object memory maps or heap memory details of a given process or core file or a remote debug server. Man page of the jmap command also useful to get idea about commands use. If the given process is running on  a 64-bit VM, you may need to specify the -J-d64 option, e.g.:

            jmap -J-d64 -heap pid

       jmap [ option ] pid
       jmap [ option ] executable core
       jmap [ option ] [server-id@]remote-hostname-or-IP

            Options are mutually exclusive. Option, if used, should follow immediately after the command name.

            Process  id  for which the memory map is to be printed. The process must be a Java process. To     get a list of Java processes running on a machine, jps may be used.

          Java executable from which the core dump was produced.

          Core file for which the memory map is to be printed.

          Remote debug server's (see jsadebugd) hostname or IP address.

          Optional unique id, if multiple debug servers are running on the same remote host.

Click here to know more about: Jstat Command in Linux


            <no option> 
                        When  no  option is used jmap prints shared object mappings. For each shared object                     loaded in the target VM, start address, the size of the mapping, and the full path of the shared     object file are printed. This is similar to the Solaris pmap utility. You can see the output of this command at this link : Check Java Process Performance and statistics in Linux

                        Dumps the Java heap in hprof binary format to filename. The live suboption is optional.                 If specified, only the live objects in the heap  are  dumped.  To browse the heap dump, you can        use jhat (Java Heap Analysis Tool) to read the generated file.

                        Prints information on objects awaiting finalization.

                        Prints a heap summary. GC algorithm used, heap configuration and generation wise heap usage are printed.

                        Prints  a  histogram  of the heap. For each Java class, number of objects, memory size in    bytes,   and fully qualified class names are printed. VM internal class names are printed                                    with prefix. If the live suboption is specified, only live objects are counted.

                        Prints class loader wise statistics of permanent generation of Java heap. For each class       loader, its name, liveness, address, parent  class  loader,  and the number and size of classes it            has loaded are printed. In addition, the number and size of interned Strings are printed. Using            this option if you want to see the output then click here: Check Java Process Performance and statistics in Linux

            -F Force
                        Use with jmap -dump or jmap -histo option if the pid does not respond. The live    suboption is not supported in this mode.

Click here to know more about: While Loop in Shell Scripting
Posted by Machindra Dharmadhikari On 3/14/2013 11:19:00 AM No comments


Post a Comment

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

    Chitika Ads 2



    Enter your email address:

    Delivered by FeedBurner