Linux localhost 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
Apache/2.4.41 (Ubuntu)
: 23.92.16.63 | : 172.70.230.97
Cant Read [ /etc/named.conf ]
8.1.5
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
nodejs /
api /
[ HOME SHELL ]
Name
Size
Permission
Action
assets
[ DIR ]
drwxr-xr-x
addons.html
105.72
KB
-rw-r--r--
addons.json.gz
10.95
KB
-rw-r--r--
addons.md
39.76
KB
-rw-r--r--
all.html
7.2
MB
-rw-r--r--
all.json.gz
881.44
KB
-rw-r--r--
assert.html
191.3
KB
-rw-r--r--
assert.json.gz
13
KB
-rw-r--r--
assert.md
66.51
KB
-rw-r--r--
async_context.html
84.04
KB
-rw-r--r--
async_context.json.gz
7.09
KB
-rw-r--r--
async_context.md
24.68
KB
-rw-r--r--
async_hooks.html
87.13
KB
-rw-r--r--
async_hooks.json.gz
9.82
KB
-rw-r--r--
async_hooks.md
30.48
KB
-rw-r--r--
buffer.html
479.09
KB
-rw-r--r--
buffer.json.gz
28.89
KB
-rw-r--r--
buffer.md
148.96
KB
-rw-r--r--
child_process.html
168.62
KB
-rw-r--r--
child_process.json.gz
20.9
KB
-rw-r--r--
child_process.md
70.54
KB
-rw-r--r--
cli.html
154.13
KB
-rw-r--r--
cli.json.gz
23.79
KB
-rw-r--r--
cli.md
63.8
KB
-rw-r--r--
cluster.html
90.59
KB
-rw-r--r--
cluster.json.gz
9.48
KB
-rw-r--r--
cluster.md
28.84
KB
-rw-r--r--
console.html
59.43
KB
-rw-r--r--
console.json.gz
6.07
KB
-rw-r--r--
console.md
16.5
KB
-rw-r--r--
corepack.html
22.56
KB
-rw-r--r--
corepack.json.gz
2.55
KB
-rw-r--r--
corepack.md
5.08
KB
-rw-r--r--
crypto.html
521.88
KB
-rw-r--r--
crypto.json.gz
45.72
KB
-rw-r--r--
crypto.md
193.91
KB
-rw-r--r--
debugger.html
28.15
KB
-rw-r--r--
debugger.json.gz
3.12
KB
-rw-r--r--
debugger.md
7.02
KB
-rw-r--r--
deprecations.html
197.6
KB
-rw-r--r--
deprecations.json.gz
23.7
KB
-rw-r--r--
deprecations.md
97.51
KB
-rw-r--r--
dgram.html
89.39
KB
-rw-r--r--
dgram.json.gz
10.07
KB
-rw-r--r--
dgram.md
30.76
KB
-rw-r--r--
diagnostics_channel.html
44.76
KB
-rw-r--r--
diagnostics_channel.json.gz
3.2
KB
-rw-r--r--
diagnostics_channel.md
11.09
KB
-rw-r--r--
dns.html
130.7
KB
-rw-r--r--
dns.json.gz
15.74
KB
-rw-r--r--
dns.md
52.17
KB
-rw-r--r--
documentation.html
25.04
KB
-rw-r--r--
documentation.json.gz
2.22
KB
-rw-r--r--
documentation.md
4.67
KB
-rw-r--r--
domain.html
48.47
KB
-rw-r--r--
domain.json.gz
6.2
KB
-rw-r--r--
domain.md
15.21
KB
-rw-r--r--
embedding.html
25.79
KB
-rw-r--r--
embedding.json.gz
3.01
KB
-rw-r--r--
embedding.md
6.65
KB
-rw-r--r--
errors.html
282.1
KB
-rw-r--r--
errors.json.gz
42.26
KB
-rw-r--r--
errors.md
96.75
KB
-rw-r--r--
esm.html
126.92
KB
-rw-r--r--
esm.json.gz
20.56
KB
-rw-r--r--
esm.md
58.28
KB
-rw-r--r--
events.html
225.71
KB
-rw-r--r--
events.json.gz
16.69
KB
-rw-r--r--
events.md
64.93
KB
-rw-r--r--
fs.html
628.53
KB
-rw-r--r--
fs.json.gz
66.73
KB
-rw-r--r--
fs.md
247.34
KB
-rw-r--r--
globals.html
74.86
KB
-rw-r--r--
globals.json.gz
9
KB
-rw-r--r--
globals.md
20.04
KB
-rw-r--r--
http.html
275.03
KB
-rw-r--r--
http.json.gz
35.28
KB
-rw-r--r--
http.md
106.51
KB
-rw-r--r--
http2.html
318.05
KB
-rw-r--r--
http2.json.gz
39.24
KB
-rw-r--r--
http2.md
129.92
KB
-rw-r--r--
https.html
56.48
KB
-rw-r--r--
https.json.gz
5.69
KB
-rw-r--r--
https.md
16.33
KB
-rw-r--r--
index.html
12.63
KB
-rw-r--r--
index.json
54
B
-rw-r--r--
index.md
1.97
KB
-rw-r--r--
inspector.html
34.25
KB
-rw-r--r--
inspector.json.gz
3.62
KB
-rw-r--r--
inspector.md
7.63
KB
-rw-r--r--
intl.html
31.9
KB
-rw-r--r--
intl.json.gz
3.87
KB
-rw-r--r--
intl.md
10.71
KB
-rw-r--r--
module.html
30.94
KB
-rw-r--r--
module.json.gz
2.7
KB
-rw-r--r--
module.md
5.12
KB
-rw-r--r--
modules.html
80.58
KB
-rw-r--r--
modules.json.gz
12.65
KB
-rw-r--r--
modules.md
32.97
KB
-rw-r--r--
n-api.html
395.21
KB
-rw-r--r--
n-api.json.gz
50.69
KB
-rw-r--r--
n-api.md
214.45
KB
-rw-r--r--
net.html
140.93
KB
-rw-r--r--
net.json.gz
17.64
KB
-rw-r--r--
net.md
50.96
KB
-rw-r--r--
os.html
71.85
KB
-rw-r--r--
os.json.gz
8.88
KB
-rw-r--r--
os.md
35.5
KB
-rw-r--r--
packages.html
99.12
KB
-rw-r--r--
packages.json.gz
15.18
KB
-rw-r--r--
packages.md
45.48
KB
-rw-r--r--
path.html
52.44
KB
-rw-r--r--
path.json.gz
4.9
KB
-rw-r--r--
path.md
14.91
KB
-rw-r--r--
perf_hooks.html
139.88
KB
-rw-r--r--
perf_hooks.json.gz
12.51
KB
-rw-r--r--
perf_hooks.md
42.15
KB
-rw-r--r--
permissions.html
44.6
KB
-rw-r--r--
permissions.json.gz
5.44
KB
-rw-r--r--
permissions.md
14.59
KB
-rw-r--r--
policy.html
14.21
KB
-rw-r--r--
policy.json
475
B
-rw-r--r--
policy.md
221
B
-rw-r--r--
process.html
290.1
KB
-rw-r--r--
process.json.gz
31.21
KB
-rw-r--r--
process.md
106.75
KB
-rw-r--r--
punycode.html
26.24
KB
-rw-r--r--
punycode.json.gz
2
KB
-rw-r--r--
punycode.md
4.17
KB
-rw-r--r--
querystring.html
28.24
KB
-rw-r--r--
querystring.json.gz
2.65
KB
-rw-r--r--
querystring.md
5.57
KB
-rw-r--r--
readline.html
109.24
KB
-rw-r--r--
readline.json.gz
11.9
KB
-rw-r--r--
readline.md
40.45
KB
-rw-r--r--
repl.html
68.72
KB
-rw-r--r--
repl.json.gz
10
KB
-rw-r--r--
repl.md
23.69
KB
-rw-r--r--
report.html
81.54
KB
-rw-r--r--
report.json.gz
6.39
KB
-rw-r--r--
report.md
18.83
KB
-rw-r--r--
single-executable-applications...
23.53
KB
-rw-r--r--
single-executable-applications...
2.36
KB
-rw-r--r--
single-executable-applications...
5.12
KB
-rw-r--r--
stream.html
397.04
KB
-rw-r--r--
stream.json.gz
51.16
KB
-rw-r--r--
stream.md
145.8
KB
-rw-r--r--
string_decoder.html
23.21
KB
-rw-r--r--
string_decoder.json.gz
1.54
KB
-rw-r--r--
string_decoder.md
2.96
KB
-rw-r--r--
synopsis.html
19.54
KB
-rw-r--r--
synopsis.json
2.96
KB
-rw-r--r--
synopsis.md
2.12
KB
-rw-r--r--
test.html
168.11
KB
-rw-r--r--
test.json.gz
16.62
KB
-rw-r--r--
test.md
57.47
KB
-rw-r--r--
timers.html
55.89
KB
-rw-r--r--
timers.json.gz
5.21
KB
-rw-r--r--
timers.md
15.53
KB
-rw-r--r--
tls.html
179.78
KB
-rw-r--r--
tls.json.gz
32.31
KB
-rw-r--r--
tls.md
87.96
KB
-rw-r--r--
tracing.html
34.37
KB
-rw-r--r--
tracing.json.gz
3.47
KB
-rw-r--r--
tracing.md
8.52
KB
-rw-r--r--
tty.html
36.94
KB
-rw-r--r--
tty.json.gz
3.72
KB
-rw-r--r--
tty.md
8.91
KB
-rw-r--r--
url.html
150.42
KB
-rw-r--r--
url.json.gz
15.7
KB
-rw-r--r--
url.md
53.65
KB
-rw-r--r--
util.html
285.68
KB
-rw-r--r--
util.json.gz
25.73
KB
-rw-r--r--
util.md
96.25
KB
-rw-r--r--
v8.html
111.35
KB
-rw-r--r--
v8.json.gz
11.86
KB
-rw-r--r--
v8.md
34.31
KB
-rw-r--r--
vm.html
142.53
KB
-rw-r--r--
vm.json.gz
16.81
KB
-rw-r--r--
vm.md
59.81
KB
-rw-r--r--
wasi.html
27.91
KB
-rw-r--r--
wasi.json.gz
2.86
KB
-rw-r--r--
wasi.md
6.54
KB
-rw-r--r--
webcrypto.html
152.21
KB
-rw-r--r--
webcrypto.json.gz
9.76
KB
-rw-r--r--
webcrypto.md
45.48
KB
-rw-r--r--
webstreams.html
150.7
KB
-rw-r--r--
webstreams.json.gz
9.88
KB
-rw-r--r--
webstreams.md
36.82
KB
-rw-r--r--
worker_threads.html
113.35
KB
-rw-r--r--
worker_threads.json.gz
14.43
KB
-rw-r--r--
worker_threads.md
43.13
KB
-rw-r--r--
zlib.html
108.85
KB
-rw-r--r--
zlib.json.gz
10.34
KB
-rw-r--r--
zlib.md
35.1
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : tracing.md
# Trace events <!--introduced_in=v7.7.0--> > Stability: 1 - Experimental <!-- source_link=lib/trace_events.js --> The `node:trace_events` module provides a mechanism to centralize tracing information generated by V8, Node.js core, and userspace code. Tracing can be enabled with the `--trace-event-categories` command-line flag or by using the `node:trace_events` module. The `--trace-event-categories` flag accepts a list of comma-separated category names. The available categories are: * `node`: An empty placeholder. * `node.async_hooks`: Enables capture of detailed [`async_hooks`][] trace data. The [`async_hooks`][] events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property. * `node.bootstrap`: Enables capture of Node.js bootstrap milestones. * `node.console`: Enables capture of `console.time()` and `console.count()` output. * `node.threadpoolwork.sync`: Enables capture of trace data for threadpool synchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`. * `node.threadpoolwork.async`: Enables capture of trace data for threadpool asynchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`. * `node.dns.native`: Enables capture of trace data for DNS queries. * `node.net.native`: Enables capture of trace data for network. * `node.environment`: Enables capture of Node.js Environment milestones. * `node.fs.sync`: Enables capture of trace data for file system sync methods. * `node.fs_dir.sync`: Enables capture of trace data for file system sync directory methods. * `node.fs.async`: Enables capture of trace data for file system async methods. * `node.fs_dir.async`: Enables capture of trace data for file system async directory methods. * `node.perf`: Enables capture of [Performance API][] measurements. * `node.perf.usertiming`: Enables capture of only Performance API User Timing measures and marks. * `node.perf.timerify`: Enables capture of only Performance API timerify measurements. * `node.promises.rejections`: Enables capture of trace data tracking the number of unhandled Promise rejections and handled-after-rejections. * `node.vm.script`: Enables capture of trace data for the `node:vm` module's `runInNewContext()`, `runInContext()`, and `runInThisContext()` methods. * `v8`: The [V8][] events are GC, compiling, and execution related. * `node.http`: Enables capture of trace data for http request / response. By default the `node`, `node.async_hooks`, and `v8` categories are enabled. ```bash node --trace-event-categories v8,node,node.async_hooks server.js ``` Prior versions of Node.js required the use of the `--trace-events-enabled` flag to enable trace events. This requirement has been removed. However, the `--trace-events-enabled` flag _may_ still be used and will enable the `node`, `node.async_hooks`, and `v8` trace event categories by default. ```bash node --trace-events-enabled # is equivalent to node --trace-event-categories v8,node,node.async_hooks ``` Alternatively, trace events may be enabled using the `node:trace_events` module: ```js const trace_events = require('node:trace_events'); const tracing = trace_events.createTracing({ categories: ['node.perf'] }); tracing.enable(); // Enable trace event capture for the 'node.perf' category // do work tracing.disable(); // Disable trace event capture for the 'node.perf' category ``` Running Node.js with tracing enabled will produce log files that can be opened in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) tab of Chrome. The logging file is by default called `node_trace.${rotation}.log`, where `${rotation}` is an incrementing log-rotation id. The filepath pattern can be specified with `--trace-event-file-pattern` that accepts a template string that supports `${rotation}` and `${pid}`: ```bash node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js ``` To guarantee that the log file is properly generated after signal events like `SIGINT`, `SIGTERM`, or `SIGBREAK`, make sure to have the appropriate handlers in your code, such as: ```js process.on('SIGINT', function onSigint() { console.info('Received SIGINT.'); process.exit(130); // Or applicable exit code depending on OS and signal }); ``` The tracing system uses the same time source as the one used by `process.hrtime()`. However the trace-event timestamps are expressed in microseconds, unlike `process.hrtime()` which returns nanoseconds. The features from this module are not available in [`Worker`][] threads. ## The `node:trace_events` module <!-- YAML added: v10.0.0 --> ### `Tracing` object <!-- YAML added: v10.0.0 --> The `Tracing` object is used to enable or disable tracing for sets of categories. Instances are created using the `trace_events.createTracing()` method. When created, the `Tracing` object is disabled. Calling the `tracing.enable()` method adds the categories to the set of enabled trace event categories. Calling `tracing.disable()` will remove the categories from the set of enabled trace event categories. #### `tracing.categories` <!-- YAML added: v10.0.0 --> * {string} A comma-separated list of the trace event categories covered by this `Tracing` object. #### `tracing.disable()` <!-- YAML added: v10.0.0 --> Disables this `Tracing` object. Only trace event categories _not_ covered by other enabled `Tracing` objects and _not_ specified by the `--trace-event-categories` flag will be disabled. ```js const trace_events = require('node:trace_events'); const t1 = trace_events.createTracing({ categories: ['node', 'v8'] }); const t2 = trace_events.createTracing({ categories: ['node.perf', 'node'] }); t1.enable(); t2.enable(); // Prints 'node,node.perf,v8' console.log(trace_events.getEnabledCategories()); t2.disable(); // Will only disable emission of the 'node.perf' category // Prints 'node,v8' console.log(trace_events.getEnabledCategories()); ``` #### `tracing.enable()` <!-- YAML added: v10.0.0 --> Enables this `Tracing` object for the set of categories covered by the `Tracing` object. #### `tracing.enabled` <!-- YAML added: v10.0.0 --> * {boolean} `true` only if the `Tracing` object has been enabled. ### `trace_events.createTracing(options)` <!-- YAML added: v10.0.0 --> * `options` {Object} * `categories` {string\[]} An array of trace category names. Values included in the array are coerced to a string when possible. An error will be thrown if the value cannot be coerced. * Returns: {Tracing}. Creates and returns a `Tracing` object for the given set of `categories`. ```js const trace_events = require('node:trace_events'); const categories = ['node.perf', 'node.async_hooks']; const tracing = trace_events.createTracing({ categories }); tracing.enable(); // do stuff tracing.disable(); ``` ### `trace_events.getEnabledCategories()` <!-- YAML added: v10.0.0 --> * Returns: {string} Returns a comma-separated list of all currently-enabled trace event categories. The current set of enabled trace event categories is determined by the _union_ of all currently-enabled `Tracing` objects and any categories enabled using the `--trace-event-categories` flag. Given the file `test.js` below, the command `node --trace-event-categories node.perf test.js` will print `'node.async_hooks,node.perf'` to the console. ```js const trace_events = require('node:trace_events'); const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] }); const t2 = trace_events.createTracing({ categories: ['node.perf'] }); const t3 = trace_events.createTracing({ categories: ['v8'] }); t1.enable(); t2.enable(); console.log(trace_events.getEnabledCategories()); ``` ## Examples ### Collect trace events data by inspector ```js 'use strict'; const { Session } = require('inspector'); const session = new Session(); session.connect(); function post(message, data) { return new Promise((resolve, reject) => { session.post(message, data, (err, result) => { if (err) reject(new Error(JSON.stringify(err))); else resolve(result); }); }); } async function collect() { const data = []; session.on('NodeTracing.dataCollected', (chunk) => data.push(chunk)); session.on('NodeTracing.tracingComplete', () => { // done }); const traceConfig = { includedCategories: ['v8'] }; await post('NodeTracing.start', { traceConfig }); // do something setTimeout(() => { post('NodeTracing.stop').then(() => { session.disconnect(); console.log(data); }); }, 1000); } collect(); ``` [Performance API]: perf_hooks.md [V8]: v8.md [`Worker`]: worker_threads.md#class-worker [`async_hooks`]: async_hooks.md
Close