node全局变量process属性值(mac环境)

 

任意新建一个js文件,只需一行代码:

console.dir(process);

保存该文件后执行,即可得到process变量的属性值列表:

  1 {
  2     title: 'node',
  3     version: 'v0.10.30',
  4     moduleLoadList: ['Binding evals',
  5         'Binding natives',
  6         'NativeModule events',
  7         'NativeModule buffer',
  8         'Binding buffer',
  9         'NativeModule assert',
 10         'NativeModule util',
 11         'NativeModule path',
 12         'NativeModule module',
 13         'NativeModule fs',
 14         'Binding fs',
 15         'Binding constants',
 16         'NativeModule stream',
 17         'NativeModule _stream_readable',
 18         'NativeModule _stream_writable',
 19         'NativeModule _stream_duplex',
 20         'NativeModule _stream_transform',
 21         'NativeModule _stream_passthrough',
 22         'NativeModule console',
 23         'Binding tty_wrap',
 24         'NativeModule tty',
 25         'NativeModule net',
 26         'NativeModule timers',
 27         'Binding timer_wrap',
 28         'NativeModule _linklist',
 29         'Binding cares_wrap',
 30         'Binding signal_wrap'
 31     ],
 32     versions: {
 33         http_parser: '1.0',
 34         node: '0.10.30',
 35         v8: '3.14.5.9',
 36         ares: '1.9.0-DEV',
 37         uv: '0.10.28',
 38         zlib: '1.2.3',
 39         modules: '11',
 40         openssl: '1.0.1h'
 41     },
 42     arch: 'x64',
 43     platform: 'darwin',
 44     argv: ['node', '/Users/baidu/github/test/b.js'],
 45     execArgv: [],
 46     env: {
 47         MANPATH: '/Users/baidu/.nvm/v0.10.30/share/man:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/man:/usr/local/share/man:/usr/share/man:/opt/X11/share/man:/Applications/Xcode.app/Contents/Developer/usr/share/man:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man',
 48         TERM_PROGRAM: 'Apple_Terminal',
 49         TERM: 'xterm-256color',
 50         SHELL: '/bin/bash',
 51         TMPDIR: '/var/folders/x4/ph44fxq90_99lq3wb24b11sw0000gn/T/',
 52         NVM_PATH: '/Users/baidu/.nvm/v0.10.30/lib/node',
 53         Apple_PubSub_Socket_Render: '/private/tmp/com.apple.launchd.OV6WFhpAzS/Render',
 54         TERM_PROGRAM_VERSION: '343.6',
 55         TERM_SESSION_ID: 'E3666AE1-2E72-484B-978A-8D319AE91FA7',
 56         SVN_EDITOR: 'sub',
 57         NVM_DIR: '/Users/baidu/.nvm',
 58         USER: 'baidu',
 59         SSH_AUTH_SOCK: '/private/tmp/com.apple.launchd.6RgvKm8VMV/Listeners',
 60         __CF_USER_TEXT_ENCODING: '0x1F5:0x19:0x34',
 61         MAVEN_HOME: '/usr/local/Cellar/maven/3.2.2/libexec',
 62         PATH: '/Users/baidu/.nvm/v0.10.30/bin:/Users/baidu/Documents/myDocument/fcinst/bin:/Applications/MAMP/bin/php/php5.5.14/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/bin:/usr/local/fcinst/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin',
 63         NVM_NODEJS_ORG_MIRROR: 'http://nodejs.org/dist',
 64         PWD: '/Users/baidu/github/test',
 65         JAVA_HOME: '/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home',
 66         LANG: 'zh_CN.UTF-8',
 67         NODE_PATH: '/Users/baidu/.nvm/v0.10.30/lib/node_modules',
 68         XPC_FLAGS: '0x0',
 69         XPC_SERVICE_NAME: '0',
 70         HOME: '/Users/baidu',
 71         SHLVL: '1',
 72         LOGNAME: 'baidu',
 73         MAVEN: '/usr/local/Cellar/maven/3.2.2/libexec/bin',
 74         CLASSPATH: ':/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/lib/tools.jar',
 75         NVM_BIN: '/Users/baidu/.nvm/v0.10.30/bin',
 76         DISPLAY: '/private/tmp/com.apple.launchd.SVvs5bqsWe/org.macosforge.xquartz:0',
 77         SECURITYSESSIONID: '186a5',
 78         _: '/Users/baidu/.nvm/v0.10.30/bin/node',
 79         OLDPWD: '/Users/baidu/github'
 80     },
 81     pid: 2719,
 82     features: {
 83         debug: false,
 84         uv: true,
 85         ipv6: true,
 86         tls_npn: true,
 87         tls_sni: true,
 88         tls: true
 89     },
 90     _needImmediateCallback: false,
 91     execPath: '/Users/baidu/.nvm/v0.10.30/bin/node',
 92     debugPort: 5858,
 93     _getActiveRequests: [Function],
 94     _getActiveHandles: [Function],
 95     _needTickCallback: [Function],
 96     reallyExit: [Function],
 97     abort: [Function],
 98     chdir: [Function],
 99     cwd: [Function],
100     umask: [Function],
101     getuid: [Function],
102     setuid: [Function],
103     setgid: [Function],
104     getgid: [Function],
105     getgroups: [Function],
106     setgroups: [Function],
107     initgroups: [Function],
108     _kill: [Function],
109     _debugProcess: [Function],
110     _debugPause: [Function],
111     _debugEnd: [Function],
112     hrtime: [Function],
113     dlopen: [Function],
114     uptime: [Function],
115     memoryUsage: [Function],
116     binding: [Function],
117     _usingDomains: [Function],
118     _tickInfoBox: {
119         '0': 0,
120         '1': 0,
121         '2': 0
122     },
123     _events: {
124         SIGWINCH: [Function]
125     },
126     domain: null,
127     _maxListeners: 10,
128     EventEmitter: {
129         [Function: EventEmitter] listenerCount: [Function]
130     },
131     _fatalException: [Function],
132     _exiting: false,
133     assert: [Function],
134     config: {
135         target_defaults: {
136             cflags: [],
137             default_configuration: 'Release',
138             defines: [],
139             include_dirs: [],
140             libraries: []
141         },
142         variables: {
143             clang: 1,
144             host_arch: 'x64',
145             node_install_npm: true,
146             node_prefix: '/',
147             node_shared_cares: false,
148             node_shared_http_parser: false,
149             node_shared_libuv: false,
150             node_shared_openssl: false,
151             node_shared_v8: false,
152             node_shared_zlib: false,
153             node_tag: '',
154             node_unsafe_optimizations: 0,
155             node_use_dtrace: true,
156             node_use_etw: false,
157             node_use_openssl: true,
158             node_use_perfctr: false,
159             python: '/usr/bin/python',
160             target_arch: 'x64',
161             v8_enable_gdbjit: 0,
162             v8_no_strict_aliasing: 1,
163             v8_use_snapshot: false,
164             want_separate_host_toolset: 0
165         }
166     },
167     nextTick: [Function: nextTick],
168     _currentTickHandler: [Function: _nextTick],
169     _nextDomainTick: [Function: _nextDomainTick],
170     _tickCallback: [Function: _tickCallback],
171     _tickDomainCallback: [Function: _tickDomainCallback],
172     _tickFromSpinner: [Function: _tickFromSpinner],
173     maxTickDepth: 1000,
174     stdout: [Getter],
175     stderr: [Getter],
176     stdin: [Getter],
177     openStdin: [Function],
178     exit: [Function],
179     kill: [Function],
180     addListener: [Function],
181     on: [Function],
182     removeListener: [Function],
183     mainModule: {
184         id: '.',
185         exports: {},
186         parent: null,
187         filename: '/Users/baidu/github/test/b.js',
188         loaded: false,
189         children: [],
190         paths: ['/Users/baidu/github/test/node_modules',
191             '/Users/baidu/github/node_modules',
192             '/Users/baidu/node_modules',
193             '/Users/node_modules',
194             '/node_modules'
195         ]
196     }
197 }

 

posted on 2015-03-08 10:56  wenber  阅读(1938)  评论(0编辑  收藏  举报

导航