Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ JDK comes with tools JPS     - How to add and delete bookmarks in Ubuntu (Linux)

- RHEL5.x RHEL6.x replace CentOS yum source (Linux)

- Ambari and Hadoop configuration, management and monitoring of the project Getting (Server)

- The difference between vi and nano (Linux)

- How LUKS encrypted disk / partition to perform remote incremental backup (Linux)

- To install Samba server on CentOS 6.6 (Server)

- Appweb configuration in detail (Server)

- Linux deploy Tutorial (Linux)

- How to defragment the hard disk in Linux (Linux)

- Bash job control (Linux)

- Linux command find (Linux)

- Android code performance optimization tips (Programming)

- Linux file permissions and access modes (Linux)

- C language programming entry - macro definitions and enum (Programming)

- How to install Wine 1.7.20 under Ubuntu or Linux Mint (Linux)

- linux raid levels and concepts introduced (Linux)

- Oracle through the alarm log view and inspect the main library, physical and snapshot standby database (Database)

- The headers for the current running kernel were not found when VirtualBox installation enhancements (Linux)

- Java polymorphic methods inside constructors complete analysis (Programming)

- Use LVM partition on Ubuntu and easily adjust the snapshot (Linux)

 
         
  JDK comes with tools JPS
     
  Add Date : 2017-08-31      
         
         
         
  Jps (Java Virtual Machine Process Status Tool) is a JDK supplied all current java process pid command display, simple and practical for the linux / unix / windows platform simply see the current situation some simple java process.

jps its role is to display the id number of the current process of JAVA, can start to view detailed parameters of these processes through opt.

jps located under jdk bin directory.

1, JPS command format

jps [options] [hostid]

2, commonly used parameters

-q Displays pid and no show class name, jar file name and arguments passed to the main method

-m output parameters passed to the main method

jar file full path name -l output of the application main class or the full name of the application package

-v JVM arguments passed to the output

 

Hostid parameter is mainly used to open up the process status of RMI remote virtual machine services (to the server machine can not use this parameter)

 

3, the source code

package com.jdkTools;

 

/ **

 * Simple application for the use of the test comes with the JDK jps

 * Parameters: -Xms30m -Xmx60m

 * Parameter is passed to the main parameters: ffm

 * /

public class EasyJPS {

    public staticvoid main (String [] args) throws Exception {

        while (true) {

            Thread.sleep (5000);

            System.out.println (args [0] + ", in the implementation of ...");

        }

    }

   

}

4, the operating parameters

* Parameters: -Xms30m -Xmx60m, this parameter is used to start the JVM virtual machine

 * Parameter is passed to the main parameters: ffm

5, the results

Microsoft Windows [Version 6.1.7601]

Copyright (c) 2009 Microsoft Corporation. all rights reserved.

 

C: \ Users \ fan> cd C: \ Program Files \ Java \ jdk1.6.0_25 \ bin

 

C: \ Program Files \ Java \ jdk1.6.0_25 \ bin> jps

1628 Jps

2856

7672 EasyJPS

 

C: \ Program Files \ Java \ jdk1.6.0_25 \ bin> jps -q

4432

2856

7672

 

C: \ Program Files \ Java \ jdk1.6.0_25 \ bin> jps -m

2856

7672 EasyJPS ffm

7400 Jps -m

 

C: \ Program Files \ Java \ jdk1.6.0_25 \ bin> jps -l

7944 sun.tools.jps.Jps

2856

7672 com.jdkTools.EasyJPS

 

C: \ Program Files \ Java \ jdk1.6.0_25 \ bin> jps -v

2856 -Xms256m-Xmx768m -XX: MaxPermSize = 256m -XX: ReservedCodeCacheSize = 64m-Dosgi.nls.warnings = ignore

7672 EasyJPS -Xms30m -Xmx60m -Dfile.encoding = GBK

 

Wherein, 7672 EasyJPS ffm

And 7672 EasyJPS -Xms30m -Xmx60m -Dfile.encoding = GBK

We use -m and -v to see the effect of the incoming parameters also printed out together, and can be used in the actual work process.
     
         
         
         
  More:      
 
- The minimum initial use of the Linux operating system RancherOS feelings (Linux)
- OpenSSL to generate public and private key (Linux)
- RHEL 5.7 Yum configure local source [Errno 2] No such file or directory (Linux)
- MySQL high availability cluster fragmentation of deployment uses Fabric (Database)
- VirtualBox snapshots (Linux)
- Bash variable expansion modifier (Programming)
- Close common port to protect server security (Linux)
- Linux System Getting Started Learning: Linux in the last command (Linux)
- Red Flag Linux Desktop 6.0 hard disk installation guide (Programming)
- Three strategies to teach you to release the device memory (Linux)
- How to configure MariaDB replication in CentOS Linux (Database)
- Nginx + ownCloud + PHP + MySQL to build personal private cloud under CentOS7 (Server)
- PL / SQL -> UTL_FILE use presentation package (Database)
- Understanding the type in C ++ bitset (Programming)
- Enable Intel Rapid Start in GNU / Linux (Linux)
- DupeGuru- find and remove duplicate files (Linux)
- When Linux Detailed time zone and common function of time (Linux)
- DDOS Attacks and Prevention (Linux)
- Django1.8 return json json string and the string contents of the received post (Programming)
- ASM Disk Space Check (Database)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.