├── .gitignore ├── LICENSE ├── PM25-Cli ├── ADVANCED_README.md ├── CHANGELOG.md ├── CONTRIBUTING.md ├── GNU-AGPL-3.0.txt ├── LICENSE ├── Makefile ├── README.md ├── REFORMLOG.md ├── bin │ ├── pm2 │ ├── pm2-dev │ ├── pm2-docker │ └── rundev ├── constants.js ├── examples │ ├── binary │ │ ├── ecosystem.json │ │ ├── http.js │ │ ├── ls │ │ └── ls.yml │ ├── custom-action │ │ ├── index.js │ │ └── package.json │ ├── custom-nodejs-version │ │ ├── ecosystem.config.js │ │ └── http.js │ ├── echo.js │ ├── extra-lang │ │ ├── bashscript.sh │ │ ├── echo.php │ │ ├── echo.py │ │ └── echo.rb │ ├── graceful-http.js │ ├── http.js │ ├── keymetrics-integration │ │ ├── actions-fibonacci.js │ │ ├── auto-init.js │ │ ├── custom_action.js │ │ ├── custom_action_with_params.js │ │ ├── event.js │ │ ├── http_app.js │ │ ├── http_transaction.js │ │ ├── http_transaction_2.js │ │ ├── keymetrics-load.js │ │ ├── keymetrics-test.js │ │ ├── pid_info.js │ │ ├── pm2_probe.js │ │ ├── probes.js │ │ ├── scoped-actions.js │ │ └── throw.js │ ├── module-init │ │ ├── index.js │ │ └── package.json │ ├── module-sample │ │ ├── package.json │ │ └── scoped-action.js │ ├── process-actions.js │ ├── process-file │ │ ├── connection_check.sh │ │ ├── http.js │ │ ├── process.config.js │ │ ├── process.json │ │ └── worker.js │ ├── process-metrics.js │ ├── promise_rejection.js │ ├── remote-action.js │ ├── signals │ │ └── http.js │ ├── tcp.js │ ├── throw.js │ ├── transpilers │ │ ├── echo.coffee │ │ ├── echo.ls │ │ ├── echo.ts │ │ ├── http.ts │ │ └── node.d.ts │ ├── v1 │ │ ├── 001-test.js │ │ ├── apps │ │ │ ├── all-pm2.json │ │ │ ├── args.json │ │ │ ├── auto-kill-echo.json │ │ │ ├── cluster-pm2.json │ │ │ ├── cron-pm2.json │ │ │ ├── default-path-echo.json │ │ │ ├── echo-pm2.json │ │ │ ├── env-pm2.json │ │ │ ├── killfast.json │ │ │ ├── multi-pm2.json │ │ │ └── no-name-echo.json │ │ ├── args.js │ │ ├── auto-restart-all.js │ │ ├── auto-restart-threshold.js │ │ ├── auto-save.js │ │ ├── beforeExit.js │ │ ├── child-echo.json │ │ ├── child-env.js │ │ ├── child-pm2.json │ │ ├── child.js │ │ ├── child.js-pm2.json │ │ ├── child2.js │ │ ├── client.js │ │ ├── cwd.js │ │ ├── echo.coffee │ │ ├── echo.js │ │ ├── echokill.js │ │ ├── env.js │ │ ├── env_args.js │ │ ├── exec_watch.json │ │ ├── exit.js │ │ ├── expose_method.js │ │ ├── graceful-exit.js │ │ ├── harmony.js │ │ ├── http.js │ │ ├── infinite-recurse.js │ │ ├── inside.js │ │ ├── inside.json │ │ ├── interact.js │ │ ├── json.js │ │ ├── kill-not-so-fast.js │ │ ├── kill-slow.js │ │ ├── killfast.js │ │ ├── killslow.js │ │ ├── killtoofast.js │ │ ├── leak.js │ │ ├── malformated.json │ │ ├── modulechild.js │ │ ├── moduleparent.js │ │ ├── null.js │ │ ├── package.json │ │ ├── process.json │ │ ├── programmatic.js │ │ ├── require.js │ │ ├── sendmsg.js │ │ ├── sigint.js │ │ ├── start-args.js │ │ ├── stop-after5.js │ │ ├── string-crash.js │ │ ├── throw.js │ │ ├── tree.js │ │ ├── udp.js │ │ └── wrap.js │ └── wait-ready │ │ ├── app.js │ │ └── ecosystem.json ├── index.js ├── lib │ ├── API.js │ ├── API │ │ ├── CliUx.js │ │ ├── Configuration.js │ │ ├── Containerizer.js │ │ ├── Deploy.js │ │ ├── Extra.js │ │ ├── Interaction.js │ │ ├── Log.js │ │ ├── LogManagement.js │ │ ├── Modules │ │ │ ├── Modularizer.js │ │ │ └── Modules.js │ │ ├── Monit.js │ │ ├── Spinner.js │ │ ├── Startup.js │ │ ├── Version.js │ │ ├── interpreter.json │ │ └── schema.json │ ├── Client.js │ ├── Common.js │ ├── Configuration.js │ ├── Daemon.js │ ├── DevCli.js │ ├── Event.js │ ├── God.js │ ├── God │ │ ├── ActionMethods.js │ │ ├── ClusterMode.js │ │ ├── ForkMode.js │ │ ├── Methods.js │ │ └── Reload.js │ ├── HttpInterface.js │ ├── Interactor │ │ ├── Cipher.js │ │ ├── Daemon.js │ │ ├── Filter.js │ │ ├── HttpRequest.js │ │ ├── InteractorDaemonizer.js │ │ ├── Password.js │ │ ├── PushInteractor.js │ │ ├── RemoteActions │ │ │ ├── CustomActions.js │ │ │ ├── Pm2Actions.js │ │ │ └── ScopedExecution.js │ │ ├── ReverseInteractor.js │ │ ├── Tools.js │ │ ├── TransactionAggregator.js │ │ ├── Utility.js │ │ ├── WatchDog.js │ │ ├── internal-ip.js │ │ └── pm2-interface.js │ ├── Monit.js │ ├── ProcessContainer.js │ ├── ProcessContainerFork.js │ ├── Satan.js │ ├── TreeKill.js │ ├── Utility.js │ ├── Watcher.js │ ├── Worker.js │ ├── completion.js │ ├── completion.sh │ ├── keymetrics │ ├── templates │ │ ├── Dockerfiles │ │ │ ├── Dockerfile-java.tpl │ │ │ ├── Dockerfile-nodejs.tpl │ │ │ └── Dockerfile-ruby.tpl │ │ ├── ecosystem.tpl │ │ ├── init-scripts │ │ │ ├── launchd.tpl │ │ │ ├── openrc.tpl │ │ │ ├── pm2-init-amazon.sh │ │ │ ├── rcd.tpl │ │ │ ├── systemd.tpl │ │ │ └── upstart.tpl │ │ └── logrotate.d │ │ │ └── pm2 │ └── tools │ │ ├── Config.js │ │ ├── fmt.js │ │ ├── isbinaryfile.js │ │ ├── json5.js │ │ └── promise.min.js ├── package.json ├── packager │ ├── build-deb.sh │ ├── build-dist.sh │ ├── debian │ │ ├── control.in │ │ ├── copyright │ │ ├── description │ │ └── lintian-overrides │ └── deploy.sh ├── paths.js ├── pres │ ├── cluster-support.png │ ├── legacy-logo.png │ ├── pm2-desc.png │ ├── pm2-dev.png │ ├── pm2-list.png │ ├── pm2-logs.png │ ├── pm2-monit.png │ ├── pm2-v2.png │ ├── pm2-versioning-metadata.png │ ├── pm2.20d3ef.png │ └── schema.png └── test │ ├── README.md │ ├── bash │ ├── app-config-update.sh │ ├── app-configuration.sh │ ├── args.sh │ ├── binary.sh │ ├── cli-actions-1.sh │ ├── cli-actions-2.sh │ ├── cli-ux.sh │ ├── cron-system.sh │ ├── docker.sh │ ├── env-refresh.sh │ ├── extra-lang.sh │ ├── file-descriptor.sh │ ├── fork.sh │ ├── get-set.sh │ ├── gracefulReload.sh │ ├── gracefulReload2.sh │ ├── gracefulReload3.sh │ ├── harmony.sh │ ├── homogen-json-action.sh │ ├── include.sh │ ├── infinite-loop.sh │ ├── inside-pm2.sh │ ├── interact.sh │ ├── interpreter.sh │ ├── issues │ │ └── 2337.sh │ ├── js-configuration.sh │ ├── json-file.sh │ ├── json-reload.sh │ ├── listen-timeout.sh │ ├── log-custom.sh │ ├── log-entire.sh │ ├── log-reload.sh │ ├── log-timestamp.sh │ ├── misc.sh │ ├── module.sh │ ├── multiparam.sh │ ├── nvm-node-version.sh │ ├── piped-config.sh │ ├── pm2-dev.sh │ ├── pmx_injection.sh │ ├── promise.sh │ ├── pull.sh │ ├── reload.sh │ ├── reset.sh │ ├── resurrect.sh │ ├── right-exit-code.sh │ ├── signal.sh │ ├── smart-start.sh │ ├── source_map.sh │ ├── start-consistency.sh │ ├── startOrX.sh │ ├── startup.sh │ ├── versioning-cmd.sh │ ├── vizion.sh │ ├── wait-ready-event.sh │ ├── watch.sh │ ├── wrapped-fork.sh │ └── yaml-configuration.sh │ ├── benchmarks │ ├── monit-daemon.sh │ ├── monit.sh │ └── result.monit │ ├── fixtures │ ├── 001-test.js │ ├── all.json │ ├── all2.json │ ├── app-config-update │ │ ├── args1.json │ │ ├── args2.json │ │ └── echo.js │ ├── args.js │ ├── args │ │ ├── echo.js │ │ └── params_check.js │ ├── bashscript.sh │ ├── big-array-es6.js │ ├── big-array-listen.js │ ├── big-array.js │ ├── binary-js-file │ ├── binary-js-file.js │ ├── binary-py-file.py │ ├── change_cwd.json │ ├── child.js │ ├── child_no_http.js │ ├── cluster-pm2.json │ ├── cluster │ │ └── sigint_catcher.js │ ├── conf.json │ ├── configuration.js │ ├── configuration.json │ ├── containerizer │ │ ├── Dockerfile.dev │ │ └── Dockerfile.prod │ ├── cron.js │ ├── cron │ │ ├── mock-cron-no-exit.js │ │ └── mock-cron.js │ ├── custom_actions │ │ └── index.js │ ├── delayed_exit.js │ ├── docker │ │ └── expressor │ │ │ ├── app.js │ │ │ ├── package.json │ │ │ ├── process.json │ │ │ └── worker.js │ ├── echo-env.js │ ├── echo-pm2.json │ ├── echo-post.json │ ├── echo-to-pm2.json │ ├── echo.coffee │ ├── echo.js │ ├── echo2.js │ ├── echo3.js │ ├── echoto-pm2.json │ ├── ecosystem.config.js │ ├── ecosystem.json │ ├── ecosystem.json5 │ ├── env-ecosystem.json │ ├── env-refreshed.json │ ├── env-switching │ │ ├── app.json │ │ └── child.js │ ├── env.js │ ├── env.json │ ├── events │ │ ├── custom_action.js │ │ ├── custom_action_with_params.js │ │ └── own_event.js │ ├── extra-lang │ │ ├── apps.json │ │ ├── echo.php │ │ └── echo.py │ ├── git │ │ ├── COMMIT_EDITMSG │ │ ├── HEAD │ │ ├── config │ │ ├── description │ │ ├── hooks │ │ │ ├── applypatch-msg.sample │ │ │ ├── commit-msg.sample │ │ │ ├── post-update.sample │ │ │ ├── pre-applypatch.sample │ │ │ ├── pre-commit.sample │ │ │ ├── pre-push.sample │ │ │ ├── pre-rebase.sample │ │ │ ├── prepare-commit-msg.sample │ │ │ └── update.sample │ │ ├── index │ │ ├── info │ │ │ └── exclude │ │ ├── logs │ │ │ ├── HEAD │ │ │ └── refs │ │ │ │ ├── heads │ │ │ │ └── master │ │ │ │ └── remotes │ │ │ │ └── origin │ │ │ │ └── master │ │ ├── objects │ │ │ ├── 5d │ │ │ │ └── a45b6659e5cba8f444616f4e18529ad5dde72f │ │ │ ├── 7a │ │ │ │ └── e6d7c64d39da2167c33993e1f4f0233e8eb6f0 │ │ │ └── e6 │ │ │ │ └── 9de29bb2d1d6434b8b29ae775ad8c2e48c5391 │ │ └── refs │ │ │ ├── heads │ │ │ └── master │ │ │ └── remotes │ │ │ └── origin │ │ │ └── master │ ├── graceful-exit-no-listen.js │ ├── graceful-exit-send.js │ ├── graceful-exit.js │ ├── harmony.js │ ├── harmony.json │ ├── homogen-json-action │ │ ├── all.json │ │ └── http.js │ ├── http.js │ ├── inside │ │ ├── echo.js │ │ ├── inner_restart.sh │ │ ├── reload_inside.js │ │ ├── restart_inside.js │ │ └── start_inside.js │ ├── insidePm2Process.js │ ├── interface │ │ ├── child.js │ │ ├── http_transaction.js │ │ ├── human_event.js │ │ ├── log_out.js │ │ ├── process_exception.js │ │ ├── process_exception_with_logs.js │ │ └── promise_rejection.js │ ├── interpreter │ │ ├── echo.coffee │ │ ├── echo.ls │ │ └── echo.ts │ ├── js-configuration │ │ ├── app.js │ │ └── ecosystem.config.js │ ├── json-reload │ │ ├── big-array.js │ │ ├── echo-env.js │ │ ├── echo-post.json │ │ ├── echo-pre.json │ │ ├── max-mem-0.json │ │ └── max-mem.json │ ├── killnotsofast.js │ ├── killtoofast.js │ ├── listen-timeout │ │ └── wait-ready.js │ ├── local_require.js │ ├── module-fixture │ │ ├── package.json │ │ └── scoped-action.js │ ├── multi-echo.json │ ├── network.js │ ├── no-restart.json │ ├── no-vizion.json │ ├── no_cwd_change.json │ ├── nvm-node-version │ │ ├── ecosystem.json │ │ └── http.js │ ├── path-check.js │ ├── path-resolution │ │ ├── echo.js │ │ ├── ecosystem.config.js │ │ └── ecosystem2.config.js │ ├── path1 │ │ ├── iminpath1.js │ │ └── path2 │ │ │ └── iminpath2.js │ ├── pm2-dev │ │ ├── app.js │ │ └── app.json │ ├── probes.js │ ├── process.json │ ├── promise │ │ ├── empty-rejection.js │ │ └── rejection.js │ ├── python-script.py │ ├── quit.js │ ├── send-data-process │ │ └── return-data.js │ ├── server.js │ ├── signal.js │ ├── signals │ │ └── delayed_sigint.js │ ├── source-map │ │ ├── main.js │ │ ├── main.js.map │ │ ├── models.js │ │ └── models.js.map │ ├── start-consistency │ │ ├── child.js │ │ └── child.json │ ├── startProcessInsidePm2.js │ ├── startProcessInsidePm2.json │ ├── stdout-stderr.js │ ├── throw-later.js │ ├── throw-later.json │ ├── throw-later1.json │ ├── throw-string.js │ ├── throw.js │ ├── toto.js │ ├── wait_ready_event │ │ ├── http-wait-start.js │ │ └── http-wait-start_nocb.js │ ├── watch │ │ ├── app-watch-rename.json │ │ ├── app-watch.json │ │ ├── app.json │ │ └── http.js │ ├── watcher │ │ ├── donotwatchme.dir │ │ │ └── .gitkeep │ │ ├── server-watch.bak.js │ │ ├── server-watch.js │ │ ├── server-watch.json │ │ └── watchme.sym │ └── yaml-configuration │ │ ├── apps.yaml │ │ ├── apps.yml │ │ ├── child.js │ │ ├── echo.js │ │ ├── echo.py │ │ └── malformated.yml │ ├── helpers │ ├── apps.js │ └── plan.js │ ├── interface │ ├── README.md │ ├── aggregator.mocha.js │ ├── bus.fork.spec.mocha.js │ ├── bus.spec.mocha.js │ ├── custom-actions.mocha.js │ ├── exception.e2e.mocha.js │ ├── interactor.connect.mocha.js │ ├── interactor.daemonizer.mocha.js │ ├── misc │ │ ├── trace.json │ │ └── trace_factory.js │ ├── mocha.opts │ ├── password.mocha.js │ ├── pm2.link.check.mocha.js │ ├── push_interactor.mocha.js │ ├── remote.mocha.js │ ├── request.mocha.js │ └── scoped_pm2_actions.mocha.js │ ├── mocha.opts │ ├── parallel_programmatic_tests.sh │ ├── pm2_behavior_tests.sh │ ├── pm2_programmatic_tests.sh │ ├── programmatic │ ├── api.backward.compatibility.mocha.js │ ├── api.mocha.js │ ├── client.mocha.js │ ├── cluster.mocha.js │ ├── configuration.mocha.js │ ├── containerizer.mocha.js │ ├── custom_action.mocha.js │ ├── deprecated │ │ └── modularizer.mocha.js │ ├── env_switching.js │ ├── god.mocha.js │ ├── inside.mocha.js │ ├── json_validation.mocha.js │ ├── lazy_api.mocha.js │ ├── logs.js │ ├── max_memory_limit.js │ ├── misc_commands.js │ ├── mocha.opts │ ├── path_resolution.mocha.js │ ├── programmatic.js │ ├── send_data_process.mocha.js │ ├── signals.js │ └── watcher.js │ └── programmatic_commands.txt ├── PM25-Cloud ├── README.md ├── TODO.md ├── app.js ├── bower.json ├── configure.json ├── controllers │ ├── api.js │ ├── index.js │ └── settoken.js ├── gulpfile.js ├── helpers │ └── MongoDBPool.js ├── index.js ├── models │ ├── buckets.js │ └── transactions.js ├── package.json ├── processes.json ├── public │ ├── buildin │ │ └── css │ │ │ └── style.css │ ├── css │ │ ├── bootstrap-3.3.4.min.css │ │ ├── font-awesome.min.css │ │ ├── pm25.css │ │ ├── reset.css │ │ ├── style.css │ │ └── style.less │ ├── docs │ │ ├── .buildinfo │ │ ├── _images │ │ │ ├── apple_watch_app.png │ │ │ ├── bucket_create.png │ │ │ ├── bucket_create_button.png │ │ │ ├── bucket_create_mirror.png │ │ │ ├── buckets.png │ │ │ ├── host_exceptions.png │ │ │ ├── host_red.png │ │ │ ├── hosts.png │ │ │ ├── ios_app.png │ │ │ ├── login.png │ │ │ ├── pm25_how_it_works_001.jpg │ │ │ ├── pm25_how_it_works_002.jpg │ │ │ ├── trigger_create_button.png │ │ │ ├── trigger_create_example.png │ │ │ └── triggers.png │ │ ├── _sources │ │ │ ├── advanced.txt │ │ │ ├── getting_started.txt │ │ │ ├── help.txt │ │ │ ├── index.txt │ │ │ ├── installation.txt │ │ │ └── introduction.txt │ │ ├── _static │ │ │ ├── ajax-loader.gif │ │ │ ├── alabaster.css │ │ │ ├── alert_info_32.png │ │ │ ├── alert_warning_32.png │ │ │ ├── background_b01.png │ │ │ ├── basic.css │ │ │ ├── bg-page.png │ │ │ ├── bizstyle.css │ │ │ ├── bizstyle.js │ │ │ ├── bullet_orange.png │ │ │ ├── classic.css │ │ │ ├── comment-bright.png │ │ │ ├── comment-close.png │ │ │ ├── comment.png │ │ │ ├── css │ │ │ │ ├── badge_only.css │ │ │ │ └── theme.css │ │ │ ├── css3-mediaqueries.js │ │ │ ├── css3-mediaqueries_src.js │ │ │ ├── darkmetal.png │ │ │ ├── doctools.js │ │ │ ├── down-pressed.png │ │ │ ├── down.png │ │ │ ├── file.png │ │ │ ├── fonts │ │ │ │ ├── Inconsolata-Bold.ttf │ │ │ │ ├── Inconsolata.ttf │ │ │ │ ├── Lato-Bold.ttf │ │ │ │ ├── Lato-Regular.ttf │ │ │ │ ├── RobotoSlab-Bold.ttf │ │ │ │ ├── RobotoSlab-Regular.ttf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ └── fontawesome-webfont.woff │ │ │ ├── haiku.css │ │ │ ├── headerbg.png │ │ │ ├── jquery-1.11.1.js │ │ │ ├── jquery.js │ │ │ ├── js │ │ │ │ ├── modernizr.min.js │ │ │ │ └── theme.js │ │ │ ├── logo.png │ │ │ ├── metal.png │ │ │ ├── minus.png │ │ │ ├── nature.css │ │ │ ├── navigation.png │ │ │ ├── plus.png │ │ │ ├── print.css │ │ │ ├── pygments.css │ │ │ ├── scrolls.css │ │ │ ├── searchtools.js │ │ │ ├── sidebar.js │ │ │ ├── theme_extras.js │ │ │ ├── translations.js │ │ │ ├── underscore-1.3.1.js │ │ │ ├── underscore.js │ │ │ ├── up-pressed.png │ │ │ ├── up.png │ │ │ ├── watermark.png │ │ │ ├── watermark_blur.png │ │ │ └── websupport.js │ │ ├── advanced.html │ │ ├── genindex.html │ │ ├── getting_started.html │ │ ├── help.html │ │ ├── index.html │ │ ├── installation.html │ │ ├── introduction.html │ │ ├── objects.inv │ │ ├── search.html │ │ └── searchindex.js │ ├── favicon.ico │ ├── font │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ └── fontawesome-webfont.woff │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff │ ├── img │ │ ├── favicon.png │ │ ├── glyphicons-halflings-white.png │ │ ├── glyphicons-halflings.png │ │ ├── logo.png │ │ ├── logo@2x.png │ │ ├── pm25-logo-latest.png │ │ └── satinweave.png │ └── js │ │ ├── controllers │ │ ├── bucketCreateController.js │ │ ├── bucketsController.js │ │ ├── hostListController.js │ │ └── transactionsController.js │ │ ├── filters │ │ ├── ansiToHtml.js │ │ ├── decimalPlacesFilter.js │ │ ├── humaniseFilter.js │ │ ├── memoryFilter.js │ │ ├── serverNameFilter.js │ │ ├── timestampFormatFilter.js │ │ ├── timestampParseFilter.js │ │ └── uptimeFilter.js │ │ ├── index.js │ │ ├── sunburst.js │ │ └── vendor │ │ ├── angular │ │ ├── angular-animate.js │ │ ├── angular-animate.min.js │ │ ├── angular-animate.min.js.map │ │ ├── angular-cookies.js │ │ ├── angular-cookies.min.js │ │ ├── angular-cookies.min.js.map │ │ ├── angular-csp.css │ │ ├── angular-loader.js │ │ ├── angular-loader.min.js │ │ ├── angular-loader.min.js.map │ │ ├── angular-mocks.js │ │ ├── angular-resource.js │ │ ├── angular-resource.min.js │ │ ├── angular-resource.min.js.map │ │ ├── angular-route.js │ │ ├── angular-route.min.js │ │ ├── angular-route.min.js.map │ │ ├── angular-sanitize.js │ │ ├── angular-sanitize.min.js │ │ ├── angular-sanitize.min.js.map │ │ ├── angular-scenario.js │ │ ├── angular-touch.js │ │ ├── angular-touch.min.js │ │ ├── angular-touch.min.js.map │ │ ├── angular.js │ │ ├── angular.min.js │ │ ├── angular.min.js.map │ │ ├── errors.json │ │ ├── i18n │ │ │ ├── angular-locale_af-na.js │ │ │ ├── angular-locale_af-za.js │ │ │ ├── angular-locale_af.js │ │ │ ├── angular-locale_am-et.js │ │ │ ├── angular-locale_am.js │ │ │ ├── angular-locale_ar-001.js │ │ │ ├── angular-locale_ar-ae.js │ │ │ ├── angular-locale_ar-bh.js │ │ │ ├── angular-locale_ar-dz.js │ │ │ ├── angular-locale_ar-eg.js │ │ │ ├── angular-locale_ar-iq.js │ │ │ ├── angular-locale_ar-jo.js │ │ │ ├── angular-locale_ar-kw.js │ │ │ ├── angular-locale_ar-lb.js │ │ │ ├── angular-locale_ar-ly.js │ │ │ ├── angular-locale_ar-ma.js │ │ │ ├── angular-locale_ar-om.js │ │ │ ├── angular-locale_ar-qa.js │ │ │ ├── angular-locale_ar-sa.js │ │ │ ├── angular-locale_ar-sd.js │ │ │ ├── angular-locale_ar-sy.js │ │ │ ├── angular-locale_ar-tn.js │ │ │ ├── angular-locale_ar-ye.js │ │ │ ├── angular-locale_ar.js │ │ │ ├── angular-locale_bg-bg.js │ │ │ ├── angular-locale_bg.js │ │ │ ├── angular-locale_bn-bd.js │ │ │ ├── angular-locale_bn-in.js │ │ │ ├── angular-locale_bn.js │ │ │ ├── angular-locale_ca-ad.js │ │ │ ├── angular-locale_ca-es.js │ │ │ ├── angular-locale_ca.js │ │ │ ├── angular-locale_cs-cz.js │ │ │ ├── angular-locale_cs.js │ │ │ ├── angular-locale_da-dk.js │ │ │ ├── angular-locale_da.js │ │ │ ├── angular-locale_de-at.js │ │ │ ├── angular-locale_de-be.js │ │ │ ├── angular-locale_de-ch.js │ │ │ ├── angular-locale_de-de.js │ │ │ ├── angular-locale_de-li.js │ │ │ ├── angular-locale_de-lu.js │ │ │ ├── angular-locale_de.js │ │ │ ├── angular-locale_el-cy.js │ │ │ ├── angular-locale_el-gr.js │ │ │ ├── angular-locale_el.js │ │ │ ├── angular-locale_en-as.js │ │ │ ├── angular-locale_en-au.js │ │ │ ├── angular-locale_en-bb.js │ │ │ ├── angular-locale_en-be.js │ │ │ ├── angular-locale_en-bm.js │ │ │ ├── angular-locale_en-bw.js │ │ │ ├── angular-locale_en-bz.js │ │ │ ├── angular-locale_en-ca.js │ │ │ ├── angular-locale_en-dsrt-us.js │ │ │ ├── angular-locale_en-dsrt.js │ │ │ ├── angular-locale_en-fm.js │ │ │ ├── angular-locale_en-gb.js │ │ │ ├── angular-locale_en-gu.js │ │ │ ├── angular-locale_en-gy.js │ │ │ ├── angular-locale_en-hk.js │ │ │ ├── angular-locale_en-ie.js │ │ │ ├── angular-locale_en-in.js │ │ │ ├── angular-locale_en-iso.js │ │ │ ├── angular-locale_en-jm.js │ │ │ ├── angular-locale_en-mh.js │ │ │ ├── angular-locale_en-mp.js │ │ │ ├── angular-locale_en-mt.js │ │ │ ├── angular-locale_en-mu.js │ │ │ ├── angular-locale_en-na.js │ │ │ ├── angular-locale_en-nz.js │ │ │ ├── angular-locale_en-ph.js │ │ │ ├── angular-locale_en-pk.js │ │ │ ├── angular-locale_en-pr.js │ │ │ ├── angular-locale_en-pw.js │ │ │ ├── angular-locale_en-sg.js │ │ │ ├── angular-locale_en-tc.js │ │ │ ├── angular-locale_en-tt.js │ │ │ ├── angular-locale_en-um.js │ │ │ ├── angular-locale_en-us.js │ │ │ ├── angular-locale_en-vg.js │ │ │ ├── angular-locale_en-vi.js │ │ │ ├── angular-locale_en-za.js │ │ │ ├── angular-locale_en-zw.js │ │ │ ├── angular-locale_en.js │ │ │ ├── angular-locale_es-419.js │ │ │ ├── angular-locale_es-ar.js │ │ │ ├── angular-locale_es-bo.js │ │ │ ├── angular-locale_es-cl.js │ │ │ ├── angular-locale_es-co.js │ │ │ ├── angular-locale_es-cr.js │ │ │ ├── angular-locale_es-do.js │ │ │ ├── angular-locale_es-ea.js │ │ │ ├── angular-locale_es-ec.js │ │ │ ├── angular-locale_es-es.js │ │ │ ├── angular-locale_es-gq.js │ │ │ ├── angular-locale_es-gt.js │ │ │ ├── angular-locale_es-hn.js │ │ │ ├── angular-locale_es-ic.js │ │ │ ├── angular-locale_es-mx.js │ │ │ ├── angular-locale_es-ni.js │ │ │ ├── angular-locale_es-pa.js │ │ │ ├── angular-locale_es-pe.js │ │ │ ├── angular-locale_es-pr.js │ │ │ ├── angular-locale_es-py.js │ │ │ ├── angular-locale_es-sv.js │ │ │ ├── angular-locale_es-us.js │ │ │ ├── angular-locale_es-uy.js │ │ │ ├── angular-locale_es-ve.js │ │ │ ├── angular-locale_es.js │ │ │ ├── angular-locale_et-ee.js │ │ │ ├── angular-locale_et.js │ │ │ ├── angular-locale_eu-es.js │ │ │ ├── angular-locale_eu.js │ │ │ ├── angular-locale_fa-af.js │ │ │ ├── angular-locale_fa-ir.js │ │ │ ├── angular-locale_fa.js │ │ │ ├── angular-locale_fi-fi.js │ │ │ ├── angular-locale_fi.js │ │ │ ├── angular-locale_fil-ph.js │ │ │ ├── angular-locale_fil.js │ │ │ ├── angular-locale_fr-be.js │ │ │ ├── angular-locale_fr-bf.js │ │ │ ├── angular-locale_fr-bi.js │ │ │ ├── angular-locale_fr-bj.js │ │ │ ├── angular-locale_fr-bl.js │ │ │ ├── angular-locale_fr-ca.js │ │ │ ├── angular-locale_fr-cd.js │ │ │ ├── angular-locale_fr-cf.js │ │ │ ├── angular-locale_fr-cg.js │ │ │ ├── angular-locale_fr-ch.js │ │ │ ├── angular-locale_fr-ci.js │ │ │ ├── angular-locale_fr-cm.js │ │ │ ├── angular-locale_fr-dj.js │ │ │ ├── angular-locale_fr-fr.js │ │ │ ├── angular-locale_fr-ga.js │ │ │ ├── angular-locale_fr-gf.js │ │ │ ├── angular-locale_fr-gn.js │ │ │ ├── angular-locale_fr-gp.js │ │ │ ├── angular-locale_fr-gq.js │ │ │ ├── angular-locale_fr-km.js │ │ │ ├── angular-locale_fr-lu.js │ │ │ ├── angular-locale_fr-mc.js │ │ │ ├── angular-locale_fr-mf.js │ │ │ ├── angular-locale_fr-mg.js │ │ │ ├── angular-locale_fr-ml.js │ │ │ ├── angular-locale_fr-mq.js │ │ │ ├── angular-locale_fr-ne.js │ │ │ ├── angular-locale_fr-re.js │ │ │ ├── angular-locale_fr-yt.js │ │ │ ├── angular-locale_fr.js │ │ │ ├── angular-locale_gl-es.js │ │ │ ├── angular-locale_gl.js │ │ │ ├── angular-locale_gsw-ch.js │ │ │ ├── angular-locale_gsw.js │ │ │ ├── angular-locale_gu-in.js │ │ │ ├── angular-locale_gu.js │ │ │ ├── angular-locale_he-il.js │ │ │ ├── angular-locale_he.js │ │ │ ├── angular-locale_hi-in.js │ │ │ ├── angular-locale_hi.js │ │ │ ├── angular-locale_hr-hr.js │ │ │ ├── angular-locale_hr.js │ │ │ ├── angular-locale_hu-hu.js │ │ │ ├── angular-locale_hu.js │ │ │ ├── angular-locale_id-id.js │ │ │ ├── angular-locale_id.js │ │ │ ├── angular-locale_in.js │ │ │ ├── angular-locale_is-is.js │ │ │ ├── angular-locale_is.js │ │ │ ├── angular-locale_it-it.js │ │ │ ├── angular-locale_it-sm.js │ │ │ ├── angular-locale_it.js │ │ │ ├── angular-locale_iw.js │ │ │ ├── angular-locale_ja-jp.js │ │ │ ├── angular-locale_ja.js │ │ │ ├── angular-locale_kn-in.js │ │ │ ├── angular-locale_kn.js │ │ │ ├── angular-locale_ko-kr.js │ │ │ ├── angular-locale_ko.js │ │ │ ├── angular-locale_ln-cd.js │ │ │ ├── angular-locale_ln.js │ │ │ ├── angular-locale_lt-lt.js │ │ │ ├── angular-locale_lt.js │ │ │ ├── angular-locale_lv-lv.js │ │ │ ├── angular-locale_lv.js │ │ │ ├── angular-locale_ml-in.js │ │ │ ├── angular-locale_ml.js │ │ │ ├── angular-locale_mr-in.js │ │ │ ├── angular-locale_mr.js │ │ │ ├── angular-locale_ms-my.js │ │ │ ├── angular-locale_ms.js │ │ │ ├── angular-locale_mt-mt.js │ │ │ ├── angular-locale_mt.js │ │ │ ├── angular-locale_nl-cw.js │ │ │ ├── angular-locale_nl-nl.js │ │ │ ├── angular-locale_nl-sx.js │ │ │ ├── angular-locale_nl.js │ │ │ ├── angular-locale_no.js │ │ │ ├── angular-locale_or-in.js │ │ │ ├── angular-locale_or.js │ │ │ ├── angular-locale_pl-pl.js │ │ │ ├── angular-locale_pl.js │ │ │ ├── angular-locale_pt-br.js │ │ │ ├── angular-locale_pt-pt.js │ │ │ ├── angular-locale_pt.js │ │ │ ├── angular-locale_ro-ro.js │ │ │ ├── angular-locale_ro.js │ │ │ ├── angular-locale_ru-ru.js │ │ │ ├── angular-locale_ru.js │ │ │ ├── angular-locale_sk-sk.js │ │ │ ├── angular-locale_sk.js │ │ │ ├── angular-locale_sl-si.js │ │ │ ├── angular-locale_sl.js │ │ │ ├── angular-locale_sq-al.js │ │ │ ├── angular-locale_sq.js │ │ │ ├── angular-locale_sr-cyrl-rs.js │ │ │ ├── angular-locale_sr-latn-rs.js │ │ │ ├── angular-locale_sr.js │ │ │ ├── angular-locale_sv-se.js │ │ │ ├── angular-locale_sv.js │ │ │ ├── angular-locale_sw-tz.js │ │ │ ├── angular-locale_sw.js │ │ │ ├── angular-locale_ta-in.js │ │ │ ├── angular-locale_ta.js │ │ │ ├── angular-locale_te-in.js │ │ │ ├── angular-locale_te.js │ │ │ ├── angular-locale_th-th.js │ │ │ ├── angular-locale_th.js │ │ │ ├── angular-locale_tl.js │ │ │ ├── angular-locale_tr-tr.js │ │ │ ├── angular-locale_tr.js │ │ │ ├── angular-locale_uk-ua.js │ │ │ ├── angular-locale_uk.js │ │ │ ├── angular-locale_ur-pk.js │ │ │ ├── angular-locale_ur.js │ │ │ ├── angular-locale_vi-vn.js │ │ │ ├── angular-locale_vi.js │ │ │ ├── angular-locale_zh-cn.js │ │ │ ├── angular-locale_zh-hans-cn.js │ │ │ ├── angular-locale_zh-hk.js │ │ │ ├── angular-locale_zh-tw.js │ │ │ ├── angular-locale_zh.js │ │ │ ├── angular-locale_zu-za.js │ │ │ └── angular-locale_zu.js │ │ ├── version.json │ │ └── version.txt │ │ ├── bootstrap │ │ ├── ui-bootstrap-0.7.0.js │ │ ├── ui-bootstrap-0.7.0.min.js │ │ ├── ui-bootstrap-tpls-0.7.0.js │ │ └── ui-bootstrap-tpls-0.7.0.min.js │ │ ├── d3.min.js │ │ ├── highcharts-ng │ │ └── highcharts-ng.min.js │ │ ├── highcharts │ │ ├── exporting.js │ │ ├── highcharts-all.js │ │ └── highcharts.js │ │ ├── jquery-1.9.1.js │ │ ├── jquery-2.1.4.min.js │ │ ├── moment-with-locales.js │ │ ├── reconnecting-websocket │ │ └── reconnecting-websocket.min.js │ │ └── socket.io-1.3.4.js ├── shell │ ├── post-deploy.sh │ └── pre-deploy.sh ├── tasks │ ├── compile.js │ ├── copyto.js │ ├── cssmin.js │ ├── del.js │ ├── jsmin.js │ └── sass.js └── templates │ ├── bucket-create.html │ ├── buckets.html │ ├── buildin │ ├── error.html │ └── index.html │ ├── index.html │ ├── sunburst.html │ └── transactions.html ├── PM25-Docs ├── Makefile ├── _build │ ├── doctrees │ │ ├── advanced.doctree │ │ ├── environment.pickle │ │ ├── getting_started.doctree │ │ ├── help.doctree │ │ ├── index.doctree │ │ ├── installation.doctree │ │ └── introduction.doctree │ └── html │ │ ├── .buildinfo │ │ ├── _images │ │ ├── apple_watch_app.png │ │ ├── bucket_create.png │ │ ├── bucket_create_button.png │ │ ├── bucket_create_mirror.png │ │ ├── buckets.png │ │ ├── host_exceptions.png │ │ ├── host_red.png │ │ ├── hosts.png │ │ ├── ios_app.png │ │ ├── login.png │ │ ├── pm25_how_it_works_001.jpg │ │ ├── pm25_how_it_works_002.jpg │ │ ├── trigger_create_button.png │ │ ├── trigger_create_example.png │ │ └── triggers.png │ │ ├── _sources │ │ ├── advanced.txt │ │ ├── getting_started.txt │ │ ├── help.txt │ │ ├── index.txt │ │ ├── installation.txt │ │ └── introduction.txt │ │ ├── _static │ │ ├── ajax-loader.gif │ │ ├── alabaster.css │ │ ├── alert_info_32.png │ │ ├── alert_warning_32.png │ │ ├── background_b01.png │ │ ├── basic.css │ │ ├── bg-page.png │ │ ├── bizstyle.css │ │ ├── bizstyle.js │ │ ├── bullet_orange.png │ │ ├── classic.css │ │ ├── comment-bright.png │ │ ├── comment-close.png │ │ ├── comment.png │ │ ├── css │ │ │ ├── badge_only.css │ │ │ └── theme.css │ │ ├── css3-mediaqueries.js │ │ ├── css3-mediaqueries_src.js │ │ ├── darkmetal.png │ │ ├── doctools.js │ │ ├── down-pressed.png │ │ ├── down.png │ │ ├── file.png │ │ ├── fonts │ │ │ ├── Inconsolata-Bold.ttf │ │ │ ├── Inconsolata.ttf │ │ │ ├── Lato-Bold.ttf │ │ │ ├── Lato-Regular.ttf │ │ │ ├── RobotoSlab-Bold.ttf │ │ │ ├── RobotoSlab-Regular.ttf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ └── fontawesome-webfont.woff │ │ ├── haiku.css │ │ ├── headerbg.png │ │ ├── jquery-1.11.1.js │ │ ├── jquery.js │ │ ├── js │ │ │ ├── modernizr.min.js │ │ │ └── theme.js │ │ ├── logo.png │ │ ├── metal.png │ │ ├── minus.png │ │ ├── nature.css │ │ ├── navigation.png │ │ ├── plus.png │ │ ├── print.css │ │ ├── pygments.css │ │ ├── scrolls.css │ │ ├── searchtools.js │ │ ├── sidebar.js │ │ ├── theme_extras.js │ │ ├── translations.js │ │ ├── underscore-1.3.1.js │ │ ├── underscore.js │ │ ├── up-pressed.png │ │ ├── up.png │ │ ├── watermark.png │ │ ├── watermark_blur.png │ │ └── websupport.js │ │ ├── advanced.html │ │ ├── genindex.html │ │ ├── getting_started.html │ │ ├── help.html │ │ ├── index.html │ │ ├── installation.html │ │ ├── introduction.html │ │ ├── objects.inv │ │ ├── search.html │ │ └── searchindex.js ├── advanced.rst ├── conf.py ├── getting_started.rst ├── help.rst ├── images │ ├── apple_watch_app.png │ ├── bucket_create.png │ ├── bucket_create_button.png │ ├── bucket_create_mirror.png │ ├── buckets.png │ ├── host_exceptions.png │ ├── host_red.png │ ├── hosts.png │ ├── ios_app.png │ ├── login.png │ ├── pm25_how_it_works_001.jpg │ ├── pm25_how_it_works_002.jpg │ ├── trigger_create.png │ ├── trigger_create_button.png │ ├── trigger_create_example.png │ └── triggers.png ├── index.md ├── index.rst ├── installation.rst ├── introduction.rst └── make.bat ├── PM25-Ext ├── index.js └── package.json ├── PM25-Service ├── configure.json ├── package.json ├── profilings │ └── status ├── shell │ ├── post-deploy.sh │ └── pre-deploy.sh ├── src │ ├── Cipher.js │ ├── PullInteractorService.js │ ├── PushFalconService.js │ ├── RealTimeWebSocket.js │ ├── ReverseInteractorService.js │ ├── helpers │ │ └── MongoDBPool.js │ └── index.js └── test │ ├── connection.js │ ├── createindex.js │ └── websocket.html ├── PM25-Sites ├── docs │ ├── .buildinfo │ ├── _images │ │ ├── apple_watch_app.png │ │ ├── bucket_create.png │ │ ├── bucket_create_button.png │ │ ├── bucket_create_mirror.png │ │ ├── buckets.png │ │ ├── host_exceptions.png │ │ ├── host_red.png │ │ ├── hosts.png │ │ ├── ios_app.png │ │ ├── login.png │ │ ├── pm25_how_it_works_001.jpg │ │ ├── pm25_how_it_works_002.jpg │ │ ├── trigger_create_button.png │ │ ├── trigger_create_example.png │ │ └── triggers.png │ ├── _sources │ │ ├── advanced.txt │ │ ├── getting_started.txt │ │ ├── help.txt │ │ ├── index.txt │ │ ├── installation.txt │ │ └── introduction.txt │ ├── _static │ │ ├── ajax-loader.gif │ │ ├── alabaster.css │ │ ├── alert_info_32.png │ │ ├── alert_warning_32.png │ │ ├── background_b01.png │ │ ├── basic.css │ │ ├── bg-page.png │ │ ├── bizstyle.css │ │ ├── bizstyle.js │ │ ├── bullet_orange.png │ │ ├── classic.css │ │ ├── comment-bright.png │ │ ├── comment-close.png │ │ ├── comment.png │ │ ├── css │ │ │ ├── badge_only.css │ │ │ └── theme.css │ │ ├── css3-mediaqueries.js │ │ ├── css3-mediaqueries_src.js │ │ ├── darkmetal.png │ │ ├── doctools.js │ │ ├── down-pressed.png │ │ ├── down.png │ │ ├── file.png │ │ ├── fonts │ │ │ ├── Inconsolata-Bold.ttf │ │ │ ├── Inconsolata.ttf │ │ │ ├── Lato-Bold.ttf │ │ │ ├── Lato-Regular.ttf │ │ │ ├── RobotoSlab-Bold.ttf │ │ │ ├── RobotoSlab-Regular.ttf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ └── fontawesome-webfont.woff │ │ ├── haiku.css │ │ ├── headerbg.png │ │ ├── jquery-1.11.1.js │ │ ├── jquery.js │ │ ├── js │ │ │ ├── modernizr.min.js │ │ │ └── theme.js │ │ ├── logo.png │ │ ├── metal.png │ │ ├── minus.png │ │ ├── nature.css │ │ ├── navigation.png │ │ ├── plus.png │ │ ├── print.css │ │ ├── pygments.css │ │ ├── scrolls.css │ │ ├── searchtools.js │ │ ├── sidebar.js │ │ ├── theme_extras.js │ │ ├── translations.js │ │ ├── underscore-1.3.1.js │ │ ├── underscore.js │ │ ├── up-pressed.png │ │ ├── up.png │ │ ├── watermark.png │ │ ├── watermark_blur.png │ │ └── websupport.js │ ├── advanced.html │ ├── genindex.html │ ├── getting_started.html │ ├── help.html │ ├── index.html │ ├── installation.html │ ├── introduction.html │ ├── objects.inv │ ├── search.html │ └── searchindex.js ├── favicon.ico ├── guide.html ├── images │ └── pm25-logo-latest.png └── index.html └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.ipr 2 | *.iws 3 | *.iml 4 | .idea/ 5 | *.swp 6 | .build/ 7 | *.swo 8 | *.swn 9 | *.DS_Store 10 | *.build/ 11 | build/ 12 | *.log 13 | .sass-cache 14 | 15 | node_modules/* 16 | **/node_modules/* 17 | -------------------------------------------------------------------------------- /PM25-Cli/LICENSE: -------------------------------------------------------------------------------- 1 | GNU-AGPL-3.0.txt 2 | -------------------------------------------------------------------------------- /PM25-Cli/Makefile: -------------------------------------------------------------------------------- 1 | 2 | gen_deb: 3 | ./packager/build-dist.sh 4 | ./packager/build-deb.sh 5 | 6 | publish: 7 | ./packager/deploy.sh 8 | 9 | clean: 10 | find node_modules \( -name "example" -o -name "examples" -o -name "docs" -o -name "jsdoc" -o -name "jsdocs" -o -name "test" -o -name "tests" -o -name "*\.md" -o -name "*\.html" -o -name "*\.eot" -o -name "*\.svg" -o -name "*\.woff" \) -print -exec rm -rf {} \; 11 | find node_modules -type d \( -name "example" -o -name "examples" -o -name "docs" -o -name "jsdoc" -o -name "jsdocs" -o -name "test" -o -name "tests" -o -name "*\.md" -o -name "*\.html" -o -name "*\.eot" -o -name "*\.svg" -o -name "*\.woff" \) -print -exec rm -rf {} \; 12 | -------------------------------------------------------------------------------- /PM25-Cli/bin/pm2-dev: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | require('../lib/DevCli.js'); 4 | -------------------------------------------------------------------------------- /PM25-Cli/bin/rundev: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | require('../lib/DevCli.js'); 4 | -------------------------------------------------------------------------------- /PM25-Cli/examples/binary/http.js: -------------------------------------------------------------------------------- 1 | 2 | var http = require('http'); 3 | 4 | var server = http.createServer(function(req, res) { 5 | res.writeHead(200); 6 | res.end('hey'); 7 | }).listen(process.env.PORT || 8000, function() { 8 | console.log('App listening on port %d in env %s', process.env.PORT || 8000, process.env.NODE_ENV); 9 | }); 10 | -------------------------------------------------------------------------------- /PM25-Cli/examples/binary/ls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cli/examples/binary/ls -------------------------------------------------------------------------------- /PM25-Cli/examples/binary/ls.yml: -------------------------------------------------------------------------------- 1 | apps: 2 | - script : './ls' 3 | exec_interpreter : 'none' 4 | -------------------------------------------------------------------------------- /PM25-Cli/examples/custom-action/index.js: -------------------------------------------------------------------------------- 1 | 2 | var pmx = require('pmx'); 3 | 4 | pmx.action('ping', function(reply) { 5 | return reply({ 'pong' : 'hehe' }) 6 | }); 7 | 8 | pmx.action('param', function(data, reply) { 9 | return reply({ data : data }) 10 | }); 11 | 12 | setInterval(function() { 13 | }, 1000); 14 | -------------------------------------------------------------------------------- /PM25-Cli/examples/custom-action/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "custom-action", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "dependencies" : { 7 | "pmx" : "*" 8 | }, 9 | "scripts": { 10 | "test": "echo \"Error: no test specified\" && exit 1" 11 | }, 12 | "author": "", 13 | "license": "ISC" 14 | } 15 | -------------------------------------------------------------------------------- /PM25-Cli/examples/custom-nodejs-version/ecosystem.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | /** 3 | * Application configuration section 4 | * http://pm2.PM25.io/docs/usage/application-declaration/ 5 | */ 6 | apps : [ 7 | // First application 8 | { 9 | name : "API", 10 | script : "http.js", 11 | interpreter : "node@4.1.2" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /PM25-Cli/examples/custom-nodejs-version/http.js: -------------------------------------------------------------------------------- 1 | 2 | var http = require('http'); 3 | 4 | var server = http.createServer(function(req, res) { 5 | res.writeHead(200); 6 | res.end('hey'); 7 | }).listen(process.env.PORT || 8000, function() { 8 | console.log('App listening on port %d in env %s', process.env.PORT || 8000, process.env.NODE_ENV); 9 | 10 | // 1# Notify application ready 11 | setTimeout(function() { 12 | process.send('ready'); 13 | }, 2000); 14 | 15 | }); 16 | 17 | // // 2# Handle on Exit 18 | process.on('SIGINT', function() { 19 | console.log('Cleanup on exit'); 20 | 21 | server.on('close', function() { 22 | console.log('Connections closed'); 23 | process.exit(0); 24 | }); 25 | 26 | server.close(); 27 | }); 28 | -------------------------------------------------------------------------------- /PM25-Cli/examples/echo.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | setInterval(function() { 4 | console.log('log message from echo.js'); 5 | console.warn({ json : true }); 6 | }, 1500); 7 | 8 | setTimeout(function() { 9 | setInterval(function() { 10 | console.error('err msg from echo.js'); 11 | }, 1500); 12 | }, 750); 13 | -------------------------------------------------------------------------------- /PM25-Cli/examples/extra-lang/bashscript.sh: -------------------------------------------------------------------------------- 1 | while true; do 2 | ls -l 3 | sleep 5 4 | done 5 | 6 | -------------------------------------------------------------------------------- /PM25-Cli/examples/extra-lang/echo.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /PM25-Cli/examples/extra-lang/echo.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | import time 3 | 4 | while 1: 5 | print("Start : %s" % time.ctime()) 6 | time.sleep(1) 7 | -------------------------------------------------------------------------------- /PM25-Cli/examples/extra-lang/echo.rb: -------------------------------------------------------------------------------- 1 | 2 | while 1 do 3 | puts "lol" 4 | sleep 1 5 | end 6 | -------------------------------------------------------------------------------- /PM25-Cli/examples/graceful-http.js: -------------------------------------------------------------------------------- 1 | 2 | var http = require('http'); 3 | 4 | process.on('SIGINT', function() { 5 | console.log('Graceful closing...'); 6 | server.close(function() { 7 | process.exit(0); 8 | }); 9 | }); 10 | 11 | var server = http.createServer(function(req, res) { 12 | res.writeHead(200); 13 | res.end('hey'); 14 | }).listen(process.env.PORT || 8000, function() { 15 | console.log('App listening on port %d in env %s', process.env.PORT || 8000, process.env.NODE_ENV); 16 | }); 17 | -------------------------------------------------------------------------------- /PM25-Cli/examples/http.js: -------------------------------------------------------------------------------- 1 | 2 | var http = require('http'); 3 | 4 | var server = http.createServer(function(req, res) { 5 | res.writeHead(200); 6 | res.end('hey'); 7 | }).listen(process.env.PORT || 8000, function() { 8 | console.log('App listening on port %d in env %s', process.env.PORT || 8000, process.env.NODE_ENV); 9 | 10 | // 1# Notify application ready 11 | setTimeout(function() { 12 | process.send('ready'); 13 | }, 2000); 14 | 15 | }); 16 | 17 | // // 2# Handle on Exit 18 | process.on('SIGINT', function() { 19 | console.log('Cleanup on exit'); 20 | 21 | server.on('close', function() { 22 | console.log('Connections closed'); 23 | process.exit(0); 24 | }); 25 | 26 | server.close(); 27 | }); 28 | -------------------------------------------------------------------------------- /PM25-Cli/examples/keymetrics-integration/auto-init.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | var pmx = require('pmx').init(); 4 | 5 | var http = require('http'); 6 | 7 | http.createServer(function(req, res) { 8 | res.writeHead(200); 9 | res.end('hey'); 10 | }).listen(8005); 11 | 12 | pmx.action('refresh:db2', {comment : 'Refresh main database'}, function(reply) { 13 | throw new Error('hey'); 14 | }); 15 | -------------------------------------------------------------------------------- /PM25-Cli/examples/keymetrics-integration/custom_action.js: -------------------------------------------------------------------------------- 1 | 2 | var axm = require('pmx'); 3 | 4 | axm.action('getEnv', function(reply) { 5 | reply(process.env); 6 | }); 7 | 8 | axm.action('sayHello', function(reply) { 9 | reply({ 10 | msg : 'Yes hello and so? Xie Xie' 11 | }); 12 | }); 13 | 14 | axm.action('throwError', function(reply) { 15 | //@todo : replying a error does not work 16 | reply(new Error('Error thrown')); 17 | throw new Error('asdadsadsasd'); 18 | }); 19 | -------------------------------------------------------------------------------- /PM25-Cli/examples/keymetrics-integration/custom_action_with_params.js: -------------------------------------------------------------------------------- 1 | 2 | var axm = require('pmx'); 3 | 4 | axm.action('refresh:db', { comment : 'Refresh the database' }, function(reply) { 5 | console.log('Refreshing'); 6 | reply({success : true}); 7 | }); 8 | 9 | axm.action('chanme:ladb', { comment : 'Refresh la BIG database' }, function(reply) { 10 | console.log('Refreshing BIG DB'); 11 | reply({success : true}); 12 | }); 13 | 14 | axm.action('rm:rf', { comment : 'Delete moi ca plus vite que ca !' }, function(reply) { 15 | console.log('RMING RFING'); 16 | reply({success : true}); 17 | }); 18 | 19 | axm.action('rm:roff', function(reply) { 20 | console.log('RMING RFING'); 21 | reply({success : true}); 22 | }); 23 | -------------------------------------------------------------------------------- /PM25-Cli/examples/keymetrics-integration/event.js: -------------------------------------------------------------------------------- 1 | 2 | var axm = require('pmx'); 3 | 4 | setInterval(function() { 5 | 6 | axm.emit('content:page:created', { 7 | msg : 'A CMS page has been created', 8 | user : 'Francois Debiole' 9 | }); 10 | 11 | }, 1000); 12 | -------------------------------------------------------------------------------- /PM25-Cli/examples/keymetrics-integration/pid_info.js: -------------------------------------------------------------------------------- 1 | 2 | // ps -p 5828 -o pid,vsz=MEMORY -o user,group=GROUP -o comm,args=ARGS 3 | -------------------------------------------------------------------------------- /PM25-Cli/examples/keymetrics-integration/scoped-actions.js: -------------------------------------------------------------------------------- 1 | 2 | var pmx = require('pmx'); 3 | 4 | pmx.scopedAction('simple test', function(data, emitter) { 5 | var i = setInterval(function() { 6 | emitter.send('output-stream'); 7 | }, 100); 8 | 9 | setTimeout(function() { 10 | 11 | emitter.end('end'); 12 | clearInterval(i); 13 | }, 3000); 14 | }); 15 | 16 | pmx.scopedAction('throwing error', function(data, emitter) { 17 | var i = setInterval(function() { 18 | emitter.send('output-stream'); 19 | }, 100); 20 | 21 | setTimeout(function() { 22 | 23 | throw new Error('errr'); 24 | }, 1000); 25 | }); 26 | -------------------------------------------------------------------------------- /PM25-Cli/examples/keymetrics-integration/throw.js: -------------------------------------------------------------------------------- 1 | 2 | var axm = require('pmx'); 3 | 4 | axm.catchAll(); 5 | 6 | setTimeout(function() { 7 | console.log('log message from echo auto kill'); 8 | throw new Error('Exitasdsadasdsda unacepted 222222 !!'); 9 | }, 2000); 10 | -------------------------------------------------------------------------------- /PM25-Cli/examples/module-init/index.js: -------------------------------------------------------------------------------- 1 | 2 | var pmx = require('pmx'); 3 | 4 | /** 5 | * set "PM2_WAIT_FOR_INIT" : TIME to tell PM2 to show human infos 6 | */ 7 | pmx.configureModule({ 8 | human_info : [ 9 | [ 'Description', 'Gridcontrol is now running, tasdkkals dk als dkl askdl\nasd lsdakl kdsald asdsd\nAnd hthis like that and bla blab\nYESY!' ], 10 | [ 'Port', 8000], 11 | [ 'Grid name', 'Sisi la grid'] 12 | ] 13 | }); 14 | 15 | setInterval(() => {}, 1000); 16 | -------------------------------------------------------------------------------- /PM25-Cli/examples/module-init/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "init-module", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "apps" : [{ 10 | "script" : "index.js", 11 | "env" : { 12 | "PM2_WAIT_FOR_INIT" : 500 13 | } 14 | }], 15 | "author": "", 16 | "license": "ISC" 17 | } 18 | -------------------------------------------------------------------------------- /PM25-Cli/examples/module-sample/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example-module", 3 | "version": "0.3.21", 4 | "description": "Keymetrics++ and PM2 adapter", 5 | "main": "scoped-action.js", 6 | "dependencies": { 7 | }, 8 | "scripts": { 9 | "test": "DEBUG='axm:*' mocha test/*.mocha.js" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/keymetrics/pmx.git" 14 | }, 15 | "config" : { 16 | "aconfig-var" : true, 17 | "var2" : false 18 | }, 19 | "author": "Keymetrics I/O", 20 | "license": "MIT" 21 | } 22 | -------------------------------------------------------------------------------- /PM25-Cli/examples/process-actions.js: -------------------------------------------------------------------------------- 1 | var pmx = require('pmx'); 2 | 3 | pmx.action('hello', function(reply) { 4 | reply({ answer : 'world' }); 5 | }); 6 | 7 | setInterval(function() { 8 | // Keep application online 9 | }, 100); 10 | -------------------------------------------------------------------------------- /PM25-Cli/examples/process-file/connection_check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | foo() { 4 | echo "Hello Bash!" 5 | } 6 | 7 | while true; do foo; sleep 2; done 8 | -------------------------------------------------------------------------------- /PM25-Cli/examples/process-file/http.js: -------------------------------------------------------------------------------- 1 | 2 | var http = require('http'); 3 | 4 | var server = http.createServer(function(req, res) { 5 | res.writeHead(200); 6 | res.end('hey'); 7 | }).listen(process.env.PORT || 8000, function() { 8 | console.log('App listening on port %d in env %s', process.env.PORT || 8000, process.env.NODE_ENV); 9 | }); 10 | -------------------------------------------------------------------------------- /PM25-Cli/examples/process-file/process.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | apps : [{ 3 | name : 'HTTP-API', 4 | script : 'http.js', 5 | exec_mode : 'cluster', 6 | instances : 'max', 7 | max_memory_restart : '260M', 8 | 9 | ignore_watch : ['node_modules'], 10 | env : { 11 | NODE_ENV : 'normal' 12 | }, 13 | env_production : { 14 | NODE_ENV : 'production' 15 | } 16 | }, { 17 | name : 'Worker', 18 | script : 'worker.js', 19 | err_file : 'toto-err.log' 20 | }, { 21 | name : 'Checks', 22 | script : 'connection_check.sh' 23 | }] 24 | } 25 | -------------------------------------------------------------------------------- /PM25-Cli/examples/process-file/process.json: -------------------------------------------------------------------------------- 1 | { 2 | apps : [{ 3 | name : 'HTTP-API', 4 | script : 'http.js', 5 | exec_mode : 'cluster', 6 | instances : 'max', 7 | max_memory_restart : '260M', 8 | 9 | ignore_watch : ['node_modules'], 10 | watch : true, 11 | env : { 12 | NODE_ENV : 'normal' 13 | }, 14 | env_production : { 15 | NODE_ENV : 'production' 16 | } 17 | }, { 18 | name : 'Worker', 19 | script : 'worker.js' 20 | }, { 21 | name : 'Checks', 22 | script : 'connection_check.sh' 23 | }] 24 | } 25 | -------------------------------------------------------------------------------- /PM25-Cli/examples/process-file/worker.js: -------------------------------------------------------------------------------- 1 | 2 | setInterval(function() { 3 | console.log('Worker has finished his job.'); 4 | console.error('Worker has finished his job.'); 5 | }, 1000); 6 | -------------------------------------------------------------------------------- /PM25-Cli/examples/process-metrics.js: -------------------------------------------------------------------------------- 1 | 2 | var Probe = require('pmx').probe(); 3 | 4 | var counter = 0; 5 | 6 | var metric = Probe.metric({ 7 | name : 'Counter', 8 | value : function() { 9 | return counter; 10 | } 11 | }); 12 | 13 | setInterval(function() { 14 | counter++; 15 | }, 100); 16 | -------------------------------------------------------------------------------- /PM25-Cli/examples/promise_rejection.js: -------------------------------------------------------------------------------- 1 | var p = new Promise(function(resolve, reject) { 2 | throw new Error('fail') 3 | return resolve('ok') 4 | }) 5 | 6 | p.then(function(e) { 7 | }) 8 | -------------------------------------------------------------------------------- /PM25-Cli/examples/remote-action.js: -------------------------------------------------------------------------------- 1 | 2 | var pmx = require('pmx'); 3 | 4 | pmx.action('example', function(reply) { 5 | reply({success:true}); 6 | }); 7 | 8 | setInterval(function() { 9 | // Do not auto exit on empty event loop 10 | }, 1000); 11 | -------------------------------------------------------------------------------- /PM25-Cli/examples/signals/http.js: -------------------------------------------------------------------------------- 1 | 2 | process.on('SIGINT', function() { 3 | console.log('Exiting'); 4 | process.exit(0); 5 | }); 6 | 7 | var http = require('http'); 8 | 9 | var server = http.createServer(function(req, res) { 10 | res.writeHead(200); 11 | res.end('hey'); 12 | }).listen(process.env.PORT || 8000, function() { 13 | console.log('App listening on port %d in env %s', process.env.PORT || 8000, process.env.NODE_ENV); 14 | }); 15 | -------------------------------------------------------------------------------- /PM25-Cli/examples/tcp.js: -------------------------------------------------------------------------------- 1 | var net = require('net'); 2 | 3 | var server = net.createServer(function (socket) { 4 | socket.write('Welcome to the Telnet server of the process' + (process.env.NODE_APP_INSTANCE || 'must be run on pm2')); 5 | }).listen(8888, function() { 6 | console.log('Listening on port %s', 8888); 7 | }); 8 | -------------------------------------------------------------------------------- /PM25-Cli/examples/throw.js: -------------------------------------------------------------------------------- 1 | 2 | setTimeout(function() { 3 | throw new Error('New error thrown automatically'); 4 | }, 1200); 5 | -------------------------------------------------------------------------------- /PM25-Cli/examples/transpilers/echo.coffee: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env coffee 2 | 3 | setInterval (-> console.log 'ok'), 500 -------------------------------------------------------------------------------- /PM25-Cli/examples/transpilers/echo.ls: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env lsc 2 | 3 | setInterval (-> console.log 'ok'), 500 -------------------------------------------------------------------------------- /PM25-Cli/examples/transpilers/echo.ts: -------------------------------------------------------------------------------- 1 | 2 | class Greeter { 3 | constructor(public greeting: string) { } 4 | greet() { 5 | return "

" + this.greeting + "

"; 6 | } 7 | }; 8 | 9 | var greeter = new Greeter("Hello, world!"); 10 | 11 | console.log(greeter.greet()); 12 | -------------------------------------------------------------------------------- /PM25-Cli/examples/transpilers/http.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | /** 4 | * See the node.js TypeScript definition needed for this 5 | * example here: https://github.com/borisyankov/DefinitelyTyped 6 | */ 7 | 8 | import * as Http from "http"; 9 | 10 | class MyServer { 11 | private header:Object = {'Content-Type': 'text/plain'}; 12 | 13 | constructor() { 14 | var server:Http.Server = Http.createServer(this.onRequest); 15 | server.listen(3000, () => { 16 | console.log("Server started on port 3000"); 17 | }); 18 | } 19 | 20 | private onRequest(request:Http.ServerRequest, response:Http.ServerResponse):void { 21 | response.writeHead(200, this.header); 22 | response.end("Hello TypeScript & node.js"); 23 | } 24 | } 25 | 26 | var myServer = new MyServer(); 27 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/001-test.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | setInterval(function() { 5 | console.log('log message from echo.js'); 6 | }, 1500); 7 | 8 | setTimeout(function() { 9 | setInterval(function() { 10 | console.error('err msg from echo.js'); 11 | }, 1500); 12 | }, 750); 13 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/apps/all-pm2.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "name" : "echo", 3 | "script" : "./examples/echo.js", 4 | "instances" : "1" 5 | },{ 6 | "name" : "api", 7 | "script" : "./examples/child.js", 8 | "instances" : "4", 9 | "error_file" : "./examples/child-err.log", 10 | "out_file" : "./examples/child-out.log" 11 | }] 12 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/apps/args.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "echo", 3 | "script" : "./examples/args.js", 4 | "instances" : "1", 5 | "args" : "['--toto=heya coco', '-d', '1']", 6 | "cron_restart" : "* * * * * *" 7 | } 8 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/apps/auto-kill-echo.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "auto-kill", 3 | "script" : "./examples/echokill.js", 4 | "max" : "10" 5 | } 6 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/apps/cluster-pm2.json: -------------------------------------------------------------------------------- 1 | { 2 | "script" : "./examples/child.js", 3 | "error_file" : "errLog.log", 4 | "out_file" : "outLog.log", 5 | "pid_file" : "child", 6 | "instances" : "4", 7 | "min_uptime" : "10", 8 | "max_restarts" : "4" 9 | } 10 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/apps/cron-pm2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "echo", 3 | "script" : "./examples/args.js", 4 | "instances" : "1", 5 | "args" : "['--toto=heya coco', '-d', '1']", 6 | "cron_restart" : "* * * * * *" 7 | } 8 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/apps/default-path-echo.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "echo-default", 3 | "script" : "examples/echo.js", 4 | "max" : "1" 5 | } 6 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/apps/echo-pm2.json: -------------------------------------------------------------------------------- 1 | { 2 | "script" : "examples/echo.js", 3 | "error_file" : "errEcho.log", 4 | "out_file" : "outEcho.log", 5 | "name" : "ok", 6 | "pid_file" : "echo.pid", 7 | "max" : "1", 8 | "exec_mode" : "cluster_mode", 9 | "port" : "9001", 10 | "env_variable" : "TOTO" 11 | } 12 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/apps/env-pm2.json: -------------------------------------------------------------------------------- 1 | { 2 | "script" : "examples/env.js", 3 | "error_file" : "errEcho.log", 4 | "out_file" : "outEcho.log", 5 | "name" : "ok", 6 | "pid_file" : "echo.pid", 7 | "max" : "1", 8 | "exec_mode" : "cluster_mode", 9 | "port" : "9001", 10 | "env_variable" : "TOTO", 11 | "TEST_VARIABLE" : "YESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSIR" 12 | } 13 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/apps/killfast.json: -------------------------------------------------------------------------------- 1 | { 2 | "min_uptime" : "100", 3 | "max_restarts" : "400", 4 | "name" : "auto-kill", 5 | "script" : "./examples/killfast.js" 6 | } 7 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/apps/multi-pm2.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "name" : "echo", 3 | "script" : "./examples/args.js", 4 | "instances" : "1", 5 | "args" : "['--toto=heya coco', '-d', '1']", 6 | "cron_restart" : "* * * * * *" 7 | }] 8 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/apps/no-name-echo.json: -------------------------------------------------------------------------------- 1 | { 2 | "script" : "examples/echo.js", 3 | "max" : "1" 4 | } 5 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/args.js: -------------------------------------------------------------------------------- 1 | 2 | process.argv.forEach(function (val, index, array) { 3 | console.log(index + ': ' + val); 4 | }); 5 | 6 | console.log('Argv2 = ', process.argv[2]); 7 | 8 | setInterval(function() { 9 | console.log('HERE ARE MY ARGS !!! = ', process.argv); 10 | }, 800); 11 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/auto-restart-all.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | var pm2 = require('..'); 5 | 6 | setTimeout(function() { 7 | pm2.connect(function() { 8 | pm2.restart('all', function() { 9 | pm2.disconnect(function() { 10 | 11 | }); 12 | }); 13 | }); 14 | }, 3000); 15 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/auto-restart-threshold.js: -------------------------------------------------------------------------------- 1 | var pmx = require('pmx'); 2 | 3 | var Probe = pmx.probe(); 4 | 5 | var i = 0; 6 | 7 | var val = Probe.metric({ 8 | name : 'test', 9 | value : function() { 10 | return i; 11 | }, 12 | alert : { 13 | mode : 'threshold', 14 | value : 20, 15 | msg : 'more than 20', 16 | func : function() { 17 | console.log('exiting'); 18 | process.exit(1); 19 | } 20 | } 21 | }); 22 | 23 | 24 | 25 | setInterval(function() { 26 | console.log(i); 27 | i++; 28 | }, 200); 29 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/auto-save.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cli/examples/v1/auto-save.js -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/beforeExit.js: -------------------------------------------------------------------------------- 1 | 2 | var stopped = false; 3 | 4 | function work() { 5 | console.log('working'); 6 | !stopped && setTimeout(work, 1000); 7 | } 8 | 9 | function stop() { 10 | console.log('shutting down'); 11 | stopped = true; 12 | } 13 | 14 | process.once('SIGINT', stop); // CTRL-C 15 | 16 | process.on('beforeExit', function() { 17 | console.log('exited cleanly :)'); 18 | process.exit(0); 19 | }); 20 | 21 | work(); 22 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/child-echo.json: -------------------------------------------------------------------------------- 1 | { 2 | "apps" : [{ 3 | "script":"examples/child.js", 4 | "name":"API-web", 5 | "instances":3 6 | },{ 7 | "script":"examples/echo.js", 8 | "instances":2 9 | }], 10 | "deploy" : { 11 | "production" : { 12 | "user" : "node", 13 | "host" : "212.83.163.168", 14 | "repo" : "git@github.com:Unitech/eip-vitrine.git", 15 | "path" : "/var/www/test-deploy" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/child-env.js: -------------------------------------------------------------------------------- 1 | 2 | var http = require('http'); 3 | 4 | http.createServer(function(req, res) { 5 | res.writeHead(200); 6 | res.end(process.env.PORT_ENV); 7 | }).listen(process.env.PORT_ENV); 8 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/child-pm2.json: -------------------------------------------------------------------------------- 1 | { 2 | "script":"examples/child.js", 3 | "name":"SERVERONE", 4 | "instances":10, 5 | "error_file":"errfile.log", 6 | "out_file":"outfile.log", 7 | "pid_file":"pidfile.pid" 8 | } 9 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/child.js: -------------------------------------------------------------------------------- 1 | 2 | var http = require('http'); 3 | 4 | var server = http.createServer(function(req, res) { 5 | res.writeHead(200); 6 | res.end('hey'); 7 | }).listen(process.env.PORT || 8000, function() { 8 | console.log('App listening on port %d in env %s', process.env.PORT || 8000, process.env.NODE_ENV); 9 | }); 10 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/child.js-pm2.json: -------------------------------------------------------------------------------- 1 | { 2 | "script":"examples/child.js", 3 | "name":"child.js" 4 | } 5 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/child2.js: -------------------------------------------------------------------------------- 1 | 2 | var axm = require('pmx'); 3 | axm.http(); 4 | var http = require('http'); 5 | 6 | http.createServer(function(req, res) { 7 | res.writeHead(200); 8 | res.end('hoy'); 9 | }).listen(8000); 10 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/cwd.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | console.log(process.env.PWD); 4 | console.log(process.cwd()); 5 | console.log(__dirname); 6 | 7 | require('./echo.js'); 8 | 9 | console.log(process.cwd()); 10 | 11 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/echo.coffee: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env coffee 2 | 3 | setInterval (-> console.log 'ok'), 500 -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/echo.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | setInterval(function() { 4 | console.log('log message from echo.js'); 5 | console.warn({ json : true }); 6 | }, 1500); 7 | 8 | setTimeout(function() { 9 | setInterval(function() { 10 | console.error('err msg from echo.js'); 11 | }, 1500); 12 | }, 750); 13 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/echokill.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | setInterval(function() { 4 | console.log('log message from echo auto kill'); 5 | }, 800); 6 | 7 | setTimeout(function() { 8 | console.error('error message, killing my self'); 9 | process.exit(10); 10 | }, 3000); 11 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/env.js: -------------------------------------------------------------------------------- 1 | setInterval(function() { 2 | console.log('env NODE_ENV = ', process.env.NODE_ENV); 3 | }, 1000); 4 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/env_args.js: -------------------------------------------------------------------------------- 1 | 2 | console.log(process.env.PASSED_VARIABLE); 3 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/exec_watch.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "script":"examples/child.js", 3 | "name":"SERVERONE", 4 | "instances":10, 5 | "watch" : true, 6 | "error_file":"errfile.log", 7 | "out_file":"outfile.log", 8 | "pid_file":"pidfile.pid" 9 | }] 10 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/exit.js: -------------------------------------------------------------------------------- 1 | 2 | // process.on('exit', function() { 3 | // console.log('About to exit.'); 4 | // }); 5 | 6 | // process.on('uncaughtException', function(err) { 7 | // console.log('Caught exception: ' + err); 8 | // }); 9 | 10 | // process.on('SIGINT', function() { 11 | // console.log('Got SIGINT. Press Control-D to exit.'); 12 | // process.exit(1); 13 | // }); 14 | 15 | var worker = require('cluster').worker; 16 | 17 | worker.on('disconnect', function() { 18 | console.log('exiting'); 19 | }); 20 | 21 | 22 | setInterval(function() { 23 | }, 1); 24 | 25 | setInterval(function() { 26 | console.log('ok'); 27 | }, 2000); 28 | console.log('ok'); 29 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/expose_method.js: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Example of usage : https://github.com/Unitech/pm2/pull/214 4 | */ 5 | process.on("message", function (msg) { 6 | console.log('got message', msg); 7 | if ( "type" in msg && msg.type === "god:heap" ) { 8 | var heap = process.memoryUsage().heapUsed; 9 | process.send({type:"process:heap", heap:heap}); 10 | } 11 | }); 12 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/graceful-exit.js: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Example of graceful exit 4 | * 5 | * $ pm2 gracefulReload all 6 | */ 7 | 8 | process.on('message', function(msg) { 9 | if (msg == 'shutdown') { 10 | console.log('Closing all connections...'); 11 | setTimeout(function() { 12 | console.log('Finished closing connections'); 13 | process.exit(0); 14 | }, 1500); 15 | } 16 | }); 17 | 18 | var http = require('http'); 19 | 20 | http.createServer(function(req, res) { 21 | res.writeHead(200); 22 | console.log('got'); 23 | res.end('hey'); 24 | }).listen(8000, function() { 25 | console.log('listening'); 26 | }); 27 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/harmony.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert') 2 | , s = new Set() 3 | ; 4 | 5 | s.add('a'); 6 | 7 | assert.ok(s.has('a')); 8 | 9 | setInterval(function() { 10 | console.log(s.has('a')); 11 | }, 1000); 12 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/infinite-recurse.js: -------------------------------------------------------------------------------- 1 | function x() { 2 | x(); 3 | } 4 | x(); 5 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/inside.js: -------------------------------------------------------------------------------- 1 | 2 | var pm2 = require('..'); 3 | 4 | pm2.connect(function() { 5 | setInterval(function() { 6 | pm2.restart('echo', function() { 7 | console.log(arguments); 8 | }); 9 | }, 2000); 10 | }); 11 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/inside.json: -------------------------------------------------------------------------------- 1 | 2 | [{ 3 | "name" : "inside", 4 | "script":"examples/inside.js" 5 | },{ 6 | "name" : "echo", 7 | "script":"examples/echo.js" 8 | }] 9 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/interact.js: -------------------------------------------------------------------------------- 1 | 2 | var pm2 = require('..'); 3 | 4 | var MACHINE_NAME = 'hk1'; 5 | var PRIVATE_KEY = 'z1ormi95vomgq66'; 6 | var PUBLIC_KEY = 'oa0m7nuhdfibi16'; 7 | 8 | pm2.connect(true, function() { 9 | pm2.start({ 10 | script : '../test/fixtures/child.js', 11 | name : 'production-app' 12 | }, function() { 13 | pm2.interact(PRIVATE_KEY, PUBLIC_KEY, MACHINE_NAME, function() { 14 | }); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/json.js: -------------------------------------------------------------------------------- 1 | 2 | setInterval(function() { 3 | console.log({ 4 | hey : 'hay', 5 | ho : { 6 | si : 'si', 7 | ca : ['boum'] 8 | } 9 | }); 10 | var a = {a: 'a', b: 'b'}; 11 | console.log(a); 12 | }, 1000); 13 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/kill-not-so-fast.js: -------------------------------------------------------------------------------- 1 | 2 | console.log('start'); 3 | 4 | setTimeout(function() { 5 | console.log('exit'); 6 | throw new Error('Exitasdsadasdsda unacepted !!'); 7 | }, 300); 8 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/kill-slow.js: -------------------------------------------------------------------------------- 1 | 2 | setTimeout(function() { 3 | console.log('exit'); 4 | process.exit(1); 5 | }, 1000); 6 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/killfast.js: -------------------------------------------------------------------------------- 1 | 2 | process.exit(1); 3 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/killslow.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | setTimeout(function() { 4 | throw new Error('ok'); 5 | }, 1100); 6 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/killtoofast.js: -------------------------------------------------------------------------------- 1 | 2 | console.log('im a kamikazy'); 3 | 4 | setInterval(function() { 5 | console.log('BOUM'); 6 | process.exit(1); 7 | }, 30); 8 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/leak.js: -------------------------------------------------------------------------------- 1 | 2 | var leak = []; 3 | 4 | setInterval(function() { 5 | for (var i = 0; i < 10; i++) { 6 | var str = i.toString() + " on a stick, short and stout!"; 7 | leak.push(str); 8 | } 9 | }, 50); 10 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/malformated.json: -------------------------------------------------------------------------------- 1 | { 2 | "apps" : [{ 3 | "exec_interpreter" : "node, 4 | "exec_mode" : "cluster_mode", 5 | "instances" : 0, 6 | "log_date_format" : "YYYY-MM-DD HH:mm Z", 7 | "max_memory_restart" : "160", 8 | "merge_logs" : true, 9 | "name" : "hapi_playground", 10 | "script" : "child.js", 11 | "cwd" : "examples", 12 | "node_args" : "--harmony", 13 | "ignore_watch" : ["[\\/\\\\]\\./", "log"], 14 | "watch" : true 15 | }] 16 | } 17 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/modulechild.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | console.log(module.parent); 4 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/moduleparent.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | var a =require('./modulechild.js'); 4 | console.log(module.children); 5 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/null.js: -------------------------------------------------------------------------------- 1 | var pmx = require('pmx'); 2 | var http = require('http'); 3 | 4 | http.createServer(function(req, res) { 5 | res.end('Thanks'); 6 | }).listen(5445); 7 | 8 | pmx.action('db:test', {comment: 'Simply test'}, function(reply) { 9 | reply({test: "WOWOWOWOWOW", length: 12}); 10 | }); 11 | 12 | pmx.action('throw', {comment: 'Simply test'}, function(reply) { 13 | throw { success : 'false', length: 12 }; 14 | }); 15 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example-module", 3 | "version": "0.3.21", 4 | "description": "Keymetrics++ and PM2 adapter", 5 | "main": "scoped-action.js", 6 | "dependencies": { 7 | }, 8 | "scripts": { 9 | "test": "DEBUG='axm:*' mocha test/*.mocha.js" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/keymetrics/pmx.git" 14 | }, 15 | "config" : { 16 | "aconfig-var" : true, 17 | "var2" : false 18 | }, 19 | "author": "Keymetrics I/O", 20 | "license": "MIT" 21 | } 22 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/process.json: -------------------------------------------------------------------------------- 1 | { 2 | "apps" : [{ 3 | "exec_interpreter" : "node", 4 | "exec_mode" : "cluster_mode", 5 | "instances" : 0, 6 | "log_date_format" : "YYYY-MM-DD HH:mm Z", 7 | "max_memory_restart" : "160M", 8 | "merge_logs" : true, 9 | "name" : "hapi_playground", 10 | "script" : "child.js", 11 | "cwd" : "examples", 12 | "node_args" : "--harmony", 13 | "ignore_watch" : ["[\\/\\\\]\\./", "log"], 14 | "watch" : true, 15 | env : { 16 | NODE_ENV : 'normal' 17 | }, 18 | env_production : { 19 | NODE_ENV : 'production' 20 | } 21 | }] 22 | } 23 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/require.js: -------------------------------------------------------------------------------- 1 | 2 | var util = require('util'); 3 | 4 | console.log(util.inspect(require.main)); 5 | setInterval(function() { 6 | console.log(util.inspect(require.main)); 7 | }, 8000); 8 | 9 | 10 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/sendmsg.js: -------------------------------------------------------------------------------- 1 | 2 | setInterval(function() { 3 | process.send({ 4 | type : 'miami', 5 | data : { msg : 'i can communicate with others'} 6 | }); 7 | }, 1000); 8 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/sigint.js: -------------------------------------------------------------------------------- 1 | 2 | process.on('SIGINT', function() { 3 | // Do othing for tests 4 | }); 5 | 6 | setInterval(function() { 7 | console.log('I\'m alive'); 8 | }, 2000); 9 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/start-args.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | var pm2 = require('..'); 4 | 5 | pm2.connect(function() { 6 | pm2.start(__dirname + '/args.js', { 7 | scriptArgs : ['-i', 'sisi', '-x', 'toto'] 8 | }, function(err, res) { 9 | console.log(arguments); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/stop-after5.js: -------------------------------------------------------------------------------- 1 | 2 | setTimeout(function() { 3 | process.exit(0); 4 | }, 5000); 5 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/string-crash.js: -------------------------------------------------------------------------------- 1 | 2 | function crash() { 3 | throw 'crashed'; 4 | } 5 | 6 | crash(); 7 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/throw.js: -------------------------------------------------------------------------------- 1 | 2 | setTimeout(function() { 3 | throw new Error('New error thrown automatically'); 4 | }, 1200); 5 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/tree.js: -------------------------------------------------------------------------------- 1 | 2 | var spawn = require('child_process').spawn, 3 | grep = spawn('top', [], { stdio: 'inherit' }); 4 | 5 | 6 | var http = require('http'); 7 | 8 | 9 | var normal = require('child_process').fork('examples/child.js', ['normal']); 10 | 11 | http.createServer(function(req, res) { 12 | res.writeHead(200); 13 | res.end('hoy'); 14 | }).listen(8010); 15 | -------------------------------------------------------------------------------- /PM25-Cli/examples/v1/udp.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | var punt = require('punt'); 5 | var server = punt.bind('0.0.0.0:5000'); 6 | var a = punt.connect('0.0.0.0:5000'); 7 | var b = punt.connect('0.0.0.0:5000'); 8 | var c = punt.connect('0.0.0.0:5000'); 9 | 10 | server.on('message', function(msg){ 11 | console.log(msg); 12 | }); 13 | 14 | setInterval(function(){ 15 | a.send({ hello: 'world' }); 16 | }, 150); 17 | 18 | setInterval(function(){ 19 | b.send('hello world'); 20 | }, 150); 21 | 22 | setInterval(function(){ 23 | c.send(new Buffer('hello')); 24 | }, 150); 25 | 26 | process.emit('listening'); 27 | -------------------------------------------------------------------------------- /PM25-Cli/examples/wait-ready/app.js: -------------------------------------------------------------------------------- 1 | const http = require('http'); 2 | 3 | const port = 3000; 4 | 5 | const app = http.createServer((_, res) => { 6 | res.writeHead(200); 7 | res.end('Hello!'); 8 | }); 9 | 10 | console.log('Starting app...'); 11 | 12 | process.on('SIGINT', (msg) => { 13 | console.log('Just got SIGINTed, but I dont care'); 14 | }); 15 | 16 | setTimeout(() => { 17 | app.listen(port, () => { 18 | console.log(`Listening on ${port}`); 19 | if (process.send) { 20 | process.send('ready'); 21 | } 22 | }); 23 | }, 10000); 24 | -------------------------------------------------------------------------------- /PM25-Cli/examples/wait-ready/ecosystem.json: -------------------------------------------------------------------------------- 1 | { 2 | "apps": [{ 3 | "name": "app", 4 | "script": "app.js", 5 | "instances": 2, 6 | "exec_mode": "cluster", 7 | "wait_ready": true, 8 | "listen_timeout": 15000 9 | }] 10 | } 11 | -------------------------------------------------------------------------------- /PM25-Cli/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013 the PM2 project authors. All rights reserved. 3 | * Use of this source code is governed by a license that 4 | * can be found in the LICENSE file. 5 | */ 6 | 7 | process.env.PM2_PROGRAMMATIC = 'true'; 8 | 9 | var API = require('./lib/API.js'); 10 | 11 | module.exports = new API; 12 | module.exports.custom = API; 13 | -------------------------------------------------------------------------------- /PM25-Cli/lib/API/interpreter.json: -------------------------------------------------------------------------------- 1 | { 2 | ".sh" : "bash", 3 | ".py" : "python", 4 | ".rb" : "ruby", 5 | ".php" : "php", 6 | ".pl" : "perl", 7 | ".js" : "node", 8 | ".coffee" : "coffee", 9 | ".ls" : "lsc", 10 | ".ts" : "ts-node" 11 | } 12 | -------------------------------------------------------------------------------- /PM25-Cli/lib/Interactor/Tools.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013 the PM2 project authors. All rights reserved. 3 | * Use of this source code is governed by a license that 4 | * can be found in the LICENSE file. 5 | */ 6 | 7 | var fclone = require('fclone'); 8 | 9 | var Tools = {}; 10 | 11 | Tools.serialize = fclone; 12 | -------------------------------------------------------------------------------- /PM25-Cli/lib/templates/Dockerfiles/Dockerfile-java.tpl: -------------------------------------------------------------------------------- 1 | FROM anapsix/alpine-java:latest 2 | 3 | RUN apk update && apk add git && rm -rf /var/cache/apk/* 4 | RUN npm install pm2@next -g 5 | RUN mkdir -p /var/app 6 | 7 | WORKDIR /var/app 8 | -------------------------------------------------------------------------------- /PM25-Cli/lib/templates/Dockerfiles/Dockerfile-nodejs.tpl: -------------------------------------------------------------------------------- 1 | FROM mhart/alpine-node:latest 2 | 3 | RUN apk update && apk add git && rm -rf /var/cache/apk/* 4 | RUN npm install pm2@next -g 5 | RUN mkdir -p /var/app 6 | 7 | WORKDIR /var/app 8 | 9 | COPY ./package.json /var/app 10 | RUN npm install 11 | -------------------------------------------------------------------------------- /PM25-Cli/lib/templates/Dockerfiles/Dockerfile-ruby.tpl: -------------------------------------------------------------------------------- 1 | FROM anapsix/alpine-ruby:latest 2 | 3 | RUN apk update && apk add git && rm -rf /var/cache/apk/* 4 | RUN npm install pm2@next -g 5 | RUN mkdir -p /var/app 6 | 7 | WORKDIR /var/app 8 | -------------------------------------------------------------------------------- /PM25-Cli/lib/templates/init-scripts/systemd.tpl: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=PM2 process manager 3 | Documentation=https://pm2.PM25.io/ 4 | After=network.target 5 | 6 | [Service] 7 | User=%USER% 8 | LimitNOFILE=infinity 9 | LimitNPROC=infinity 10 | LimitCORE=infinity 11 | TimeoutStartSec=8 12 | Environment=PATH=%NODE_PATH%:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin 13 | Environment=PM2_HOME=%HOME_PATH% 14 | Restart=always 15 | RestartSec=3 16 | 17 | ExecStart=%PM2_PATH% resurrect --no-daemon 18 | ExecReload=%PM2_PATH% reload all 19 | ExecStop=%PM2_PATH% kill 20 | 21 | [Install] 22 | WantedBy=multi-user.target 23 | -------------------------------------------------------------------------------- /PM25-Cli/lib/templates/logrotate.d/pm2: -------------------------------------------------------------------------------- 1 | %HOME_PATH%/pm2.log %HOME_PATH%/logs/* { 2 | rotate 12 3 | weekly 4 | missingok 5 | notifempty 6 | compress 7 | delaycompress 8 | copytruncate 9 | create 0640 %USER% %USER% 10 | } 11 | -------------------------------------------------------------------------------- /PM25-Cli/packager/build-dist.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -ex 4 | 5 | #npm run build 6 | npm pack 7 | rm -rf dist 8 | mkdir dist 9 | mv pm2-*.tgz dist/pack.tgz 10 | 11 | cd dist 12 | tar -xzf pack.tgz --strip 1 13 | rm -rf pack.tgz 14 | npm install --production 15 | cd .. 16 | 17 | tar -cvzf dist/pm2-v`node dist/bin/pm2 --version`.tar.gz dist/* 18 | shasum -a 256 dist/pm2-*.tar.gz 19 | -------------------------------------------------------------------------------- /PM25-Cli/packager/debian/control.in: -------------------------------------------------------------------------------- 1 | Package: pm2 2 | Version: $VERSION-1 3 | Depends: nodejs 4 | Conflicts: nodejs (<< 0.12.0) 5 | Section: devel 6 | Priority: optional 7 | Architecture: all 8 | Installed-Size: $INSTALLED_SIZE 9 | Maintainer: Alexandre Strzelewicz 10 | Homepage: http://pm2.io/ 11 | Description: Production Process Manager. 12 | PM2: Process Manager for Node.js. 13 | . 14 | PM2 is a Process Manager mainly for Node.js that allows to automatically increase performance and stability while enhancing the process management experience for developer and DevOps. 15 | -------------------------------------------------------------------------------- /PM25-Cli/packager/debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: PM2 3 | Upstream-Contact: Alexandre Strzelewicz 4 | Source: http://pm2.o/ 5 | 6 | Files: * 7 | Copyright: 2013-present, Keymetrics 8 | License: AGPLv3 9 | -------------------------------------------------------------------------------- /PM25-Cli/packager/debian/description: -------------------------------------------------------------------------------- 1 | Advanced Process Manager 2 | PM2: Process Manager for Node.js 3 | 4 | PM2 is a Process Manager mainly for Node.js that allows to automatically increase performance and stability while enhancing the process management experience for developer and DevOps. 5 | -------------------------------------------------------------------------------- /PM25-Cli/packager/debian/lintian-overrides: -------------------------------------------------------------------------------- 1 | # No changelog file at the moment 2 | pm2: debian-changelog-file-missing 3 | # node-gyp throws this 4 | pm2: python-script-but-no-python-dep 5 | # Some .js files in node_modules have 0777 permissions instead of 0666 6 | pm2: executable-not-elf-or-script 7 | # Some node_modules have node in shebang 8 | pm2: unusual-interpreter 9 | # Third-party licenses 10 | pm2: extra-license-file 11 | # lib/async.js in node_modules 12 | pm2: embedded-javascript-library 13 | # No manpage... yet! 14 | pm2: binary-without-manpage 15 | -------------------------------------------------------------------------------- /PM25-Cli/packager/deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | VERSION=`node dist/bin/pm2 --version` 4 | CMD_SEND="artifacts/pm2_${VERSION}_all.deb marketing@ssh.km:~/packages" 5 | CMD_PUB="cd /var/www/apt/ubuntu; reprepro includedeb xenial ~/packages/pm2_${VERSION}_all.deb" 6 | 7 | echo $CMD_PUB 8 | scp $CMD_SEND 9 | ssh marketing@ssh.km -C $CMD_PUB 10 | -------------------------------------------------------------------------------- /PM25-Cli/pres/cluster-support.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cli/pres/cluster-support.png -------------------------------------------------------------------------------- /PM25-Cli/pres/legacy-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cli/pres/legacy-logo.png -------------------------------------------------------------------------------- /PM25-Cli/pres/pm2-desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cli/pres/pm2-desc.png -------------------------------------------------------------------------------- /PM25-Cli/pres/pm2-dev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cli/pres/pm2-dev.png -------------------------------------------------------------------------------- /PM25-Cli/pres/pm2-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cli/pres/pm2-list.png -------------------------------------------------------------------------------- /PM25-Cli/pres/pm2-logs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cli/pres/pm2-logs.png -------------------------------------------------------------------------------- /PM25-Cli/pres/pm2-monit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cli/pres/pm2-monit.png -------------------------------------------------------------------------------- /PM25-Cli/pres/pm2-v2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cli/pres/pm2-v2.png -------------------------------------------------------------------------------- /PM25-Cli/pres/pm2-versioning-metadata.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cli/pres/pm2-versioning-metadata.png -------------------------------------------------------------------------------- /PM25-Cli/pres/pm2.20d3ef.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cli/pres/pm2.20d3ef.png -------------------------------------------------------------------------------- /PM25-Cli/pres/schema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cli/pres/schema.png -------------------------------------------------------------------------------- /PM25-Cli/test/bash/cli-ux.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SRC=$(cd $(dirname "$0"); pwd) 4 | source "${SRC}/include.sh" 5 | 6 | 7 | echo -e "\033[1mRunning tests:\033[0m" 8 | 9 | which wrk 10 | spec "You should have wrk benchmark in your /usr/bin" 11 | 12 | killall node 13 | 14 | cd $file_path 15 | $pm2 start cluster-pm2.json 16 | $pm2 start cluster-pm2.json -f 17 | $pm2 start cluster-pm2.json -f 18 | $pm2 start cluster-pm2.json -f 19 | spec "start cluster" 20 | 21 | wrk -c 500 -t 500 -d 8 http://localhost:8020 &> /dev/null & 22 | $pm2 monit 23 | $pm2 list 24 | $pm2 stop 25 | -------------------------------------------------------------------------------- /PM25-Cli/test/bash/get-set.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SRC=$(cd $(dirname "$0"); pwd) 4 | source "${SRC}/include.sh" 5 | 6 | cd $file_path 7 | 8 | $pm2 unset all 9 | spec "Should unset all variables" 10 | 11 | ls ~/.pm2/module_conf.json 12 | spec "Should file exists" 13 | 14 | $pm2 set key1 val1 15 | cat ~/.pm2/module_conf.json | grep "key1" 16 | spec "Should key exists" 17 | 18 | $pm2 unset key1 19 | cat ~/.pm2/module_conf.json | grep "key1" 20 | ispec "Should key not exists" 21 | -------------------------------------------------------------------------------- /PM25-Cli/test/bash/gracefulReload3.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SRC=$(cd $(dirname "$0"); pwd) 4 | source "${SRC}/include.sh" 5 | 6 | cd $file_path 7 | 8 | echo "################## GRACEFUL RELOAD 3 ###################" 9 | 10 | echo "Launching" 11 | $pm2 start graceful-exit-send.js -i 2 --name="graceful3" -o "grace3.log" -e "grace-err3.log" 12 | should 'should start processes' 'online' 2 13 | 14 | OUT_LOG=`$pm2 prettylist | grep -m 1 -E "pm_out_log_path:" | sed "s/.*'\([^']*\)',/\1/"` 15 | cat /dev/null > $OUT_LOG 16 | 17 | #### Graceful reload name 18 | $pm2 gracefulReload graceful3 19 | 20 | OUT=`grep "Finished closing connections" "$OUT_LOG" | wc -l` 21 | [ $OUT -eq 1 ] || fail "Process that sends 'online' not restarted gracefuly" 22 | success "Process that sends 'online' restarted gracefuly" 23 | -------------------------------------------------------------------------------- /PM25-Cli/test/bash/interact.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SRC=$(cd $(dirname "$0"); pwd) 4 | source "${SRC}/include.sh" 5 | cd $file_path 6 | 7 | echo -e "\033[1mRunning Interaction tests:\033[0m" 8 | 9 | $pm2 interact stop 10 | 11 | $pm2 interact 12 | 13 | $pm2 interact XXX2 XXX3 homeloc 14 | 15 | $pm2 updatePM2 16 | 17 | $pm2 interact stop 18 | 19 | $pm2 interact 20 | 21 | $pm2 interact info 22 | 23 | $pm2 interact info | grep "XXX2" 24 | spec "Should have XXX2 has public key" 25 | 26 | $pm2 interact info | grep "XXX3" 27 | spec "Should have XXX3 has public key" 28 | 29 | $pm2 list 30 | 31 | $pm2 interact stop 32 | $pm2 kill 33 | -------------------------------------------------------------------------------- /PM25-Cli/test/bash/issues/2337.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SRC=$(cd $(dirname "$0"); pwd) 4 | source "${SRC}/../include.sh" 5 | cd $file_path 6 | 7 | echo -e "\033[1mRunning tests for json files :\033[0m" 8 | 9 | $pm2 start echo.js --name zero -f 10 | $pm2 start echo.js --name one -f 11 | $pm2 start echo.js --name two -f 12 | should 'should have 3 processes online' 'online' 3 13 | $pm2 stop 0 14 | $pm2 stop 2 15 | $pm2 start echo.js --name three -f 16 | $pm2 ls 17 | should 'should have 2 processes online' 'online' 2 18 | should 'should have 2 processes stopped' 'stopped' 2 19 | -------------------------------------------------------------------------------- /PM25-Cli/test/bash/js-configuration.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SRC=$(cd $(dirname "$0"); pwd) 4 | source "${SRC}/include.sh" 5 | cd $file_path/js-configuration 6 | 7 | $pm2 start ecosystem.config.js 8 | should 'should have started 1 processes' 'online' 1 -------------------------------------------------------------------------------- /PM25-Cli/test/bash/listen-timeout.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | #export PM2_GRACEFUL_LISTEN_TIMEOUT=1000 4 | 5 | SRC=$(cd $(dirname "$0"); pwd) 6 | source "${SRC}/include.sh" 7 | cd $file_path/listen-timeout/ 8 | 9 | echo -e "\033[1mENV REFRESH\033[0m" 10 | 11 | $pm2 start wait-ready.js -i 1 --wait-ready --listen-timeout 5000 12 | 13 | timeout 2 $pm2 reload all 14 | should 'should have started 1 clustered app' 'online' 1 15 | should 'should restart processes with new name' 'restart_time: 1' 1 16 | -------------------------------------------------------------------------------- /PM25-Cli/test/bash/multiparam.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SRC=$(cd $(dirname "$0"); pwd) 4 | source "${SRC}/include.sh" 5 | 6 | cd $file_path 7 | 8 | ############# TEST 9 | 10 | echo -e "\033[1mRunning tests:\033[0m" 11 | 12 | ## Start 13 | $pm2 start child.js echo.js server.js 14 | should 'should app be online' 'online' 3 15 | 16 | ## Restart 17 | $pm2 restart child echo server 18 | should 'should app be online' 'online' 3 19 | should 'should all script been restarted one time' 'restart_time: 1' 3 20 | 21 | ## Stop 22 | $pm2 stop child echo server 23 | should 'should app be stopped' 'stopped' 3 24 | 25 | ## Delete 26 | $pm2 delete child echo server 27 | shouldnot 'should app be deleted' 'stopped' 3 28 | -------------------------------------------------------------------------------- /PM25-Cli/test/bash/nvm-node-version.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SRC=$(cd $(dirname "$0"); pwd) 4 | source "${SRC}/include.sh" 5 | 6 | echo -e "\033[1mRunning tests:\033[0m" 7 | 8 | cd $file_path/nvm-node-version 9 | 10 | function getInterpreter() { 11 | echo `$pm2 prettylist | grep "exec_interpreter:" | awk -F"'" '{print $2}'` 12 | } 13 | 14 | 15 | $pm2 start ecosystem.json 16 | sleep 1 17 | 18 | OCC=$($pm2 prettylist | grep "exec_interpreter" | grep 'v4.6.0\|v6.7.0' | wc -l) 19 | 20 | [ $OCC -eq 2 ] || fail "Errors in setting interpreters" 21 | success "Success" 22 | -------------------------------------------------------------------------------- /PM25-Cli/test/bash/piped-config.sh: -------------------------------------------------------------------------------- 1 | 2 | #!/usr/bin/env bash 3 | 4 | SRC=$(cd $(dirname "$0"); pwd) 5 | source "${SRC}/include.sh" 6 | 7 | cd $file_path 8 | 9 | ############# TEST 10 | 11 | echo -e "\033[1mRunning tests:\033[0m" 12 | 13 | cat all.json | $pm2 start - 14 | should 'should start processes' 'online' 6 15 | 16 | cat all.json | $pm2 delete - 17 | should 'should delete all processes' 'name' 0 18 | -------------------------------------------------------------------------------- /PM25-Cli/test/bash/resurrect.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SRC=$(cd $(dirname "$0"); pwd) 4 | source "${SRC}/include.sh" 5 | cd $file_path 6 | 7 | $pm2 start echo.js -i 4 8 | spec "should start 4 processes" 9 | $pm2 save 10 | spec "should save process list" 11 | ls ~/.pm2/dump.pm2 12 | spec "should dump file exists" 13 | $pm2 resurrect 14 | spec "should resurrect" 15 | should 'should have still 4 apps started' 'online' 4 16 | $pm2 delete all 17 | $pm2 resurrect 18 | should 'should have still 4 apps started' 'online' 4 19 | -------------------------------------------------------------------------------- /PM25-Cli/test/bash/right-exit-code.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SRC=$(cd $(dirname "$0"); pwd) 4 | source "${SRC}/include.sh" 5 | 6 | cd $file_path 7 | 8 | echo -e "\033[1mRIGHT EXIT CODES:\033[0m" 9 | 10 | $pm2 kill 11 | 12 | $pm2 restart BULLSHIT 13 | ispec "Unknown process = error exit" 14 | 15 | $pm2 restart 666 16 | ispec "Unknown process = error exit" 17 | 18 | $pm2 restart all 19 | ispec "No process = error exit" 20 | 21 | $pm2 stop all 22 | ispec "No process = error exit" 23 | 24 | $pm2 delete 10 25 | ispec "No process = error exit" 26 | 27 | $pm2 delete toto 28 | ispec "No process = error exit" 29 | -------------------------------------------------------------------------------- /PM25-Cli/test/bash/start-consistency.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SRC=$(cd $(dirname "$0"); pwd) 4 | source "${SRC}/include.sh" 5 | 6 | cd $file_path 7 | 8 | ############# TEST 9 | 10 | echo -e "\033[1mRunning tests:\033[0m" 11 | 12 | cd start-consistency; 13 | 14 | $pm2 start child.js 15 | 16 | LINE_NB_CLI=`$pm2 prettylist | wc -l` 17 | 18 | $pm2 delete all 19 | 20 | $pm2 start child.json 21 | 22 | LINE_NB_JSON=`$pm2 prettylist | wc -l` 23 | 24 | $pm2 prettylist | grep "vizion: true" 25 | spec "Vizion" 26 | 27 | 28 | # if [ $LINE_NB_JSON -eq $LINE_NB_CLI ] 29 | # then 30 | # success "Starting a basic JSON is consistent with CLI start" 31 | # else 32 | # fail "Starting a basic JSON is NOT consistent with CLI start" 33 | # fi 34 | -------------------------------------------------------------------------------- /PM25-Cli/test/bash/startOrX.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SRC=$(cd $(dirname "$0"); pwd) 4 | source "${SRC}/include.sh" 5 | 6 | echo -e "\033[1mStartOrX.sh:\033[0m" 7 | 8 | cd $file_path 9 | 10 | $pm2 startOrRestart all.json 11 | 12 | should 'should start processes' 'online' 6 13 | 14 | $pm2 startOrRestart all.json 15 | 16 | should 'should has restarted app' 'restart_time: 1' 6 17 | 18 | $pm2 startOrReload all.json 19 | 20 | should 'should has reloaded app' 'restart_time: 2' 6 21 | 22 | # slow 23 | # $pm2 startOrGracefulReload all.json 24 | # should 'should has graceful reloaded app' 'restart_time: 3' 8 25 | -------------------------------------------------------------------------------- /PM25-Cli/test/bash/startup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ "$EUID" -ne 0 ] 4 | then 5 | echo "Please run as root" 6 | exit 7 | fi 8 | 9 | SRC=$(cd $(dirname "$0"); pwd) 10 | source "${SRC}/include.sh" 11 | 12 | cd $file_path 13 | 14 | $pm2 startup upstart -u $USER --hp $HOME 15 | spec "should startup command generation exited succesfully" 16 | test -e /etc/init.d/pm2 17 | spec "should have generated upstart file" 18 | $pm2 unstartup upstart 19 | spec "should have disabled startup" 20 | ! test -e /etc/init.d/pm2 21 | spec "should have deleted upstart file" 22 | -------------------------------------------------------------------------------- /PM25-Cli/test/bash/vizion.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SRC=$(cd $(dirname "$0"); pwd) 4 | source "${SRC}/include.sh" 5 | 6 | cd $file_path 7 | 8 | echo "################## VIZION ###################" 9 | 10 | mv git .git 11 | 12 | ############### 13 | $pm2 kill 14 | $pm2 start echo.js 15 | sleep 1 16 | 17 | should 'should have versioning metadata' 'jshkurti/pm2_travis' 1 18 | 19 | $pm2 delete all 20 | $pm2 start echo.js --no-vizion 21 | sleep 1 22 | 23 | should 'should not have versioning metadata' 'jshkurti/pm2_travis' 0 24 | 25 | $pm2 delete all 26 | $pm2 start no-vizion.json 27 | sleep 1 28 | 29 | should 'should not have versioning metadata' 'jshkurti/pm2_travis' 0 30 | 31 | mv .git git 32 | -------------------------------------------------------------------------------- /PM25-Cli/test/bash/wrapped-fork.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SRC=$(cd $(dirname "$0"); pwd) 4 | source "${SRC}/include.sh" 5 | 6 | cd $file_path 7 | 8 | echo "################## Wrapped fork ###################" 9 | 10 | echo "Testing wrapped fork mode values" 11 | 12 | rm path-check1.txt 13 | rm path-check2.txt 14 | 15 | node path-check.js > path-check1.txt 16 | $pm2 start path-check.js --no-autorestart -o path-check2.txt 17 | sleep 1 18 | 19 | OUT=`diff path-check1.txt path-check2.txt` 20 | 21 | echo $OUT 22 | [ -z "$OUT" ] || fail "The outputs are not identical" 23 | success "The outputs are identical" 24 | 25 | $pm2 kill 26 | -------------------------------------------------------------------------------- /PM25-Cli/test/benchmarks/monit-daemon.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | while [ true ] 4 | do 5 | PM2_PID=`pgrep "pm2: Daemon" -o` 6 | 7 | # Run garbage collector 8 | kill -SIGILL $PM2_PID 9 | sleep 5 10 | 11 | FILE="/proc/$PM2_PID/smaps" 12 | Rss=`echo 0 $(cat $FILE | grep Rss | awk '{print $2}' | sed 's#^#+#') | bc;` 13 | 14 | echo `date +%H:%M:%S` $Rss >> $RESULT_FILE 15 | sleep 100 16 | done 17 | -------------------------------------------------------------------------------- /PM25-Cli/test/benchmarks/monit.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | RESULT_FILE=result.monit 4 | 5 | export RESULT_FILE=$RESULT_FILE 6 | 7 | launch() { 8 | echo "========= `date`" >> $RESULT_FILE 9 | nohup ./monit-daemon.sh &> monit.log & 10 | } 11 | 12 | ppkill() { 13 | pkill -f monit-daemon.sh ; pkill -f sleep 14 | } 15 | 16 | case "$1" in 17 | start) 18 | launch 19 | ;; 20 | kill) 21 | ppkill 22 | ;; 23 | stop) 24 | ppkill 25 | ;; 26 | restart) 27 | ppkill 28 | launch 29 | ;; 30 | *) 31 | echo "Usage: {start|kill|stop|restart}" 32 | exit 1 33 | ;; 34 | esac 35 | exit $RETVAL 36 | -------------------------------------------------------------------------------- /PM25-Cli/test/benchmarks/result.monit: -------------------------------------------------------------------------------- 1 | ========= Fri Aug 22 14:11:29 EDT 2014 2 | 14:11:35 61012 3 | ========= Fri Aug 22 14:11:45 EDT 2014 4 | 14:11:50 59984 5 | ========= Fri Aug 22 14:12:47 EDT 2014 6 | 14:12:52 59464 7 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/001-test.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | setInterval(function() { 5 | console.log('log message from echo.js'); 6 | }, 1500); 7 | 8 | setTimeout(function() { 9 | setInterval(function() { 10 | console.error('err msg from echo.js'); 11 | }, 1500); 12 | }, 750); 13 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/all.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "name" : "echo", 3 | "script" : "./echo.js" 4 | },{ 5 | "name" : "child", 6 | "script" : "./child.js", 7 | "instances" : "4", 8 | "error_file" : "./child-err.log", 9 | "out_file" : "./child-out.log" 10 | },{ 11 | "name" : "api-2", 12 | "script" : "./server.js" 13 | }] 14 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/all2.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "name" : "echo", 3 | "script" : "./echo.js", 4 | "instances" : "1", 5 | "env_production" : { 6 | "NODE_ENV" : "production", 7 | "TOTO" : "heymoto" 8 | }, 9 | "env_test" : { 10 | "NODE_ENV" : "test", 11 | "TOTO" : "heyamota" 12 | } 13 | },{ 14 | "name" : "child", 15 | "script" : "./child.js", 16 | "instances" : "1", 17 | "error_file" : "./child-err.log", 18 | "out_file" : "./child-out.log" 19 | },{ 20 | "name" : "api-2", 21 | "script" : "./server.js", 22 | "instances" : "2" 23 | }] 24 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/app-config-update/args1.json: -------------------------------------------------------------------------------- 1 | { 2 | "script" : "echo.js", 3 | "node_args" : "" 4 | } 5 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/app-config-update/args2.json: -------------------------------------------------------------------------------- 1 | { 2 | "script" : "echo.js", 3 | "node_args" : "--harmony" 4 | } 5 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/app-config-update/echo.js: -------------------------------------------------------------------------------- 1 | 2 | var i = 0; 3 | setInterval(function() { 4 | console.log('ok', i++); 5 | }, 2000); 6 | 7 | console.log('ok'); 8 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/args.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | if (process.argv.indexOf('-d') == -1 || process.argv.indexOf('-a') == -1) { 4 | process.exit(); 5 | } else { 6 | setInterval(function() { 7 | console.log('ok'); 8 | }, 500); 9 | } 10 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/args/echo.js: -------------------------------------------------------------------------------- 1 | 2 | setInterval(function() { 3 | console.log('echo.js'); 4 | }, 5000); 5 | 6 | setInterval(function() { 7 | console.error('echo.js-error'); 8 | }, 5000); 9 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/args/params_check.js: -------------------------------------------------------------------------------- 1 | 2 | process.argv.shift(); 3 | process.argv.shift(); 4 | 5 | process.argv.forEach(function(val, index) { 6 | console.log(val); 7 | }); 8 | 9 | setInterval(function() { }, 1000); 10 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/bashscript.sh: -------------------------------------------------------------------------------- 1 | while true; do 2 | ls -l 3 | sleep 5 4 | done 5 | 6 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/big-array-es6.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | var obj = {}; 4 | var i = 0; 5 | 6 | setInterval(function() { 7 | obj[i] = Array.apply(null, new Array(99999)).map(String.prototype.valueOf,"hi"); 8 | i++; 9 | }, 2); 10 | 11 | 12 | (function testHarmony() { 13 | // 14 | // Harmony test 15 | // 16 | try { 17 | var assert = require('assert') 18 | , s = new Set(); 19 | s.add('a'); 20 | assert.ok(s.has('a')); 21 | console.log('● ES6 mode'.green); 22 | } catch(e) {} 23 | })(); 24 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/big-array-listen.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | var obj = {}; 4 | var i = 0; 5 | 6 | var http = require('http'); 7 | 8 | http.createServer(function(req, res) { 9 | res.writeHead(200); 10 | res.end('hey'); 11 | }).listen(8000); 12 | 13 | process.on('message', function(msg) { 14 | if (msg == 'shutdown') { 15 | console.log('Closing all connections...'); 16 | setTimeout(function() { 17 | console.log('Finished closing connections'); 18 | process.exit(0); 19 | }, 100); 20 | } 21 | }); 22 | 23 | setInterval(function() { 24 | obj[i] = Array.apply(null, new Array(99999)).map(String.prototype.valueOf,"hi"); 25 | i++; 26 | }, 2); 27 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/big-array.js: -------------------------------------------------------------------------------- 1 | 2 | var obj = {}; 3 | var i = 0; 4 | 5 | setInterval(function() { 6 | obj[i] = Array.apply(null, new Array(99999)).map(String.prototype.valueOf,"hi"); 7 | i++; 8 | }, 2); 9 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/binary-js-file: -------------------------------------------------------------------------------- 1 | setInterval(function () {console.log("test")}, 5000) -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/binary-js-file.js: -------------------------------------------------------------------------------- 1 | setInterval(function () {console.log("test")}, 5000) -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/binary-py-file.py: -------------------------------------------------------------------------------- 1 | while True: 2 | print 'hello' 3 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/change_cwd.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "name" : "iminpath1", 3 | "script" : "iminpath1.js", 4 | "cwd" : "path1", 5 | "out_file" : "./iminpath1.log" 6 | },{ 7 | "name" : "iminpath2", 8 | "script" : "iminpath2.js", 9 | "cwd" : "path1/path2", 10 | "out_file" : "./iminpath2.log" 11 | }] 12 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/child.js: -------------------------------------------------------------------------------- 1 | 2 | var http = require('http'); 3 | 4 | http.createServer(function(req, res) { 5 | res.writeHead(200); 6 | res.end('hey'); 7 | }).listen(0); 8 | 9 | process.on('message', function(msg) { 10 | if (msg == 'shutdown') { 11 | console.log('Closing all connections...'); 12 | setTimeout(function() { 13 | console.log('Finished closing connections'); 14 | process.exit(0); 15 | }, 100); 16 | } 17 | }); 18 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/child_no_http.js: -------------------------------------------------------------------------------- 1 | var pmx = require('pmx').init({ 2 | http: false 3 | }); 4 | 5 | var http = require('http'); 6 | 7 | http.createServer(function(req, res) { 8 | res.writeHead(200); 9 | res.end('hey'); 10 | }).listen(8000); 11 | 12 | process.on('message', function(msg) { 13 | if (msg == 'shutdown') { 14 | console.log('Closing all connections...'); 15 | setTimeout(function() { 16 | console.log('Finished closing connections'); 17 | process.exit(0); 18 | }, 100); 19 | } 20 | }); 21 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/cluster-pm2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "serv-clust", 3 | "script" : "server.js", 4 | "max" : "10", 5 | "instances" : "4", 6 | "env_test" : { 7 | "NODE_ENV" : "TEST" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/cluster/sigint_catcher.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | setInterval(function() { 4 | // Do nothing to keep process alive 5 | }, 1000); 6 | 7 | process.on('SIGINT', function () { 8 | console.log('SIGINT cb called'); 9 | }); 10 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/conf.json: -------------------------------------------------------------------------------- 1 | // TG! 2 | [{ 3 | // Application 1 4 | name : "echo", 5 | script : 'toto.js', 6 | env : { 7 | "TOTO" : process.env.NODE_ENV || 'vazytg' 8 | } 9 | }] 10 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/configuration.js: -------------------------------------------------------------------------------- 1 | [{ 2 | name : "echo", 3 | script : [".", "/", "e", "cho.js"].join('') 4 | },{ 5 | name : "child", 6 | script : "./child.js", 7 | instances : "4", 8 | error_file : "./child-err.log", 9 | out_file : "./child-out.log" 10 | },{ 11 | name : "api-2", 12 | script : "./server.js" 13 | }] 14 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/configuration.json: -------------------------------------------------------------------------------- 1 | // TG! 2 | [{ 3 | // Application 1 4 | name : "echo", 5 | script : [".", "/", "e", "cho.js"].join('') 6 | },{ 7 | // APplication 2 8 | name : "child", 9 | script : "./child.js", 10 | instances : "4", 11 | error_file : "./child-err.log", 12 | out_file : "./child-out.log" 13 | },{ 14 | name : "api-2", 15 | script : "./server.js" 16 | }] 17 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/containerizer/Dockerfile.dev: -------------------------------------------------------------------------------- 1 | FROM mhart/alpine-node:latest 2 | 3 | RUN apk update && apk add git && rm -rf /var/cache/apk/* 4 | RUN npm install pm2@next -g 5 | RUN mkdir -p /var/app 6 | 7 | WORKDIR /var/app 8 | 9 | COPY ./package.json /var/app 10 | RUN npm install 11 | 12 | ## DEVELOPMENT MODE 13 | ENV NODE_ENV=development 14 | CMD ["pm2-docker", "start", "--auto-exit", "index.js"] 15 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/containerizer/Dockerfile.prod: -------------------------------------------------------------------------------- 1 | FROM mhart/alpine-node:latest 2 | 3 | RUN apk update && apk add git && rm -rf /var/cache/apk/* 4 | RUN npm install pm2@next -g 5 | RUN mkdir -p /var/app 6 | 7 | WORKDIR /var/app 8 | 9 | COPY ./package.json /var/app 10 | RUN npm install 11 | 12 | ## PRODUCTION MODE 13 | ENV NODE_ENV=production 14 | COPY . /var/app/ 15 | CMD ["pm2-docker", "start", "--auto-exit", "index.js"] 16 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/cron.js: -------------------------------------------------------------------------------- 1 | 2 | setInterval(function() { 3 | console.log('ok'); 4 | }, 500); 5 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/cron/mock-cron-no-exit.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | setTimeout(function() { 4 | process.send({ 5 | 'cron_restart' : 1 6 | }); 7 | }, 1000); 8 | 9 | process.on('SIGINT', function() { 10 | console.log('SIGINT signal received'); 11 | }); 12 | 13 | setInterval(function() { 14 | }, 100); 15 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/cron/mock-cron.js: -------------------------------------------------------------------------------- 1 | 2 | setTimeout(function() { 3 | process.send({ 4 | 'cron_restart' : 1 5 | }); 6 | }, 1000); 7 | 8 | process.on('SIGINT', function() { 9 | console.log('SIGINT signal received'); 10 | setTimeout(function() { 11 | process.exit(0); 12 | }, 1000); 13 | }); 14 | 15 | setInterval(function() { 16 | }, 100); 17 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/custom_actions/index.js: -------------------------------------------------------------------------------- 1 | 2 | var pmx = require('pmx'); 3 | 4 | pmx.action('ping', function(reply) { 5 | return reply({ 'pong' : 'hehe' }) 6 | }); 7 | 8 | pmx.action('param', function(data, reply) { 9 | return reply(data) 10 | }); 11 | 12 | setInterval(function() { 13 | }, 1000); 14 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/delayed_exit.js: -------------------------------------------------------------------------------- 1 | var exit = function() { 2 | console.log("Delay exit in 2 secs"); 3 | setTimeout(function(){ 4 | process.exit(); 5 | }, 2000); 6 | }; 7 | 8 | process.on('SIGTERM', function() { 9 | console.log('Got SIGTERM signal.'); 10 | exit(); 11 | }); 12 | 13 | process.on('SIGINT', function() { 14 | console.log('Got SIGINT signal'); 15 | exit(); 16 | }); 17 | 18 | setInterval(function keepMeAlive() {}, 1000); 19 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/docker/expressor/app.js: -------------------------------------------------------------------------------- 1 | 2 | var express = require('express'); 3 | var app = express(); 4 | 5 | app.get('/', function (req, res) { 6 | res.send('Hello Bro! yes'); 7 | }); 8 | 9 | app.listen(3000, function () { 10 | console.log('Example app listening on port 3000!'); 11 | }); 12 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/docker/expressor/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@keymetrics/expressor", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "express": "^4.14.0", 13 | "passport" : "*", 14 | "redis" : "*" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/docker/expressor/process.json: -------------------------------------------------------------------------------- 1 | { 2 | apps : [{ 3 | script : 'app.js', 4 | name : 'Express', 5 | instances : '1' 6 | }, { 7 | script : 'worker.js' 8 | }] 9 | } 10 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/docker/expressor/worker.js: -------------------------------------------------------------------------------- 1 | 2 | setInterval(function() { 3 | console.log('Worker finished his job'); 4 | }, 1000); 5 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/echo-env.js: -------------------------------------------------------------------------------- 1 | 2 | setInterval(function() { 3 | console.log(process.env.ECHO_MSG || 'ok'); 4 | }, 100); 5 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/echo-pm2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "echo", 3 | "script" : "echo.js", 4 | "options": [""] 5 | } 6 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/echo-post.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "echo-json", 3 | "script" : "echo-env.js", 4 | "log_date_format" : "DD", 5 | "out_file" : "echo-test.log", 6 | "merge_logs" : true, 7 | "env" : { 8 | "ECHO_MSG" : "YAY" 9 | }, 10 | "env_production" : { 11 | "ECHO_MSG" : "WOW" 12 | }, 13 | "env_testing" : { 14 | "ECHO_MSG" : "TEST" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/echo-to-pm2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "echo-to", 3 | "script" : "echo-to.js", 4 | "options": [""] 5 | } 6 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/echo.coffee: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env coffee 2 | 3 | setInterval (-> console.log 'ok'), 500 -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/echo.js: -------------------------------------------------------------------------------- 1 | 2 | setInterval(function() { 3 | console.log('echo.js'); 4 | }, 50); 5 | 6 | setInterval(function() { 7 | console.error('echo.js-error'); 8 | }, 50); 9 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/echo2.js: -------------------------------------------------------------------------------- 1 | 2 | var http = require('http'); 3 | 4 | http.createServer(function(req, res) { 5 | res.writeHead(200); 6 | res.end('hey'); 7 | }).listen(0); 8 | 9 | process.on('message', function(msg) { 10 | if (msg == 'shutdown') { 11 | console.log('Closing all connections...'); 12 | setTimeout(function() { 13 | console.log('Finished closing connections'); 14 | process.exit(0); 15 | }, 100); 16 | } 17 | }); 18 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/echo3.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | var http = require('http'); 4 | 5 | http.createServer(function(req, res) { 6 | res.writeHead(200); 7 | res.end('hey'); 8 | }).listen(0); 9 | 10 | process.on('message', function(msg) { 11 | if (msg == 'shutdown') { 12 | console.log('Closing all connections...'); 13 | setTimeout(function() { 14 | console.log('Finished closing connections'); 15 | process.exit(0); 16 | }, 100); 17 | } 18 | }); 19 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/echoto-pm2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "echoto", 3 | "script" : "echoto.js", 4 | "options": [""] 5 | } 6 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/env-ecosystem.json: -------------------------------------------------------------------------------- 1 | { 2 | "apps" : [{ 3 | "name" : "env2", 4 | "script" : "./env.js", 5 | "out_file" : "out-env.log", 6 | "merge_logs" : true, 7 | "env": { 8 | "NODE_ENV": "production" 9 | } 10 | }], 11 | "deploy" : { 12 | "production" : { 13 | "user" : "node", 14 | "host" : "212.83.163.1", 15 | "ref" : "origin/master", 16 | "repo" : "git@github.com:repo.git", 17 | "path" : "/var/www/production", 18 | "env" : { 19 | "TEST_VARIABLE": "No worries!" 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/env-refreshed.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "name" : "appname", 3 | "script" : "./env.js", 4 | "out_file" : "out-env.log", 5 | "merge_logs" : true, 6 | "env": { 7 | "NODE_ENV": "production", 8 | "TEST_VARIABLE": { "HEYYYY": true } 9 | } 10 | }] 11 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/env-switching/app.json: -------------------------------------------------------------------------------- 1 | { 2 | script : './child.js', 3 | // Default environment 4 | env : { 5 | NODE_ENV : 'normal' 6 | }, 7 | // Prod 8 | env_production : { 9 | NODE_ENV : 'production' 10 | }, 11 | // Test 12 | env_test : { 13 | NODE_ENV : 'test' 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/env-switching/child.js: -------------------------------------------------------------------------------- 1 | 2 | setInterval(function() { 3 | console.log(process.env.NODE_ENV); 4 | }, 1000); 5 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/env.js: -------------------------------------------------------------------------------- 1 | setInterval(function() { 2 | console.log(process.env.TEST_VARIABLE); 3 | }, 100); 4 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/env.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "name" : "appname", 3 | "script" : "./env.js", 4 | "out_file" : "out-env.log", 5 | "merge_logs" : true, 6 | "env": { 7 | "NODE_ENV": "production", 8 | "TEST_VARIABLE": "YES" 9 | } 10 | }] 11 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/events/custom_action.js: -------------------------------------------------------------------------------- 1 | 2 | var axm = require('pmx'); 3 | 4 | axm.action('refresh:db', function(reply) { 5 | console.log('Refreshing'); 6 | reply({success : true, subobj : { a : 'b'}}); 7 | }); 8 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/events/custom_action_with_params.js: -------------------------------------------------------------------------------- 1 | 2 | var axm = require('pmx'); 3 | 4 | axm.action('refresh:db', { comment : 'Refresh the database' }, function(reply) { 5 | console.log('Refreshing'); 6 | reply({success : true}); 7 | }); 8 | 9 | axm.action('chanme:ladb', { comment : 'Refresh la BIG database' }, function(reply) { 10 | console.log('Refreshing BIG DB'); 11 | reply({success : true}); 12 | }); 13 | 14 | axm.action('rm:rf', { comment : 'Delete moi ca plus vite que ca !' }, function(reply) { 15 | console.log('RMING RFING'); 16 | reply({success : true}); 17 | }); 18 | 19 | axm.action('rm:roff', function(reply) { 20 | console.log('RMING RFING'); 21 | reply({success : true}); 22 | }); 23 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/events/own_event.js: -------------------------------------------------------------------------------- 1 | 2 | var axm = require('pmx'); 3 | 4 | setInterval(function() { 5 | axm.emit('user:register', { 6 | user : 'toto@gmail.com', 7 | mail : 'hey@gmail.com' 8 | }); 9 | }, 200); 10 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/extra-lang/apps.json: -------------------------------------------------------------------------------- 1 | { 2 | apps: [{ 3 | "interpreter" : "/usr/bin/python3", 4 | "name" : "echo-python", 5 | "script" : "echo.py", 6 | "interpreter_args" : "-u", 7 | "log" : "python-app.log", 8 | "combine_logs" : true, 9 | "env" : { 10 | DEFAULT_STR : "Python" 11 | }, 12 | "env_production" : { 13 | DEFAULT_STR : "PythonProduction" 14 | } 15 | }, { 16 | "exec_interpreter" : "/usr/bin/php", 17 | "name" : "echo-php", 18 | "script" : "echo.php", 19 | "output" : "php-app-out.log", 20 | "error" : "php-error.log", 21 | "combine_logs" : true 22 | }] 23 | } 24 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/extra-lang/echo.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/extra-lang/echo.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | import os 3 | import time 4 | 5 | while 1: 6 | try: 7 | print(os.environ['DEFAULT_STR']) 8 | except KeyError: 9 | print('RAWPython') 10 | time.sleep(1) 11 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/git/COMMIT_EDITMSG: -------------------------------------------------------------------------------- 1 | first commit 2 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/git/config: -------------------------------------------------------------------------------- 1 | [core] 2 | repositoryformatversion = 0 3 | filemode = true 4 | bare = false 5 | logallrefupdates = true 6 | [remote "origin"] 7 | url = https://github.com/jshkurti/pm2_travis.git 8 | fetch = +refs/heads/*:refs/remotes/origin/* 9 | [branch "master"] 10 | remote = origin 11 | merge = refs/heads/master 12 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/git/description: -------------------------------------------------------------------------------- 1 | Unnamed repository; edit this file 'description' to name the repository. 2 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/git/hooks/applypatch-msg.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to check the commit log message taken by 4 | # applypatch from an e-mail message. 5 | # 6 | # The hook should exit with non-zero status after issuing an 7 | # appropriate message if it wants to stop the commit. The hook is 8 | # allowed to edit the commit message file. 9 | # 10 | # To enable this hook, rename this file to "applypatch-msg". 11 | 12 | . git-sh-setup 13 | test -x "$GIT_DIR/hooks/commit-msg" && 14 | exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} 15 | : 16 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/git/hooks/post-update.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to prepare a packed repository for use over 4 | # dumb transports. 5 | # 6 | # To enable this hook, rename this file to "post-update". 7 | 8 | exec git update-server-info 9 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/git/hooks/pre-applypatch.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to verify what is about to be committed 4 | # by applypatch from an e-mail message. 5 | # 6 | # The hook should exit with non-zero status after issuing an 7 | # appropriate message if it wants to stop the commit. 8 | # 9 | # To enable this hook, rename this file to "pre-applypatch". 10 | 11 | . git-sh-setup 12 | test -x "$GIT_DIR/hooks/pre-commit" && 13 | exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} 14 | : 15 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/git/index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cli/test/fixtures/git/index -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/git/info/exclude: -------------------------------------------------------------------------------- 1 | # git ls-files --others --exclude-from=.git/info/exclude 2 | # Lines that start with '#' are comments. 3 | # For a project mostly in C, the following would be a good set of 4 | # exclude patterns (uncomment them if you want to use them): 5 | # *.[oa] 6 | # *~ 7 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/git/logs/HEAD: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 7ae6d7c64d39da2167c33993e1f4f0233e8eb6f0 jshkurti 1429209718 +0200 commit (initial): first commit 2 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/git/logs/refs/heads/master: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 7ae6d7c64d39da2167c33993e1f4f0233e8eb6f0 jshkurti 1429209718 +0200 commit (initial): first commit 2 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/git/logs/refs/remotes/origin/master: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 7ae6d7c64d39da2167c33993e1f4f0233e8eb6f0 jshkurti 1429209819 +0200 update by push 2 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/git/objects/5d/a45b6659e5cba8f444616f4e18529ad5dde72f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cli/test/fixtures/git/objects/5d/a45b6659e5cba8f444616f4e18529ad5dde72f -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/git/objects/7a/e6d7c64d39da2167c33993e1f4f0233e8eb6f0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cli/test/fixtures/git/objects/7a/e6d7c64d39da2167c33993e1f4f0233e8eb6f0 -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cli/test/fixtures/git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/git/refs/heads/master: -------------------------------------------------------------------------------- 1 | 7ae6d7c64d39da2167c33993e1f4f0233e8eb6f0 2 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/git/refs/remotes/origin/master: -------------------------------------------------------------------------------- 1 | 7ae6d7c64d39da2167c33993e1f4f0233e8eb6f0 2 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/graceful-exit-no-listen.js: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Example of graceful exit that does not listen 4 | * 5 | * $ pm2 gracefulReload all 6 | */ 7 | 8 | process.on('message', function(msg) { 9 | if (msg == 'shutdown') { 10 | console.log('Closing all connections...'); 11 | setTimeout(function() { 12 | console.log('Finished closing connections'); 13 | process.exit(0); 14 | }, 1500); 15 | } 16 | }); 17 | 18 | setInterval(function () 19 | { 20 | console.log('tick'); 21 | }, 4000); 22 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/graceful-exit-send.js: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Example of graceful exit that does not listen but sends 'online' 4 | * 5 | * $ pm2 gracefulReload all 6 | */ 7 | 8 | process.on('message', function(msg) { 9 | if (msg == 'shutdown') { 10 | console.log('Closing all connections...'); 11 | setTimeout(function() { 12 | console.log('Finished closing connections'); 13 | process.exit(0); 14 | }, 1500); 15 | } 16 | }); 17 | 18 | setInterval(function () 19 | { 20 | console.log('tick'); 21 | }, 4000); 22 | 23 | setTimeout(function () 24 | { 25 | process.send('online'); 26 | }, 2000); 27 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/graceful-exit.js: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Example of graceful exit 4 | * 5 | * $ pm2 gracefulReload all 6 | */ 7 | 8 | process.on('message', function(msg) { 9 | if (msg == 'shutdown') { 10 | console.log('Closing all connections...'); 11 | setTimeout(function() { 12 | console.log('Finished closing connections'); 13 | process.exit(0); 14 | }, 1500); 15 | } 16 | }); 17 | 18 | var http = require('http'); 19 | 20 | http.createServer(function(req, res) { 21 | res.writeHead(200); 22 | res.end('hey'); 23 | }).listen(8000, function() { 24 | console.log('listening'); 25 | }); 26 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/harmony.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert') 2 | , s = new Set() 3 | ; 4 | 5 | s.add('a'); 6 | 7 | assert.ok(s.has('a')); 8 | 9 | setInterval(function() { 10 | console.log(s.has('a')); 11 | }, 1000); 12 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/harmony.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "ES6", 3 | "script" : "harmony.js", 4 | "node_args" : "--harmony" 5 | } 6 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/homogen-json-action/all.json: -------------------------------------------------------------------------------- 1 | { 2 | "apps" : [{ 3 | "script" : "http.js", 4 | "name" : "http", 5 | "instances" : 4 6 | }, { 7 | "script" : "http.js", 8 | "name" : "http2", 9 | "instances" : 2 10 | }] 11 | } 12 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/homogen-json-action/http.js: -------------------------------------------------------------------------------- 1 | var pmx = require('pmx').init({ 2 | http : true 3 | }); 4 | 5 | var probe = pmx.probe(); 6 | 7 | var http = require('http'); 8 | 9 | var server = http.createServer(function(req, res) { 10 | res.writeHead(200); 11 | res.end('hey'); 12 | }).listen(8000, function() { 13 | console.log('App listening on port 8000'); 14 | }); 15 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/http.js: -------------------------------------------------------------------------------- 1 | 2 | var http = require('http'); 3 | 4 | var app = http.createServer(function(req, res) { 5 | res.writeHead(200); 6 | res.end('hey'); 7 | }) 8 | 9 | var listener = app.listen(0, function() { 10 | console.log('Listening on port ' + listener.address().port); 11 | }); 12 | 13 | process.on('message', function(msg) { 14 | if (msg == 'shutdown') { 15 | console.log('Closing all connections...'); 16 | setTimeout(function() { 17 | console.log('Finished closing connections'); 18 | process.exit(0); 19 | }, 100); 20 | } 21 | }); 22 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/inside/echo.js: -------------------------------------------------------------------------------- 1 | 2 | setInterval(function() { 3 | console.log('echo.js'); 4 | }, 500); 5 | 6 | setInterval(function() { 7 | console.error('echo.js-error'); 8 | }, 500); 9 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/inside/inner_restart.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | $PM2_PATH restart echo 4 | $PM2_PATH restart echo 5 | $PM2_PATH restart echo 6 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/inside/reload_inside.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | var PM2 = require('../../..'); 5 | 6 | var pm2 = new PM2.custom({ 7 | cwd : __dirname 8 | }); 9 | 10 | PM2.reload('echo', function(err, app) { 11 | if (err) throw err; 12 | }); 13 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/inside/restart_inside.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | var PM2 = require('../../..'); 4 | 5 | var pm2 = new PM2.custom({ 6 | cwd : __dirname 7 | }); 8 | 9 | PM2.restart('echo', function(err, app) { 10 | if (err) throw err; 11 | }); 12 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/inside/start_inside.js: -------------------------------------------------------------------------------- 1 | 2 | var PM2 = require('../../..'); 3 | 4 | var pm2 = new PM2.custom({ 5 | cwd : __dirname 6 | }); 7 | 8 | PM2.start('./echo.js', function(err, app) { 9 | if (err) throw err; 10 | }); 11 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/insidePm2Process.js: -------------------------------------------------------------------------------- 1 | setInterval(function(){ 2 | console.log(process.env.TEST_VARIABLE); 3 | }, 500); -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/interface/child.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | var http = require('http'); 5 | 6 | http.createServer(function(req, res) { 7 | res.writeHead(200); 8 | res.end('hey'); 9 | }).listen(8000); 10 | 11 | process.on('message', function(msg) { 12 | if (msg == 'shutdown') { 13 | console.log('Closing all connections...'); 14 | setTimeout(function() { 15 | console.log('Finished closing connections'); 16 | process.exit(0); 17 | }, 100); 18 | } 19 | }); 20 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/interface/human_event.js: -------------------------------------------------------------------------------- 1 | 2 | var axm = require('pmx'); 3 | 4 | setInterval(function() { 5 | axm.emit('content:page:created', { 6 | msg : 'A CMS page has been created', 7 | user : 'Francois Debiole' 8 | }); 9 | }, 200); 10 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/interface/log_out.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | console.log('outmsg'); 4 | 5 | console.error('errmsg'); 6 | 7 | setInterval(function() {}, 100); 8 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/interface/process_exception.js: -------------------------------------------------------------------------------- 1 | 2 | var axm = require('pmx'); 3 | 4 | axm.catchAll(); 5 | 6 | setTimeout(function() { 7 | throw new Error('Exit'); 8 | }, 200); 9 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/interface/process_exception_with_logs.js: -------------------------------------------------------------------------------- 1 | 2 | var pmx = require('pmx'); 3 | 4 | pmx.action('exception', function(reply) { 5 | setTimeout(function() { 6 | console.log('Im going to crash'); 7 | console.log('I will crash muhahah'); 8 | throw new Error('CRASHED'); 9 | }, 100); 10 | 11 | return reply({ sucess: true}); 12 | }); 13 | 14 | setInterval(function() { 15 | }, 1000); 16 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/interface/promise_rejection.js: -------------------------------------------------------------------------------- 1 | var p = new Promise(function(resolve, reject) { 2 | //setTimeout(function() { 3 | //throw new Error('fail') 4 | abc = asdsad; 5 | 6 | return resolve('ok') 7 | //}, 200) 8 | }) 9 | 10 | p.then(function(e) { 11 | }) 12 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/interpreter/echo.coffee: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env coffee 2 | 3 | setInterval (-> console.log 'ok'), 500 -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/interpreter/echo.ls: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env lsc 2 | 3 | setInterval (-> console.log 'Hello Livescript!'), 500 4 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/interpreter/echo.ts: -------------------------------------------------------------------------------- 1 | 2 | class Greeter { 3 | constructor(public greeting: string) { } 4 | greet() { 5 | return this.greeting; 6 | } 7 | }; 8 | 9 | var greeter = new Greeter("Hello Typescript!"); 10 | 11 | console.log(greeter.greet()); 12 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/js-configuration/app.js: -------------------------------------------------------------------------------- 1 | 2 | setInterval(function() { 3 | console.log('ok'); 4 | }, 1000); 5 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/json-reload/big-array.js: -------------------------------------------------------------------------------- 1 | 2 | var obj = {}; 3 | var i = 0; 4 | 5 | setInterval(function() { 6 | obj[i] = Array.apply(null, new Array(99999)).map(String.prototype.valueOf,"hi"); 7 | i++; 8 | }, 40); 9 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/json-reload/echo-env.js: -------------------------------------------------------------------------------- 1 | 2 | setInterval(function() { 3 | console.log(process.env.ECHO_MSG || 'ok'); 4 | }, 100); 5 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/json-reload/echo-post.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "echo-json", 3 | "script" : "echo-env.js", 4 | "log_date_format" : "DD", 5 | "out_file" : "echo-test.log", 6 | "merge_logs" : true, 7 | "env" : { 8 | "ECHO_MSG" : "YAY" 9 | }, 10 | "env_production" : { 11 | "ECHO_MSG" : "WOW" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/json-reload/echo-pre.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "echo-json", 3 | "script" : "echo-env.js", 4 | "log_date_format" : "YYYY-MM-DD HH:mm Z", 5 | "out_file" : "echo-test.log", 6 | "merge_logs" : true 7 | } 8 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/json-reload/max-mem-0.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "max_mem", 3 | "script" : "big-array.js", 4 | "max_memory_restart" : "300M" 5 | } 6 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/json-reload/max-mem.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "max_mem", 3 | "script" : "big-array.js", 4 | "max_memory_restart" : "19M" 5 | } 6 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/killnotsofast.js: -------------------------------------------------------------------------------- 1 | setInterval(function() { 2 | console.log('ALIVE'); 3 | }, 500); 4 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/killtoofast.js: -------------------------------------------------------------------------------- 1 | 2 | setInterval(function() { 3 | console.log('BOUM'); 4 | process.exit(1); 5 | }, 30); 6 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/listen-timeout/wait-ready.js: -------------------------------------------------------------------------------- 1 | 2 | var http = require('http'); 3 | 4 | var server = http.createServer(function(req, res) { 5 | res.writeHead(200); 6 | res.end('hey'); 7 | }).listen(process.env.PORT || 8000, function() { 8 | console.log('App listening on port %d in env %s', process.env.PORT || 8000, process.env.NODE_ENV); 9 | 10 | // 1# Notify application ready 11 | setTimeout(function() { 12 | process.send('ready'); 13 | }, 2000); 14 | 15 | }); 16 | 17 | // // 2# Handle on Exit 18 | process.on('SIGINT', function() { 19 | console.log('Cleanup on exit'); 20 | 21 | server.on('close', function() { 22 | console.log('Connections closed'); 23 | process.exit(0); 24 | }); 25 | 26 | server.close(); 27 | }); 28 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/local_require.js: -------------------------------------------------------------------------------- 1 | var paths = require('module').globalPaths; 2 | 3 | if (Array.isArray(paths)) { 4 | var found = false; 5 | paths.forEach(function(elem) { 6 | if (elem === process.env.NODE_PATH) { 7 | found = true; 8 | } 9 | }); 10 | 11 | if (!found) 12 | process.exit(1); 13 | else 14 | setInterval(function keepAlive() {}, 10000); 15 | } 16 | else { 17 | process.exit(1); 18 | } 19 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/module-fixture/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example-module", 3 | "version": "0.3.21", 4 | "description": "Keymetrics++ and PM2 adapter", 5 | "main": "scoped-action.js", 6 | "dependencies": { 7 | }, 8 | "scripts": { 9 | "test": "DEBUG='axm:*' mocha test/*.mocha.js" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/keymetrics/pmx.git" 14 | }, 15 | "config" : { 16 | "aconfig-var" : true, 17 | "var2" : false 18 | }, 19 | "author": "Keymetrics I/O", 20 | "license": "MIT" 21 | } 22 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/multi-echo.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "name" : "echo2", 3 | "script" : "echo.js", 4 | "max" : "1" 5 | }, { 6 | "name" : "echo3", 7 | "script" : "echo.js", 8 | "max" : "1" 9 | }] 10 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/network.js: -------------------------------------------------------------------------------- 1 | 2 | var http = require('http'); 3 | var i = 0; 4 | 5 | http.createServer(function(req, res) { 6 | res.writeHead(200); 7 | res.end("hello world\n" + i++); 8 | }).listen(8004); 9 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/no-restart.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name" : "no_restart_app", 4 | "script" : "./killtoofast.js", 5 | "autorestart" : false 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/no-vizion.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name" : "no_vizion", 4 | "script" : "./echo.js", 5 | "vizion" : false 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/no_cwd_change.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "name" : "iminpath1", 3 | "script" : "iminpath1.js", 4 | "out_file" : "./iminpath1.log" 5 | },{ 6 | "name" : "iminpath2", 7 | "script" : "iminpath2.js", 8 | "out_file" : "./iminpath2.log" 9 | }] 10 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/nvm-node-version/ecosystem.json: -------------------------------------------------------------------------------- 1 | { 2 | /** 3 | * Application configuration section 4 | * http://pm2.PM25.io/docs/usage/application-declaration/ 5 | */ 6 | apps : [ 7 | 8 | // First application 9 | { 10 | name : "http-4.6", 11 | script : "http.js", 12 | interpreter : "node@4.6.0" 13 | }, 14 | { 15 | name : "http-6.7", 16 | script : "http.js", 17 | force : true, 18 | env : { 19 | PORT : 8002 20 | }, 21 | interpreter : "node@6.7.0" 22 | }, 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/nvm-node-version/http.js: -------------------------------------------------------------------------------- 1 | 2 | var http = require('http'); 3 | 4 | var server = http.createServer(function(req, res) { 5 | res.writeHead(200); 6 | res.end('hey'); 7 | }).listen(process.env.PORT || 8000, function() { 8 | console.log('App listening on port %d in env %s', process.env.PORT || 8000, process.env.NODE_ENV); 9 | }); 10 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/path-check.js: -------------------------------------------------------------------------------- 1 | console.log(__filename); 2 | console.log(module.filename); 3 | console.log(module.parent); 4 | console.log(module.children); 5 | console.log(__dirname); 6 | console.log(module); 7 | console.log(process.env.PWD); 8 | console.log(require.main.filename); 9 | console.log(require.main === module); 10 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/path-resolution/echo.js: -------------------------------------------------------------------------------- 1 | 2 | setInterval(function() { 3 | console.log('echo.js'); 4 | }, 50); 5 | 6 | setInterval(function() { 7 | console.error('echo.js-error'); 8 | }, 50); 9 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/path-resolution/ecosystem.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | /** 3 | * Application configuration section 4 | * http://pm2.PM25.io/docs/usage/application-declaration/ 5 | */ 6 | apps : [ 7 | { 8 | name : "test", 9 | script : "./echo.js", 10 | out_file : '~/echo-out.log', 11 | error_file : '~/echo-err.log', 12 | pid_file : '~/echo-pid.log' 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/path-resolution/ecosystem2.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | /** 3 | * Application configuration section 4 | * http://pm2.PM25.io/docs/usage/application-declaration/ 5 | */ 6 | apps : [ 7 | { 8 | name : "test", 9 | script : "./echo.js", 10 | out_file : 'echo-out.log', 11 | error_file : 'echo-err.log', 12 | pid_file : 'echo-pid.log' 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/path1/iminpath1.js: -------------------------------------------------------------------------------- 1 | 2 | console.log(process.cwd()); 3 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/path1/path2/iminpath2.js: -------------------------------------------------------------------------------- 1 | 2 | console.log(process.cwd()); 3 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/pm2-dev/app.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | 3 | http.createServer(function(req, res) { 4 | res.writeHead(200); 5 | res.end('hey'); 6 | }).listen(0); 7 | 8 | process.on('message', function(msg) { 9 | if (msg == 'shutdown') { 10 | console.log('Closing all connections...'); 11 | setTimeout(function() { 12 | console.log('Finished closing connections'); 13 | process.exit(0); 14 | }, 100); 15 | } 16 | }); 17 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/pm2-dev/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "script": "app.js", 3 | "watch": ["server", "client"], 4 | "ignore_watch" : ["node_modules", "client/img"] 5 | } 6 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/process.json: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/promise/empty-rejection.js: -------------------------------------------------------------------------------- 1 | 2 | setTimeout(function() { 3 | Promise.reject(); 4 | }, 1000); 5 | 6 | setInterval(function() { 7 | }, 1000); 8 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/promise/rejection.js: -------------------------------------------------------------------------------- 1 | 2 | setTimeout(function() { 3 | Promise.reject(new Error('Errorla')); 4 | }, 1000); 5 | 6 | setInterval(function() { 7 | }, 1000); 8 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/python-script.py: -------------------------------------------------------------------------------- 1 | import time 2 | 3 | if __name__ == "__main__": 4 | while 1: 5 | print 'Script.py: alive' 6 | time.sleep(1) 7 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/quit.js: -------------------------------------------------------------------------------- 1 | 2 | console.log('HEY!'); 3 | 4 | setTimeout(function() { 5 | process.exit(1); 6 | }, 3000); 7 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/send-data-process/return-data.js: -------------------------------------------------------------------------------- 1 | 2 | process.on('message', function(packet) { 3 | if (packet.topic == 'process:msg') { 4 | process.send({ 5 | topic : 'process:msg', 6 | data : { 7 | success : true 8 | } 9 | }); 10 | } 11 | }); 12 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/server.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | 3 | http.createServer(function(req, res) { 4 | res.writeHead(200); 5 | res.end("hello world\n"); 6 | }).listen(8020); 7 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/signal.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | setInterval(function() { 4 | console.log('ok'); 5 | }, 1000); 6 | 7 | process.on('SIGUSR2', function () { 8 | console.log('SIGUSR2'); 9 | }); 10 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/signals/delayed_sigint.js: -------------------------------------------------------------------------------- 1 | 2 | setInterval(function() { 3 | // Do nothing to keep process alive 4 | }, 1000); 5 | 6 | process.on('SIGINT', function () { 7 | console.log('SIGINT cb called'); 8 | }); 9 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/source-map/main.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var models_1 = require('./models'); 3 | console.log(models_1.UserMessage); 4 | setTimeout(function () { 5 | throw new Error('errr'); 6 | }, 200); 7 | //# sourceMappingURL=main.js.map 8 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/source-map/main.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"main.js","sourceRoot":"","sources":["../app/main.ts"],"names":[],"mappings":";AACA,uBAA0B,UAAU,CAAC,CAAA;AAErC,OAAO,CAAC,GAAG,CAAC,oBAAW,CAAC,CAAC;AAEzB,UAAU,CAAC;IACT,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;AAC1B,CAAC,EAAE,IAAI,CAAC,CAAC"} -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/source-map/models.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"models.js","sourceRoot":"","sources":["../app/models.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAOb;IAGE,qBAAY,OAAe;QACzB,IAAI,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAE/B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,oCAAoC,GAAG,OAAO,CAAC,CAAC;QAClE,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,sBAAI,6BAAI;aAAR;YACE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;QACxB,CAAC;;;OAAA;IAED,sBAAI,gCAAO;aAAX;YACE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;QAC3B,CAAC;;;OAAA;IACH,kBAAC;AAAD,CAAC,AApBD,IAoBC;AApBY,mBAAW,cAoBvB,CAAA"} -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/start-consistency/child.js: -------------------------------------------------------------------------------- 1 | 2 | require('pmx').init({ 3 | http : true 4 | }); 5 | 6 | var http = require('http'); 7 | 8 | var server = http.createServer(function(req, res) { 9 | res.writeHead(200); 10 | res.end('hey'); 11 | }).listen(8000); 12 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/start-consistency/child.json: -------------------------------------------------------------------------------- 1 | { 2 | script:"./child.js", 3 | name :"child" 4 | } 5 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/startProcessInsidePm2.js: -------------------------------------------------------------------------------- 1 | var PM2 = require('../..'); 2 | 3 | /** 4 | * New gen API 5 | */ 6 | var pm2 = new PM2.custom(); 7 | 8 | //console.log(process.env); 9 | 10 | pm2.connect(function(err) { 11 | 12 | console.error(' ----------------------' ); 13 | 14 | pm2.start('./insidePm2Process.js', { 15 | name: 'insideProcess', 16 | 'output': './inside-out.log', 17 | merge_logs: true 18 | }, function(err, proc){ 19 | if(err){ 20 | console.log(err); 21 | return process.exit(1); 22 | } 23 | }); 24 | 25 | 26 | }); 27 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/startProcessInsidePm2.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "name" : "masterProcess", 3 | "script" : "./startProcessInsidePm2.js", 4 | "exec_mode" : "fork_mode", 5 | "min_uptime" : "100", 6 | "max_restarts" : "50" 7 | }] -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/stdout-stderr.js: -------------------------------------------------------------------------------- 1 | 2 | process.stdout.write('outwrite', 'utf8', function() { 3 | console.log('outcb'); 4 | }); 5 | 6 | process.stderr.write('errwrite', 'utf8', function() { 7 | console.log('errcb'); 8 | }); 9 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/throw-later.js: -------------------------------------------------------------------------------- 1 | var timer = setInterval(function(){ 2 | console.log('tick', Date.now()); 3 | }, 100); 4 | 5 | setTimeout(function(){ 6 | clearInterval(timer); 7 | throw new Error('error has been caught') 8 | }, 350); 9 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/throw-later.json: -------------------------------------------------------------------------------- 1 | { 2 | "apps" : [{ 3 | "name" : "throw-later", 4 | "script" : "throw-later.js", 5 | "error_file" : "err.log", 6 | "out_file" : "out.log", 7 | "log_file" : "entire.log", 8 | "merge_logs" : true 9 | }] 10 | } 11 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/throw-later1.json: -------------------------------------------------------------------------------- 1 | { 2 | "apps" : [{ 3 | "name" : "throw-later", 4 | "script" : "throw-later.js", 5 | "error_file" : "err.log", 6 | "out_file" : "out.log", 7 | "merge_logs" : true 8 | }] 9 | } 10 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/throw-string.js: -------------------------------------------------------------------------------- 1 | 2 | function crash() { 3 | throw 'crashed'; 4 | } 5 | 6 | crash(); 7 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/throw.js: -------------------------------------------------------------------------------- 1 | 2 | throw new Error('Exit error message'); 3 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/toto.js: -------------------------------------------------------------------------------- 1 | 2 | console.log(process.env.TOTO); 3 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/wait_ready_event/http-wait-start.js: -------------------------------------------------------------------------------- 1 | 2 | var http = require('http'); 3 | 4 | var app = http.createServer(function(req, res) { 5 | res.writeHead(200); 6 | res.end('hey'); 7 | }) 8 | 9 | 10 | var listener = app.listen(0, function() { 11 | console.log('Listening on port ' + listener.address().port); 12 | process.send('ready'); 13 | }); 14 | 15 | process.on('message', function(msg) { 16 | if (msg == 'shutdown') { 17 | console.log('Closing all connections...'); 18 | setTimeout(function() { 19 | console.log('Finished closing connections'); 20 | process.exit(0); 21 | }, 100); 22 | } 23 | }); 24 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/wait_ready_event/http-wait-start_nocb.js: -------------------------------------------------------------------------------- 1 | 2 | var http = require('http'); 3 | 4 | var app = http.createServer(function(req, res) { 5 | res.writeHead(200); 6 | res.end('hey'); 7 | }) 8 | 9 | 10 | var listener = app.listen(0, function() { 11 | console.log('Listening on port ' + listener.address().port); 12 | }); 13 | 14 | process.on('message', function(msg) { 15 | if (msg == 'shutdown') { 16 | console.log('Closing all connections...'); 17 | setTimeout(function() { 18 | console.log('Finished closing connections'); 19 | process.exit(0); 20 | }, 100); 21 | } 22 | }); 23 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/watch/app-watch-rename.json: -------------------------------------------------------------------------------- 1 | { 2 | apps: [{ 3 | script : 'http.js', 4 | name : 'http', 5 | watch : true 6 | }] 7 | } 8 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/watch/app-watch.json: -------------------------------------------------------------------------------- 1 | { 2 | apps: [{ 3 | script : 'http.js', 4 | name : 'http', 5 | watch : true 6 | }] 7 | } 8 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/watch/app.json: -------------------------------------------------------------------------------- 1 | { 2 | apps: [{ 3 | script : 'http.js', 4 | name : 'http', 5 | watch : false, 6 | env : { 7 | SHOULDBETHERE : 'toto' 8 | }, 9 | env_production : { 10 | SHOULDBETHERE : 'TYPEENV PRODUCTION' 11 | } 12 | }] 13 | } 14 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/watch/http.js: -------------------------------------------------------------------------------- 1 | 2 | var http = require('http'); 3 | 4 | var app = http.createServer(function(req, res) { 5 | res.writeHead(200); 6 | res.end('hey'); 7 | }) 8 | 9 | console.log(process.env.TOTO_ENV); 10 | 11 | var listener = app.listen(0, function() { 12 | console.log('Listening on port ' + listener.address().port); 13 | }); 14 | 15 | process.on('message', function(msg) { 16 | if (msg == 'shutdown') { 17 | console.log('Closing all connections...'); 18 | setTimeout(function() { 19 | console.log('Finished closing connections'); 20 | process.exit(0); 21 | }, 100); 22 | } 23 | }); 24 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/watcher/donotwatchme.dir/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cli/test/fixtures/watcher/donotwatchme.dir/.gitkeep -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/watcher/server-watch.bak.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | 3 | http.createServer(function(req, res) { 4 | res.writeHead(200); 5 | res.end('hey'); 6 | }).listen(8010); 7 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/watcher/server-watch.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | 3 | http.createServer(function(req, res) { 4 | res.writeHead(200); 5 | res.end('hey'); 6 | }).listen(8010); 7 | console.log("edit") -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/watcher/server-watch.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "name" : "server-watch", 3 | "script" : "./server-watch.bak.js", 4 | "watch" : ["**"], 5 | "ignore_watch" : ["*.log"], 6 | "watch_options" : { 7 | "followSymlinks": true 8 | } 9 | }] 10 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/watcher/watchme.sym: -------------------------------------------------------------------------------- 1 | ./donotwatchme.dir -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/yaml-configuration/apps.yaml: -------------------------------------------------------------------------------- 1 | apps: 2 | - name: test 3 | script: echo.js 4 | - name: HTTP 5 | script: child.js 6 | instances: 4 7 | - name: PythonApp 8 | script: echo.py 9 | interpreter: /usr/bin/python3 10 | interpreter_args: -u 11 | env: 12 | DEFAULT_STR: 'PYTHONENV' 13 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/yaml-configuration/apps.yml: -------------------------------------------------------------------------------- 1 | apps: 2 | - name: test 3 | script: echo.js 4 | - name: HTTP 5 | script: child.js 6 | instances: 4 7 | - name: PythonApp 8 | script: echo.py 9 | interpreter: /usr/bin/python3 10 | interpreter_args: -u 11 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/yaml-configuration/child.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | var http = require('http'); 5 | 6 | http.createServer(function(req, res) { 7 | res.writeHead(200); 8 | res.end('hey'); 9 | }).listen(8000); 10 | 11 | process.on('message', function(msg) { 12 | if (msg == 'shutdown') { 13 | console.log('Closing all connections...'); 14 | setTimeout(function() { 15 | console.log('Finished closing connections'); 16 | process.exit(0); 17 | }, 100); 18 | } 19 | }); 20 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/yaml-configuration/echo.js: -------------------------------------------------------------------------------- 1 | 2 | setInterval(function() { 3 | console.log('ok'); 4 | }, 100); 5 | 6 | setInterval(function() { 7 | console.error('thisnok'); 8 | }, 100); 9 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/yaml-configuration/echo.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | import os 3 | import time 4 | 5 | while 1: 6 | try: 7 | print(os.environ['DEFAULT_STR']) 8 | except KeyError: 9 | print('RAWPython') 10 | time.sleep(1) 11 | -------------------------------------------------------------------------------- /PM25-Cli/test/fixtures/yaml-configuration/malformated.yml: -------------------------------------------------------------------------------- 1 | { 2 | "ASDSDASD": "ASDSADSAD" 3 | } 4 | -------------------------------------------------------------------------------- /PM25-Cli/test/helpers/plan.js: -------------------------------------------------------------------------------- 1 | 2 | var assert = require('assert'); 3 | 4 | /** 5 | * Description 6 | * @method Plan 7 | * @param {} count 8 | * @param {} done 9 | * @return 10 | */ 11 | function Plan(count, done) { 12 | this.done = done; 13 | this.count = count; 14 | } 15 | 16 | /** 17 | * Description 18 | * @method ok 19 | * @param {} expression 20 | * @return 21 | */ 22 | Plan.prototype.ok = function(expression) { 23 | assert(expression); 24 | 25 | if (this.count === 0) { 26 | assert(false, 'Too many assertions called'); 27 | } else { 28 | this.count--; 29 | } 30 | 31 | if (this.count === 0) { 32 | this.done(); 33 | } 34 | }; 35 | 36 | module.exports = Plan; 37 | -------------------------------------------------------------------------------- /PM25-Cli/test/interface/mocha.opts: -------------------------------------------------------------------------------- 1 | --timeout 5000 2 | -------------------------------------------------------------------------------- /PM25-Cli/test/interface/password.mocha.js: -------------------------------------------------------------------------------- 1 | 2 | var Password = require('../../lib/Interactor/Password.js'); 3 | var should = require('should'); 4 | 5 | describe('Password test', function() { 6 | var crypted = ''; 7 | 8 | it('should crypt a password', function() { 9 | crypted = Password.generate('testpass'); 10 | }); 11 | 12 | it('should fail with wrong password', function() { 13 | Password.verify('testpasds', crypted).should.be.false; 14 | }); 15 | 16 | it('should success with right password', function() { 17 | Password.verify('testpass', crypted).should.be.true; 18 | }); 19 | 20 | }); 21 | -------------------------------------------------------------------------------- /PM25-Cli/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --timeout 5000 2 | -------------------------------------------------------------------------------- /PM25-Cli/test/parallel_programmatic_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export NODE_ENV='test' 4 | 5 | function fail { 6 | echo -e "######## \033[31m ✘ $1\033[0m" 7 | } 8 | 9 | function success { 10 | echo -e "\033[32m------------> ✔ $1\033[0m" 11 | } 12 | 13 | function spec { 14 | [ $? -eq 0 ] || fail "$1" 15 | success "$1" 16 | } 17 | 18 | pkill -f PM2 19 | 20 | cd test/ 21 | 22 | parallel --gnu --keep-order --joblog joblog --halt now,fail=1 -j+0 < programmatic_commands.txt 23 | spec "Should text have passed" 24 | cat joblog 25 | 26 | # possible to pass --tmux 27 | -------------------------------------------------------------------------------- /PM25-Cli/test/programmatic/mocha.opts: -------------------------------------------------------------------------------- 1 | --timeout 5000 2 | -------------------------------------------------------------------------------- /PM25-Cloud/README.md: -------------------------------------------------------------------------------- 1 | # PM2.5 2 | -------------------------------------------------------------------------------- /PM25-Cloud/TODO.md: -------------------------------------------------------------------------------- 1 | # TODO 2 | -------------------------------------------------------------------------------- /PM25-Cloud/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package", 3 | "version": "0.0.0", 4 | "dependencies": {} 5 | } 6 | 7 | -------------------------------------------------------------------------------- /PM25-Cloud/configure.json: -------------------------------------------------------------------------------- 1 | { 2 | "endpoints": { 3 | "web": "https://service.pm25.io:4438", 4 | "reverse": "http://service.pm25.io:43554", 5 | "push": "http://service.pm25.io:41624" 6 | }, 7 | "ports": { 8 | "wss": "8042", 9 | "ioswss": "8055" 10 | }, 11 | "passphrase": "", 12 | "dbpath": "mongodb://mongodb.yourdomain.com:28017/pm25", 13 | "sessiondbpath": "mongodb://mongodb.yourdomain.com:28017/pm25-session", 14 | "deviceproduction": "", 15 | "device": "" 16 | } 17 | -------------------------------------------------------------------------------- /PM25-Cloud/gulpfile.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | 'use strict'; 3 | 4 | var gulp = require('gulp'); 5 | var requireDir = require('require-dir'); 6 | var tasks = requireDir('./tasks'); 7 | 8 | for (var task in tasks) { 9 | if (tasks.hasOwnProperty(task)) { 10 | gulp.task(task, tasks[task]['deps'] || [], (function(gulp, tasks, task) { 11 | return function() { 12 | return tasks[task]['task'](gulp); 13 | }; 14 | })(gulp, tasks, task)); 15 | } 16 | } 17 | 18 | gulp.task('default', [ 19 | 'del', 20 | 'copyto', 21 | 'sass', 22 | 'cssmin', 23 | 'jsmin', 24 | 'compile' 25 | ]); 26 | -------------------------------------------------------------------------------- /PM25-Cloud/helpers/MongoDBPool.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | 'use strict'; 3 | 4 | import Promise from 'bluebird'; 5 | import MongoDB from 'mongodb'; 6 | import MongoClient from 'mongodb'; 7 | Promise.promisifyAll(MongoDB); 8 | 9 | var config = require('../configure'); 10 | var dbPathDefault = config.dbpath; 11 | var dbPool = {}; 12 | 13 | async function connectdb(connName = '_default', dbPath = dbPathDefault) { 14 | if(dbPool.hasOwnProperty(connName)) { 15 | return dbPool[connName]; 16 | } 17 | 18 | dbPool[connName] = await MongoDB.MongoClient.connectAsync(dbPath); 19 | dbPool[connName].close = function() {}; //保持连接不关闭 20 | return dbPool[connName]; 21 | } 22 | 23 | module.exports = connectdb; 24 | -------------------------------------------------------------------------------- /PM25-Cloud/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('babel/register')({ stage: 0 }); 4 | 5 | var debug = require('debug')('PM2.5'); 6 | var app = require('./app'); 7 | 8 | app.set('port', process.env.PORT || 8000); 9 | app.set('env', 'production'); 10 | 11 | var server = app.listen(app.get('port'), function() { 12 | debug('Express server listening on port ' + server.address().port); 13 | }); 14 | -------------------------------------------------------------------------------- /PM25-Cloud/processes.json: -------------------------------------------------------------------------------- 1 | { 2 | "apps" : [{ 3 | "name": "PM2.5", 4 | "script": "index.js", 5 | "log_date_format": "YYYY-MM-DD HH:mm Z", 6 | "error_file": "./node-app.stderr.log", 7 | "out_file": "./node-app.stdout.log", 8 | "instances": "0", 9 | "watch": "false", 10 | "ignoreWatch": ["[\\/\\\\]\\./", "node_modules"], 11 | "merge_logs": true, 12 | "exec_mode": "cluster_mode", 13 | "env": { 14 | "NODE_ENV": "production" 15 | } 16 | }] 17 | } 18 | -------------------------------------------------------------------------------- /PM25-Cloud/public/buildin/css/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 50px; 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; 4 | } 5 | 6 | a { 7 | color: #00B7FF; 8 | } -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 4d802ddd9be0041e5a1b8ab2e596b04d 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_images/apple_watch_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_images/apple_watch_app.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_images/bucket_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_images/bucket_create.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_images/bucket_create_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_images/bucket_create_button.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_images/bucket_create_mirror.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_images/bucket_create_mirror.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_images/buckets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_images/buckets.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_images/host_exceptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_images/host_exceptions.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_images/host_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_images/host_red.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_images/hosts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_images/hosts.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_images/ios_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_images/ios_app.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_images/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_images/login.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_images/pm25_how_it_works_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_images/pm25_how_it_works_001.jpg -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_images/pm25_how_it_works_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_images/pm25_how_it_works_002.jpg -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_images/trigger_create_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_images/trigger_create_button.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_images/trigger_create_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_images/trigger_create_example.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_images/triggers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_images/triggers.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_sources/help.txt: -------------------------------------------------------------------------------- 1 | .. PM2.5 documentation master file, created by 2 | sphinx-quickstart on Mon Jul 6 21:16:59 2015. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | 帮助 7 | ==== 8 | 9 | **1. 为什么我的主机状态当前是飘红的?** 10 | 11 | 如下图所示,出现这种情况的原因很可能是你的服务端时间同标准时间不同步,或者服务端的数据上报有延迟导致的,飘红状态下会在主机名右侧显示延迟的时间差,如果延迟的时间差居高不下并持续增长则意味着你的服务器可能停止了向服务端的数据上报。 12 | 13 | .. image:: images/host_red.png 14 | 15 | -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/ajax-loader.gif -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/alert_info_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/alert_info_32.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/alert_warning_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/alert_warning_32.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/background_b01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/background_b01.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/bg-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/bg-page.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/bullet_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/bullet_orange.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/comment-bright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/comment-bright.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/comment-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/comment-close.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/comment.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/darkmetal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/darkmetal.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/down-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/down-pressed.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/down.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/file.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/fonts/Inconsolata-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/fonts/Inconsolata-Bold.ttf -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/fonts/Inconsolata.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/fonts/Inconsolata.ttf -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/fonts/Lato-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/fonts/Lato-Bold.ttf -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/fonts/Lato-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/fonts/Lato-Regular.ttf -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/fonts/RobotoSlab-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/fonts/RobotoSlab-Bold.ttf -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/fonts/RobotoSlab-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/fonts/RobotoSlab-Regular.ttf -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/headerbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/headerbg.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/logo.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/metal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/metal.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/minus.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/navigation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/navigation.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/plus.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/print.css: -------------------------------------------------------------------------------- 1 | @media print { 2 | div.header, div.relnav, #toc { display: none; } 3 | #contentwrapper { padding: 0; margin: 0; border: none; } 4 | body { color: black; background-color: white; } 5 | div.footer { border-top: 1px solid #888; color: #888; margin-top: 1cm; } 6 | div.footer a { text-decoration: none; } 7 | } 8 | -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/theme_extras.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 3 | var 4 | toc = $('#toc').show(), 5 | items = $('#toc > ul').hide(); 6 | 7 | $('#toc h3') 8 | .click(function() { 9 | if (items.is(':visible')) { 10 | items.animate({ 11 | height: 'hide', 12 | opacity: 'hide' 13 | }, 300, function() { 14 | toc.removeClass('expandedtoc'); 15 | }); 16 | } 17 | else { 18 | items.animate({ 19 | height: 'show', 20 | opacity: 'show' 21 | }, 400); 22 | toc.addClass('expandedtoc'); 23 | } 24 | }); 25 | 26 | }); 27 | -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/up-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/up-pressed.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/up.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/watermark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/watermark.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/_static/watermark_blur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/_static/watermark_blur.png -------------------------------------------------------------------------------- /PM25-Cloud/public/docs/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/docs/objects.inv -------------------------------------------------------------------------------- /PM25-Cloud/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/favicon.ico -------------------------------------------------------------------------------- /PM25-Cloud/public/font/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/font/FontAwesome.otf -------------------------------------------------------------------------------- /PM25-Cloud/public/font/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/font/fontawesome-webfont.eot -------------------------------------------------------------------------------- /PM25-Cloud/public/font/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/font/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /PM25-Cloud/public/font/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/font/fontawesome-webfont.woff -------------------------------------------------------------------------------- /PM25-Cloud/public/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /PM25-Cloud/public/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /PM25-Cloud/public/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /PM25-Cloud/public/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/img/favicon.png -------------------------------------------------------------------------------- /PM25-Cloud/public/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /PM25-Cloud/public/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /PM25-Cloud/public/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/img/logo.png -------------------------------------------------------------------------------- /PM25-Cloud/public/img/logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/img/logo@2x.png -------------------------------------------------------------------------------- /PM25-Cloud/public/img/pm25-logo-latest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/img/pm25-logo-latest.png -------------------------------------------------------------------------------- /PM25-Cloud/public/img/satinweave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Cloud/public/img/satinweave.png -------------------------------------------------------------------------------- /PM25-Cloud/public/js/controllers/transactionsController.js: -------------------------------------------------------------------------------- 1 | angular.module('pm25').controller('transactionsController', ['$scope', '$filter', '$http', function TransactionsCtrl($scope, $filter, $http) { 2 | 'use strict'; 3 | 4 | $scope.transactions = {}; 5 | 6 | $http.get('/api/node/transactions/server/' + __public_key + '/' + __server_name).success(function(ret, status) { 7 | $scope.transactions.data = ret.data; 8 | }); 9 | 10 | }]); 11 | -------------------------------------------------------------------------------- /PM25-Cloud/public/js/filters/decimalPlacesFilter.js: -------------------------------------------------------------------------------- 1 | angular.module('pm25').filter('decimalPlaces', function decimalPlacesFilter() { 2 | 'use strict'; 3 | 4 | return function(number, decimalPlaces) { 5 | if(!number && number !== 0) { 6 | return 0; 7 | } 8 | 9 | return number.toFixed(decimalPlaces); 10 | } 11 | }); 12 | -------------------------------------------------------------------------------- /PM25-Cloud/public/js/filters/humaniseFilter.js: -------------------------------------------------------------------------------- 1 | angular.module('pm25').filter('humanise', function humaniseFilter() { 2 | 'use strict'; 3 | 4 | return function(date) { 5 | return moment.duration(date, "seconds").humanize(); 6 | } 7 | }); 8 | -------------------------------------------------------------------------------- /PM25-Cloud/public/js/filters/memoryFilter.js: -------------------------------------------------------------------------------- 1 | angular.module('pm25').filter('memory', function memoryFilter() { 2 | 'use strict'; 3 | 4 | var sizes = ["B", "KB", "MB", "GB", "TB", "PB", "EB"]; 5 | 6 | return function(bytes) { 7 | if(!bytes && bytes !== 0) { 8 | return "0 B"; 9 | } 10 | 11 | for(var i = sizes.length; i > 0; i--) { 12 | var step = Math.pow(1024, i); 13 | 14 | if (bytes >= step) { 15 | return (bytes / step).toFixed(2) + " " + sizes[i]; 16 | } 17 | } 18 | 19 | return bytes + " B"; 20 | } 21 | }); 22 | -------------------------------------------------------------------------------- /PM25-Cloud/public/js/filters/timestampFormatFilter.js: -------------------------------------------------------------------------------- 1 | angular.module('pm25').filter('timestampFormat', function timestampFormatFilter() { 2 | 'use strict'; 3 | 4 | return function(timestamp) { 5 | return moment(timestamp).format('MM/DD HH:mm'); 6 | } 7 | }); 8 | -------------------------------------------------------------------------------- /PM25-Cloud/public/js/filters/timestampParseFilter.js: -------------------------------------------------------------------------------- 1 | angular.module('pm25').filter('timestampParse', function timestampParseFilter() { 2 | 'use strict'; 3 | 4 | return function(timestamp) { 5 | return new Date(timestamp).toString(); 6 | } 7 | }); 8 | -------------------------------------------------------------------------------- /PM25-Cloud/public/js/filters/uptimeFilter.js: -------------------------------------------------------------------------------- 1 | angular.module('pm25').filter('uptime', function uptimeFilter() { 2 | 'use strict'; 3 | 4 | return function(pm2_uptime) { 5 | return (new Date().getTime() - pm2_uptime) / 1000; 6 | } 7 | }); 8 | -------------------------------------------------------------------------------- /PM25-Cloud/public/js/index.js: -------------------------------------------------------------------------------- 1 | var pm25 = angular.module('pm25', ['ngCookies']).config(function() { 2 | 'use strict'; 3 | }); 4 | 5 | -------------------------------------------------------------------------------- /PM25-Cloud/public/js/vendor/angular/version.json: -------------------------------------------------------------------------------- 1 | {"full":"1.2.3","major":"1","minor":"2","dot":"3","codename":"unicorn-zapper","cdn":"1.2.2"} -------------------------------------------------------------------------------- /PM25-Cloud/public/js/vendor/angular/version.txt: -------------------------------------------------------------------------------- 1 | 1.2.3 -------------------------------------------------------------------------------- /PM25-Cloud/shell/post-deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | source /usr/local/nvm/nvm.sh 5 | nvm use 0.12.0 6 | node --version 7 | gulp default 8 | 9 | ./node_modules/.bin/pm25 kill 10 | ./node_modules/.bin/pm25 start index.js -i max -o /opt/logs/wwwlogs/pm25.out.log -e /opt/logs/wwwlogs/pm25.err.log 11 | -------------------------------------------------------------------------------- /PM25-Cloud/shell/pre-deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | export NVM_NODEJS_ORG_MIRROR=http://npm.taobao.org/mirrors/node 5 | 6 | NVM_HOME=~/.nvm 7 | PORJECT_HOME=`pwd` 8 | 9 | if [ ! -d $NVM_HOME ]; then 10 | git clone https://github.com/creationix/nvm.git $NVM_HOME && cd $NVM_HOME && git checkout `git describe --abbrev=0 --tags` && cd $PORJECT_HOME 11 | fi 12 | 13 | source ~/.nvm/nvm.sh 14 | nvm install 0.12.0 15 | nvm use 0.12.0 16 | 17 | npm --registry=http://registry.cnpmjs.org install 18 | npm outdated --depth=0 19 | -------------------------------------------------------------------------------- /PM25-Cloud/tasks/compile.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | 'use strict'; 3 | 4 | module.exports = { 5 | deps: ['copyto'], 6 | task: function compile(gulp) { 7 | var ignore = require('gulp-ignore'); 8 | var replace = require('gulp-replace'); 9 | var t = new Date().getTime(); 10 | 11 | return gulp.src('./templates/**/*.*') 12 | .pipe(ignore('**/node_modules/**')) 13 | .pipe(replace(/\?v=\d+\./g, '?v=' + t + '.')) 14 | .pipe(gulp.dest('build/templates')); 15 | } 16 | }; 17 | -------------------------------------------------------------------------------- /PM25-Cloud/tasks/copyto.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | 'use strict'; 3 | 4 | module.exports = { 5 | deps: ['del'], 6 | task: function copyto(gulp) { 7 | return gulp.src('./public/**/*') 8 | .pipe(gulp.dest('./build/public/')); 9 | } 10 | }; 11 | -------------------------------------------------------------------------------- /PM25-Cloud/tasks/del.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | 'use strict'; 3 | 4 | module.exports = { 5 | task: function(gulp) { 6 | var del = require('del'); 7 | del.sync('build'); 8 | } 9 | }; 10 | -------------------------------------------------------------------------------- /PM25-Cloud/tasks/jsmin.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | 'use strict'; 3 | 4 | module.exports = { 5 | deps: ['copyto'], 6 | task: function jsmin(gulp) { 7 | var uglify = require('gulp-uglify'); 8 | var ignore = require('gulp-ignore'); 9 | 10 | return gulp.src('./build/public/**/*.js') 11 | .pipe(ignore.exclude(['**/node_modules/**', '**/*.css.js', '**/*.css-*.js'])) 12 | .pipe(ignore('**/node_modules/**')) 13 | .pipe(ignore('**/build/public/js/vendor/**')) 14 | .pipe(uglify()) 15 | .pipe(gulp.dest('./build/public/')); 16 | } 17 | }; 18 | -------------------------------------------------------------------------------- /PM25-Cloud/tasks/sass.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | 'use strict'; 3 | 4 | module.exports = { 5 | deps: ['copyto'], 6 | task: function sass(gulp) { 7 | var sass = require('gulp-sass'); 8 | var ignore = require('gulp-ignore'); 9 | 10 | return gulp.src('./build/public/**/*.scss') 11 | .pipe(ignore('**/node_modules/**')) 12 | .pipe(sass()) 13 | .pipe(gulp.dest('./build/public')); 14 | } 15 | }; 16 | -------------------------------------------------------------------------------- /PM25-Cloud/templates/buildin/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ${message} 6 | 7 | 8 | 9 |

