zoukankan      html  css  js  c++  java
  • java使用sh或是jsvc来做daemon应该是主流

    jsvc(1): application to launch java daemon - Linux man page

        jsvc(1) - Linux man page
        Name

        jsvc - application to launch java daemon
        Synopsis

        jsvc [-jvm JVM name] [-classpath path] [-cp path] [-home directory] [-version] [-help] [-?] [-nodetach] [-debug] [-check] [-user user] [-wait waittime] [-stop] [-verbose:class|gc|jni] [-outfile /full/path/to/file] [-errfile /full/path/to/file] [-pidfile /full/path/to/file] [-Dproperty=value] [-Xoption]
        Description

        jsvc executes classfile that implements a Daemon interface.
        Options

        -jvm JVM name

            use a specific Java Virtual Machine.
        -cp/ -classpath directory and zip/jar files
            set search path for service classes and resouces
        -home directory
            set the path of your JDK or JRE installation (or set the JAVA_HOME environment variable)
        -version
            show the current Java environment version (to check correctness of -home and -jvm. Implies -nodetach)
        -help
            show this help page (implies -nodetach)
        -nodetach
            don't detach from parent process and become a daemon
        -debug
            verbosely print debugging information
        -check
            only check service (implies -nodetach)
        -stop
            stop the service using the file given in the -pidfile option
        -wait waittime
            wait up to waittime seconds for the service to start waittime should multiple of 10 (min=10)
        -user user
            user used to run the daemon (defaults to current user)
        -verbose[:class|gc|jni]
            enable verbose output
        -outfile /full/path/to/file
            Location for output from stdout (defaults to /dev/null). Use the value '&2' to simulate '1>&2'
        -errfile /full/path/to/file
            Location for output from stderr (defaults to /dev/null). Use the value '&1' to simulate '2>&1'
        -pidfile /full/path/to/file
            Location for output from the file containing the pid of jsvc (defaults to /var/run/jsvc.pid)
        -D<name>=<value>
            set a Java system property
        -X<option>
            set Virtual Machine specific option

        Author

        JSVC is part of the Jakarta Commons Daemon project. Authors are Jean-Frederic Clere, Remy Maucherat, Yoav Shapira, Bill Barker. JSVC is under the Apache License Version 2.0.
  • 相关阅读:
    JSON字符串转对象,List集合,需要的jar 包
    VirtualBox 更改虚拟磁盘大小
    SpringBoot webSocket 发送广播、点对点消息,Android接收
    window系统下添加 glassfish 的系统服务
    idea把java web项目打成war包
    栈类型数据的运用
    leetcode实践:找出两个有序数组的中位数
    leetcode实践:通过链表存储两数之和
    通过监控Nginx日志来实时屏蔽高频恶意访问的IP
    Java版分布式ID生成器技术介绍
  • 原文地址:https://www.cnblogs.com/lexus/p/2364102.html
Copyright © 2011-2022 走看看