Skip to content

USER QUICK START

oldmanpushcart@gmail.com edited this page Jan 26, 2023 · 1 revision

BANNER

快速入门

下载并安装

# 下载最新版本的JVM-SANDBOX
wget http://ompc.oss-cn-hangzhou.aliyuncs.com/jvm-sandbox/release/sandbox-stable-bin.zip

# 解压
unzip sandbox-stable-bin.zip

挂载目标JVM

# 进入沙箱执行脚本
cd sandbox/bin

# 目标JVM进程33342
./sandbox.sh -p 33342
  • 挂载成功后会提示

    ./sandbox.sh -p 33342
               NAMESPACE : default
                 VERSION : 1.2.0
                    MODE : ATTACH
             SERVER_ADDR : 0.0.0.0
             SERVER_PORT : 55756
          UNSAFE_SUPPORT : ENABLE
            SANDBOX_HOME : /Users/vlinux/opt/sandbox
       SYSTEM_MODULE_LIB : /Users/vlinux/opt/sandbox/module
         USER_MODULE_LIB : ~/.sandbox-module;
     SYSTEM_PROVIDER_LIB : /Users/vlinux/opt/sandbox/provider
      EVENT_POOL_SUPPORT : DISABLE
  • 查看挂载模块

    ./sandbox.sh -p 33342 -l
    
    sandbox-info        ACTIVE  LOADED  0  0  0.0.4  luanjia@taobao.com
    sandbox-module-mgr  ACTIVE  LOADED  0  0  0.0.2  luanjia@taobao.com
    sandbox-control     ACTIVE  LOADED  0  0  0.0.3  luanjia@taobao.com
    total=3
  • 沙箱日志:~/logs/sandbox/sandbox.log

    cat ~/logs/sandbox/sandbox.log
    
    2019-02-01 17:06:00 default INFO  
         ___     ____  __      ____    _    _   _ ____  ____   _____  __
        | \ \   / /  \/  |    / ___|  / \  | \ | |  _ \| __ ) / _ \ \/ /
     _  | |\ \ / /| |\/| |____\___ \ / _ \ |  \| | | | |  _ \| | | \  /
    | |_| | \ V / | |  | |_____|__) / ___ \| |\  | |_| | |_) | |_| /  \
     \___/   \_/  |_|  |_|    |____/_/   \_\_| \_|____/|____/ \___/_/\_\
    2019-02-01 17:06:00 default INFO  initializing logback success. file=/Users/vlinux/opt/sandbox/cfg/sandbox-logback.xml;
    2019-02-01 17:06:00 default INFO  initializing server. cfg=;mode=attach;sandbox_home=/Users/vlinux/opt/sandbox;  user_module=~/.sandbox-module\;;cfg=/Users/vlinux/opt/sandbox/cfg;provider=/Users/vlinux/opt/sandbox/provider;  namespace=default;server.ip=0.0.0.0;server.port=0;system_module=/Users/vlinux/opt/sandbox/module;unsafe.enable=true;
    ...
    2019-02-01 17:06:00 default INFO  initialized server. actual bind to 0.0.0.0:65365
    2019-02-01 17:06:00 default INFO  server[0.0.0.0:0] bind success.

卸载沙箱

./sandbox.sh -p 33342 -S
jvm-sandbox[default] shutdown finished.

LOGO

JVM沙箱偏向于底层产品,受众面比较窄,问题反馈沟通很可能会因为各种原因造成不及时。所以我们建立了一个钉钉小群,方便大家在这里进行沟通。

Clone this wiki locally