${message}

10 |

${error.status}

11 |
$${error.stack}
12 | 13 | 14 | -------------------------------------------------------------------------------- /PM25-Cloud/templates/buildin/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ${title} 6 | 7 | 8 | 9 |

${title}

10 | Welcome to ${title} 11 | 12 | 13 | -------------------------------------------------------------------------------- /PM25-Docs/_build/doctrees/advanced.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/doctrees/advanced.doctree -------------------------------------------------------------------------------- /PM25-Docs/_build/doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/doctrees/environment.pickle -------------------------------------------------------------------------------- /PM25-Docs/_build/doctrees/getting_started.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/doctrees/getting_started.doctree -------------------------------------------------------------------------------- /PM25-Docs/_build/doctrees/help.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/doctrees/help.doctree -------------------------------------------------------------------------------- /PM25-Docs/_build/doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/doctrees/index.doctree -------------------------------------------------------------------------------- /PM25-Docs/_build/doctrees/installation.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/doctrees/installation.doctree -------------------------------------------------------------------------------- /PM25-Docs/_build/doctrees/introduction.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/doctrees/introduction.doctree -------------------------------------------------------------------------------- /PM25-Docs/_build/html/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 4d802ddd9be0041e5a1b8ab2e596b04d 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_images/apple_watch_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_images/apple_watch_app.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_images/bucket_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_images/bucket_create.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_images/bucket_create_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_images/bucket_create_button.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_images/bucket_create_mirror.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_images/bucket_create_mirror.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_images/buckets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_images/buckets.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_images/host_exceptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_images/host_exceptions.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_images/host_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_images/host_red.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_images/hosts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_images/hosts.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_images/ios_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_images/ios_app.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_images/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_images/login.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_images/pm25_how_it_works_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_images/pm25_how_it_works_001.jpg -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_images/pm25_how_it_works_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_images/pm25_how_it_works_002.jpg -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_images/trigger_create_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_images/trigger_create_button.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_images/trigger_create_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_images/trigger_create_example.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_images/triggers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_images/triggers.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_sources/help.txt: -------------------------------------------------------------------------------- 1 | .. PM2.5 documentation master file, created by 2 | sphinx-quickstart on Mon Jul 6 21:16:59 2015. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | 帮助 7 | ==== 8 | 9 | **1. 为什么我的主机状态当前是飘红的?** 10 | 11 | 如下图所示,出现这种情况的原因很可能是你的服务端时间同标准时间不同步,或者服务端的数据上报有延迟导致的,飘红状态下会在主机名右侧显示延迟的时间差,如果延迟的时间差居高不下并持续增长则意味着你的服务器可能停止了向服务端的数据上报。 12 | 13 | .. image:: images/host_red.png 14 | 15 | -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/ajax-loader.gif -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/alert_info_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/alert_info_32.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/alert_warning_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/alert_warning_32.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/background_b01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/background_b01.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/bg-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/bg-page.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/bullet_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/bullet_orange.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/comment-bright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/comment-bright.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/comment-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/comment-close.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/comment.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/darkmetal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/darkmetal.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/down-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/down-pressed.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/down.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/file.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/fonts/Inconsolata-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/fonts/Inconsolata-Bold.ttf -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/fonts/Inconsolata.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/fonts/Inconsolata.ttf -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/fonts/Lato-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/fonts/Lato-Bold.ttf -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/fonts/Lato-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/fonts/Lato-Regular.ttf -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/fonts/RobotoSlab-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/fonts/RobotoSlab-Bold.ttf -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/fonts/RobotoSlab-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/fonts/RobotoSlab-Regular.ttf -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/headerbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/headerbg.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/logo.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/metal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/metal.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/minus.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/navigation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/navigation.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/plus.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/print.css: -------------------------------------------------------------------------------- 1 | @media print { 2 | div.header, div.relnav, #toc { display: none; } 3 | #contentwrapper { padding: 0; margin: 0; border: none; } 4 | body { color: black; background-color: white; } 5 | div.footer { border-top: 1px solid #888; color: #888; margin-top: 1cm; } 6 | div.footer a { text-decoration: none; } 7 | } 8 | -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/theme_extras.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 3 | var 4 | toc = $('#toc').show(), 5 | items = $('#toc > ul').hide(); 6 | 7 | $('#toc h3') 8 | .click(function() { 9 | if (items.is(':visible')) { 10 | items.animate({ 11 | height: 'hide', 12 | opacity: 'hide' 13 | }, 300, function() { 14 | toc.removeClass('expandedtoc'); 15 | }); 16 | } 17 | else { 18 | items.animate({ 19 | height: 'show', 20 | opacity: 'show' 21 | }, 400); 22 | toc.addClass('expandedtoc'); 23 | } 24 | }); 25 | 26 | }); 27 | -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/up-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/up-pressed.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/up.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/watermark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/watermark.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/_static/watermark_blur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/_static/watermark_blur.png -------------------------------------------------------------------------------- /PM25-Docs/_build/html/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/_build/html/objects.inv -------------------------------------------------------------------------------- /PM25-Docs/help.rst: -------------------------------------------------------------------------------- 1 | .. PM2.5 documentation master file, created by 2 | sphinx-quickstart on Mon Jul 6 21:16:59 2015. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | 帮助 7 | ==== 8 | 9 | **1. 为什么我的主机状态当前是飘红的?** 10 | 11 | 如下图所示,出现这种情况的原因很可能是你的服务端时间同标准时间不同步,或者服务端的数据上报有延迟导致的,飘红状态下会在主机名右侧显示延迟的时间差,如果延迟的时间差居高不下并持续增长则意味着你的服务器可能停止了向服务端的数据上报。 12 | 13 | .. image:: images/host_red.png 14 | 15 | -------------------------------------------------------------------------------- /PM25-Docs/images/apple_watch_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/images/apple_watch_app.png -------------------------------------------------------------------------------- /PM25-Docs/images/bucket_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/images/bucket_create.png -------------------------------------------------------------------------------- /PM25-Docs/images/bucket_create_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/images/bucket_create_button.png -------------------------------------------------------------------------------- /PM25-Docs/images/bucket_create_mirror.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/images/bucket_create_mirror.png -------------------------------------------------------------------------------- /PM25-Docs/images/buckets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/images/buckets.png -------------------------------------------------------------------------------- /PM25-Docs/images/host_exceptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/images/host_exceptions.png -------------------------------------------------------------------------------- /PM25-Docs/images/host_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/images/host_red.png -------------------------------------------------------------------------------- /PM25-Docs/images/hosts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/images/hosts.png -------------------------------------------------------------------------------- /PM25-Docs/images/ios_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/images/ios_app.png -------------------------------------------------------------------------------- /PM25-Docs/images/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/images/login.png -------------------------------------------------------------------------------- /PM25-Docs/images/pm25_how_it_works_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/images/pm25_how_it_works_001.jpg -------------------------------------------------------------------------------- /PM25-Docs/images/pm25_how_it_works_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/images/pm25_how_it_works_002.jpg -------------------------------------------------------------------------------- /PM25-Docs/images/trigger_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/images/trigger_create.png -------------------------------------------------------------------------------- /PM25-Docs/images/trigger_create_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/images/trigger_create_button.png -------------------------------------------------------------------------------- /PM25-Docs/images/trigger_create_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/images/trigger_create_example.png -------------------------------------------------------------------------------- /PM25-Docs/images/triggers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Docs/images/triggers.png -------------------------------------------------------------------------------- /PM25-Docs/index.md: -------------------------------------------------------------------------------- 1 | Welcome to PM2.5's documentation! 2 | ================================= 3 | 4 | Contents: 5 | 6 | ``` 7 | .. toctree:: 8 | :maxdepth: 2 9 | ``` 10 | 11 | 12 | 13 | Indices and tables 14 | ================== 15 | 16 | * `genindex` 17 | * `modindex` 18 | * `search` 19 | 20 | -------------------------------------------------------------------------------- /PM25-Docs/index.rst: -------------------------------------------------------------------------------- 1 | .. PM2.5 documentation master file, created by 2 | sphinx-quickstart on Mon Jul 6 21:16:59 2015. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to PM2.5's documentation! 7 | ================================= 8 | 9 | PM2.5 = PM2 + 0.5, PM2.5 is based on PM2, and do more. PM2.5在原有基础上实现了服务的分组、监控和错误日志的查看等功能,意即在PM2的基础上多做了0.5,所以拥有PM2.5你会比之前所得到的更多,同时通过在线服务监控平台PM25.io可以查看服务各项指标和错误日志的实时数据。 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | 简介 15 | 如何安装 16 | 快速上手 17 | 进阶指南 18 | 帮助 19 | 20 | Indices and tables 21 | ================== 22 | 23 | * :ref:`genindex` 24 | * :ref:`modindex` 25 | * :ref:`search` 26 | 27 | -------------------------------------------------------------------------------- /PM25-Ext/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pm25-ext", 3 | "version": "1.0.6", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "on-finished": "2.3.0", 13 | "pmx": "^0.6.1" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /PM25-Service/configure.json: -------------------------------------------------------------------------------- 1 | { 2 | "endpoints": { 3 | "web": "https://service.pm25.io:4438", 4 | "reverse": "http://service.pm25.io:43554", 5 | "push": "http://service.pm25.io:41624" 6 | }, 7 | "ports": { 8 | "wss": "8042", 9 | "ioswss": "8055" 10 | }, 11 | "passphrase": "", 12 | "dbpath": "mongodb://mongodb.yourdomain.com:28017/pm25", 13 | "sessiondbpath": "mongodb://mongodb.yourdomain.com:28017/pm25-session", 14 | "testdbpath": "mongodb://mongodb.yourdomain.com:28017/pm25-test", 15 | "deviceproduction": "", 16 | "device": "" 17 | } 18 | -------------------------------------------------------------------------------- /PM25-Service/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PM2.5-Service", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./index" 7 | }, 8 | "dependencies": { 9 | "axon": "^2.0.1", 10 | "axon-rpc": "0.0.3", 11 | "babel": "^5.1.11", 12 | "babel-preset-stage-0": "^6.1.18", 13 | "bluebird": "^2.9.24", 14 | "connect-mongo": "^0.8.0", 15 | "cors": "^2.7.1", 16 | "express": "^4.13.3", 17 | "mongodb": "^1.4.34", 18 | "node-cache": "^3.2.1", 19 | "nssocket": "^0.5.3", 20 | "open-falcon": "^1.3.2", 21 | "socket.io": "^1.3.5", 22 | "ws": "^0.8.0" 23 | }, 24 | "devDependencies": { 25 | "assert": "^1.3.0", 26 | "babel": "^5.8.29", 27 | "pm25": "^0.143.4" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /PM25-Service/profilings/status: -------------------------------------------------------------------------------- 1 | success 2 | -------------------------------------------------------------------------------- /PM25-Service/shell/pre-deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | npm --registry=http://registry.cnpmjs.org install 5 | npm outdated --depth=0 6 | -------------------------------------------------------------------------------- /PM25-Service/src/helpers/MongoDBPool.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | 'use strict'; 3 | 4 | import Promise from 'bluebird'; 5 | import MongoDB from 'mongodb'; 6 | import MongoClient from 'mongodb'; 7 | Promise.promisifyAll(MongoDB); 8 | 9 | var config = require('../../configure'); 10 | var dbPathDefault = config.dbpath; 11 | var dbPool = {}; 12 | 13 | async function connectdb(connName = '_default', dbPath = dbPathDefault) { 14 | if(dbPool.hasOwnProperty(connName)) { 15 | return dbPool[connName]; 16 | } 17 | 18 | dbPool[connName] = await MongoDB.MongoClient.connectAsync(dbPath); 19 | dbPool[connName].close = function() {}; //保持连接不关闭 20 | return dbPool[connName]; 21 | } 22 | 23 | module.exports = connectdb; 24 | -------------------------------------------------------------------------------- /PM25-Service/test/connection.js: -------------------------------------------------------------------------------- 1 | var MongoClient = require('mongodb').MongoClient; 2 | var assert = require('assert'); 3 | var config = require('../configure'); 4 | var dbPathDefault = config.testdbpath; // Connection URL 5 | 6 | // Use connect method to connect to the Server 7 | 8 | MongoClient.connect(dbPathDefault, function(err, db) { 9 | assert.equal(null, err); 10 | console.log("Connected correctly to server"); 11 | }); 12 | -------------------------------------------------------------------------------- /PM25-Sites/docs/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 4d802ddd9be0041e5a1b8ab2e596b04d 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /PM25-Sites/docs/_images/apple_watch_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_images/apple_watch_app.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_images/bucket_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_images/bucket_create.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_images/bucket_create_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_images/bucket_create_button.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_images/bucket_create_mirror.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_images/bucket_create_mirror.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_images/buckets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_images/buckets.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_images/host_exceptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_images/host_exceptions.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_images/host_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_images/host_red.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_images/hosts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_images/hosts.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_images/ios_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_images/ios_app.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_images/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_images/login.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_images/pm25_how_it_works_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_images/pm25_how_it_works_001.jpg -------------------------------------------------------------------------------- /PM25-Sites/docs/_images/pm25_how_it_works_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_images/pm25_how_it_works_002.jpg -------------------------------------------------------------------------------- /PM25-Sites/docs/_images/trigger_create_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_images/trigger_create_button.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_images/trigger_create_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_images/trigger_create_example.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_images/triggers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_images/triggers.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_sources/help.txt: -------------------------------------------------------------------------------- 1 | .. PM2.5 documentation master file, created by 2 | sphinx-quickstart on Mon Jul 6 21:16:59 2015. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | 帮助 7 | ==== 8 | 9 | **1. 为什么我的主机状态当前是飘红的?** 10 | 11 | 如下图所示,出现这种情况的原因很可能是你的服务端时间同标准时间不同步,或者服务端的数据上报有延迟导致的,飘红状态下会在主机名右侧显示延迟的时间差,如果延迟的时间差居高不下并持续增长则意味着你的服务器可能停止了向服务端的数据上报。 12 | 13 | .. image:: images/host_red.png 14 | 15 | -------------------------------------------------------------------------------- /PM25-Sites/docs/_sources/index.txt: -------------------------------------------------------------------------------- 1 | .. PM2.5 documentation master file, created by 2 | sphinx-quickstart on Mon Jul 6 21:16:59 2015. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to PM2.5's documentation! 7 | ================================= 8 | 9 | PM2.5 = PM2 + 0.5, PM2.5 is based on PM2, and do more. PM2.5在原有基础上实现了服务的分组、监控和错误日志的查看等功能,意即在PM2的基础上多做了0.5,所以拥有PM2.5你会比之前所得到的更多,同时通过在线服务监控平台PM25.io可以查看服务各项指标和错误日志的实时数据。 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | 简介 15 | 如何安装 16 | 快速上手 17 | 进阶指南 18 | 帮助 19 | 20 | Indices and tables 21 | ================== 22 | 23 | * :ref:`genindex` 24 | * :ref:`modindex` 25 | * :ref:`search` 26 | 27 | -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/ajax-loader.gif -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/alert_info_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/alert_info_32.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/alert_warning_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/alert_warning_32.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/background_b01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/background_b01.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/bg-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/bg-page.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/bullet_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/bullet_orange.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/comment-bright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/comment-bright.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/comment-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/comment-close.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/comment.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/darkmetal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/darkmetal.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/down-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/down-pressed.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/down.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/file.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/fonts/Inconsolata-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/fonts/Inconsolata-Bold.ttf -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/fonts/Inconsolata.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/fonts/Inconsolata.ttf -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/fonts/Lato-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/fonts/Lato-Bold.ttf -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/fonts/Lato-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/fonts/Lato-Regular.ttf -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/fonts/RobotoSlab-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/fonts/RobotoSlab-Bold.ttf -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/fonts/RobotoSlab-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/fonts/RobotoSlab-Regular.ttf -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/headerbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/headerbg.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/logo.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/metal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/metal.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/minus.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/navigation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/navigation.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/plus.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/print.css: -------------------------------------------------------------------------------- 1 | @media print { 2 | div.header, div.relnav, #toc { display: none; } 3 | #contentwrapper { padding: 0; margin: 0; border: none; } 4 | body { color: black; background-color: white; } 5 | div.footer { border-top: 1px solid #888; color: #888; margin-top: 1cm; } 6 | div.footer a { text-decoration: none; } 7 | } 8 | -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/theme_extras.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 3 | var 4 | toc = $('#toc').show(), 5 | items = $('#toc > ul').hide(); 6 | 7 | $('#toc h3') 8 | .click(function() { 9 | if (items.is(':visible')) { 10 | items.animate({ 11 | height: 'hide', 12 | opacity: 'hide' 13 | }, 300, function() { 14 | toc.removeClass('expandedtoc'); 15 | }); 16 | } 17 | else { 18 | items.animate({ 19 | height: 'show', 20 | opacity: 'show' 21 | }, 400); 22 | toc.addClass('expandedtoc'); 23 | } 24 | }); 25 | 26 | }); 27 | -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/up-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/up-pressed.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/up.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/watermark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/watermark.png -------------------------------------------------------------------------------- /PM25-Sites/docs/_static/watermark_blur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/_static/watermark_blur.png -------------------------------------------------------------------------------- /PM25-Sites/docs/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/docs/objects.inv -------------------------------------------------------------------------------- /PM25-Sites/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/favicon.ico -------------------------------------------------------------------------------- /PM25-Sites/images/pm25-logo-latest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PaulGuo/PM25/8e58246b94c1ed3584d686ff40939cb6a496c6ef/PM25-Sites/images/pm25-logo-latest.png --------------------------------------------------------------------------------