node-opcua-vendor-diagnostic 2.183.1 → 2.184.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -17
- package/dist/index.js.map +1 -1
- package/dist/vendor_diagnostic_nodes.d.ts +1 -0
- package/dist/vendor_diagnostic_nodes.d.ts.map +1 -0
- package/dist/vendor_diagnostic_nodes.js +43 -44
- package/dist/vendor_diagnostic_nodes.js.map +1 -1
- package/package.json +10 -9
- package/source/vendor_diagnostic_nodes.ts +7 -0
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./vendor_diagnostic_nodes.js"), exports);
|
|
1
|
+
export * from "./vendor_diagnostic_nodes.js";
|
|
18
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendor_diagnostic_nodes.d.ts","sourceRoot":"","sources":["../source/vendor_diagnostic_nodes.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AAgDnE;;;;;;;GAOG;AACH,wBAAgB,0CAA0C,CAAC,MAAM,EAAE,WAAW,QAuO7E"}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.install_optional_cpu_and_memory_usage_node = install_optional_cpu_and_memory_usage_node;
|
|
7
1
|
/* c8 ignore start */
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
// `require` does not exist in an ES module. It is kept rather than replaced by import()
|
|
4
|
+
// because import() is async and resolves against the emitted .js, neither of which is
|
|
5
|
+
// safe to assume at a call site a tool has not read. Converting one by hand is fine.
|
|
6
|
+
const require = createRequire(import.meta.url);
|
|
7
|
+
import os from "node:os";
|
|
8
|
+
import { types } from "node:util";
|
|
9
|
+
import { assert } from "node-opcua-assert";
|
|
10
|
+
import { ObjectIds } from "node-opcua-constants";
|
|
11
|
+
import { make_warningLog } from "node-opcua-debug";
|
|
12
|
+
import { ServerEngine } from "node-opcua-server";
|
|
13
|
+
import { StatusCodes } from "node-opcua-status-code";
|
|
14
|
+
import { DataType, Variant } from "node-opcua-variant";
|
|
15
|
+
const warningLog = make_warningLog("vendor_diagnostic_nodes");
|
|
16
|
+
import humanize from "humanize";
|
|
18
17
|
/**
|
|
19
18
|
|
|
20
19
|
* @param namespace
|
|
@@ -29,8 +28,8 @@ const humanize_1 = __importDefault(require("humanize"));
|
|
|
29
28
|
// bug, which is out of scope for a lint pass on dead code.
|
|
30
29
|
// biome-ignore lint/suspicious/noExplicitAny: see comment above
|
|
31
30
|
function addVariableWithHumanizeText(namespace, options) {
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
assert(options.componentOf || options.organizedBy);
|
|
32
|
+
assert(typeof options.description === "string");
|
|
34
33
|
const variable = namespace.addVariable(options);
|
|
35
34
|
// add the xxxAsText property
|
|
36
35
|
namespace.addVariable({
|
|
@@ -42,7 +41,7 @@ function addVariableWithHumanizeText(namespace, options) {
|
|
|
42
41
|
value: {
|
|
43
42
|
get() {
|
|
44
43
|
const v = options.value.get();
|
|
45
|
-
return new
|
|
44
|
+
return new Variant({ dataType: DataType.String, value: humanize.filesize(v.value) });
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
47
|
});
|
|
@@ -55,16 +54,16 @@ function addVariableWithHumanizeText(namespace, options) {
|
|
|
55
54
|
* @param server {OPCUAServer}
|
|
56
55
|
*
|
|
57
56
|
*/
|
|
58
|
-
function install_optional_cpu_and_memory_usage_node(server) {
|
|
57
|
+
export function install_optional_cpu_and_memory_usage_node(server) {
|
|
59
58
|
const engine = server.engine;
|
|
60
|
-
|
|
59
|
+
assert(engine instanceof ServerEngine);
|
|
61
60
|
let usage;
|
|
62
61
|
try {
|
|
63
62
|
const usage_module = "usage"; // we use a variable here to prevent error in webpack
|
|
64
63
|
usage = require(usage_module); // a warning will be generated here with webpack as the module name is not a litteral
|
|
65
64
|
}
|
|
66
65
|
catch (err) {
|
|
67
|
-
if (
|
|
66
|
+
if (types.isNativeError(err)) {
|
|
68
67
|
warningLog("err", err.message);
|
|
69
68
|
}
|
|
70
69
|
usage = null;
|
|
@@ -75,7 +74,7 @@ function install_optional_cpu_and_memory_usage_node(server) {
|
|
|
75
74
|
throw new Error("engine.addressSpace must be initialized");
|
|
76
75
|
}
|
|
77
76
|
const namespace = addressSpace.getOwnNamespace();
|
|
78
|
-
const vendorServerInfo = addressSpace.findNode(
|
|
77
|
+
const vendorServerInfo = addressSpace.findNode(ObjectIds.Server_VendorServerInfo);
|
|
79
78
|
if (!vendorServerInfo) {
|
|
80
79
|
throw new Error("Server_VendorServerInfo node must exist in the address space");
|
|
81
80
|
}
|
|
@@ -86,7 +85,7 @@ function install_optional_cpu_and_memory_usage_node(server) {
|
|
|
86
85
|
setInterval(() => {
|
|
87
86
|
usage.lookup(pid, options, (err, result) => {
|
|
88
87
|
usage_result = result;
|
|
89
|
-
warningLog("result Used Memory: ",
|
|
88
|
+
warningLog("result Used Memory: ", humanize.filesize(result.memory), " CPU ", Math.round(result.cpu), " %");
|
|
90
89
|
if (err) {
|
|
91
90
|
warningLog("err ", err);
|
|
92
91
|
}
|
|
@@ -95,32 +94,32 @@ function install_optional_cpu_and_memory_usage_node(server) {
|
|
|
95
94
|
namespace.addVariable({
|
|
96
95
|
componentOf: vendorServerInfo,
|
|
97
96
|
browseName: "CPUUsage",
|
|
98
|
-
dataType:
|
|
97
|
+
dataType: DataType.Double,
|
|
99
98
|
description: "Current CPU usage of the server process",
|
|
100
99
|
minimumSamplingInterval: 1000,
|
|
101
100
|
nodeId: "s=CPUUsage",
|
|
102
101
|
value: {
|
|
103
102
|
get: () => {
|
|
104
103
|
if (!usage_result) {
|
|
105
|
-
return
|
|
104
|
+
return StatusCodes.BadResourceUnavailable;
|
|
106
105
|
}
|
|
107
|
-
return new
|
|
106
|
+
return new Variant({ dataType: DataType.Double, value: Math.round(usage_result.cpu) });
|
|
108
107
|
}
|
|
109
108
|
}
|
|
110
109
|
});
|
|
111
110
|
addVariableWithHumanizeText(namespace, {
|
|
112
111
|
componentOf: vendorServerInfo,
|
|
113
112
|
browseName: "MemoryUsage",
|
|
114
|
-
dataType:
|
|
113
|
+
dataType: DataType.UInt32,
|
|
115
114
|
description: "Current memory usage of the server process",
|
|
116
115
|
minimumSamplingInterval: 1000,
|
|
117
116
|
nodeId: "s=MemoryUsage",
|
|
118
117
|
value: {
|
|
119
118
|
get: () => {
|
|
120
119
|
if (!usage_result) {
|
|
121
|
-
return
|
|
120
|
+
return StatusCodes.BadResourceUnavailable;
|
|
122
121
|
}
|
|
123
|
-
return new
|
|
122
|
+
return new Variant({ dataType: DataType.UInt32, value: usage_result.memory });
|
|
124
123
|
}
|
|
125
124
|
}
|
|
126
125
|
});
|
|
@@ -131,14 +130,14 @@ function install_optional_cpu_and_memory_usage_node(server) {
|
|
|
131
130
|
namespace.addVariable({
|
|
132
131
|
componentOf: vendorServerInfo,
|
|
133
132
|
browseName: "PercentageMemoryUsed",
|
|
134
|
-
dataType:
|
|
133
|
+
dataType: DataType.Double,
|
|
135
134
|
description: "% of memory used by the server",
|
|
136
135
|
minimumSamplingInterval: 1000,
|
|
137
136
|
nodeId: "s=PercentageMemoryUsed",
|
|
138
137
|
value: {
|
|
139
138
|
get() {
|
|
140
|
-
const percent_used = Math.round(((
|
|
141
|
-
return new
|
|
139
|
+
const percent_used = Math.round(((os.totalmem() - os.freemem()) / os.totalmem()) * 100);
|
|
140
|
+
return new Variant({ dataType: DataType.Double, value: percent_used });
|
|
142
141
|
}
|
|
143
142
|
}
|
|
144
143
|
});
|
|
@@ -146,14 +145,14 @@ function install_optional_cpu_and_memory_usage_node(server) {
|
|
|
146
145
|
componentOf: vendorServerInfo,
|
|
147
146
|
accessLevel: "CurrentRead",
|
|
148
147
|
browseName: "SystemMemoryTotal",
|
|
149
|
-
dataType:
|
|
148
|
+
dataType: DataType.UInt64,
|
|
150
149
|
description: "Total Memory usage of the server",
|
|
151
150
|
minimumSamplingInterval: 1000,
|
|
152
151
|
nodeId: "s=SystemMemoryTotal",
|
|
153
152
|
value: {
|
|
154
153
|
get() {
|
|
155
|
-
const memory =
|
|
156
|
-
return new
|
|
154
|
+
const memory = os.totalmem();
|
|
155
|
+
return new Variant({ dataType: DataType.UInt64, value: memory });
|
|
157
156
|
}
|
|
158
157
|
}
|
|
159
158
|
});
|
|
@@ -167,8 +166,8 @@ function install_optional_cpu_and_memory_usage_node(server) {
|
|
|
167
166
|
nodeId: "s=SystemMemoryFree",
|
|
168
167
|
value: {
|
|
169
168
|
get() {
|
|
170
|
-
const memory =
|
|
171
|
-
return new
|
|
169
|
+
const memory = os.freemem();
|
|
170
|
+
return new Variant({ dataType: DataType.UInt64, value: memory });
|
|
172
171
|
}
|
|
173
172
|
}
|
|
174
173
|
});
|
|
@@ -182,7 +181,7 @@ function install_optional_cpu_and_memory_usage_node(server) {
|
|
|
182
181
|
nodeId: "s=NumberOfCPUs",
|
|
183
182
|
value: {
|
|
184
183
|
get() {
|
|
185
|
-
return new
|
|
184
|
+
return new Variant({ dataType: DataType.UInt32, value: os.cpus().length });
|
|
186
185
|
}
|
|
187
186
|
}
|
|
188
187
|
});
|
|
@@ -196,7 +195,7 @@ function install_optional_cpu_and_memory_usage_node(server) {
|
|
|
196
195
|
nodeId: "s=ServerArchitecture",
|
|
197
196
|
value: {
|
|
198
197
|
get() {
|
|
199
|
-
return new
|
|
198
|
+
return new Variant({ dataType: DataType.String, value: os.type() });
|
|
200
199
|
}
|
|
201
200
|
}
|
|
202
201
|
});
|
|
@@ -210,7 +209,7 @@ function install_optional_cpu_and_memory_usage_node(server) {
|
|
|
210
209
|
nodeId: "s=BytesWritten",
|
|
211
210
|
value: {
|
|
212
211
|
get() {
|
|
213
|
-
return new
|
|
212
|
+
return new Variant({ dataType: DataType.UInt64, value: server.bytesWritten });
|
|
214
213
|
}
|
|
215
214
|
}
|
|
216
215
|
});
|
|
@@ -224,7 +223,7 @@ function install_optional_cpu_and_memory_usage_node(server) {
|
|
|
224
223
|
nodeId: "s=BytesRead",
|
|
225
224
|
value: {
|
|
226
225
|
get() {
|
|
227
|
-
return new
|
|
226
|
+
return new Variant({ dataType: DataType.UInt64, value: server.bytesRead });
|
|
228
227
|
}
|
|
229
228
|
}
|
|
230
229
|
});
|
|
@@ -238,7 +237,7 @@ function install_optional_cpu_and_memory_usage_node(server) {
|
|
|
238
237
|
nodeId: "s=TransactionsCount",
|
|
239
238
|
value: {
|
|
240
239
|
get() {
|
|
241
|
-
return new
|
|
240
|
+
return new Variant({ dataType: DataType.UInt32, value: server.transactionsCount });
|
|
242
241
|
}
|
|
243
242
|
}
|
|
244
243
|
});
|
|
@@ -252,7 +251,7 @@ function install_optional_cpu_and_memory_usage_node(server) {
|
|
|
252
251
|
nodeId: "s=ConnectionCount",
|
|
253
252
|
value: {
|
|
254
253
|
get() {
|
|
255
|
-
return new
|
|
254
|
+
return new Variant({ dataType: DataType.String, value: humanize.filesize(server.currentChannelCount) });
|
|
256
255
|
}
|
|
257
256
|
}
|
|
258
257
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vendor_diagnostic_nodes.js","sourceRoot":"","sources":["../source/vendor_diagnostic_nodes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vendor_diagnostic_nodes.js","sourceRoot":"","sources":["../source/vendor_diagnostic_nodes.ts"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,wFAAwF;AACxF,sFAAsF;AACtF,qFAAqF;AACrF,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,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AAE,IAAI;QAC7B,MAAM,EAAE,qBAAqB;QAC7B,KAAK,EAAE;YACH,GAAG;gBACC,OAAO,IAAI,OAAO,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,iBAAiB,EAAE,CAAC,CAAC;YACvF,CAAC;SACJ;KACJ,CAAC,CAAC;IAEH,SAAS,CAAC,WAAW,CAAC;QAClB,WAAW,EAAE,gBAAgB;QAE7B,WAAW,EAAE,aAAa;QAC1B,UAAU,EAAE,kBAAkB;QAC9B,QAAQ,EAAE,QAAQ;QAClB,WAAW,EAAE,8BAA8B;QAC3C,uBAAuB,EAAE,IAAI;QAC7B,MAAM,EAAE,mBAAmB;QAC3B,KAAK,EAAE;YACH,GAAG;gBACC,OAAO,IAAI,OAAO,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC;YAC5G,CAAC;SACJ;KACJ,CAAC,CAAC;AACP,CAAC;AACD,oBAAoB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-vendor-diagnostic",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "2.184.0",
|
|
4
5
|
"description": "pure nodejs OPCUA SDK - module vendor-diagnostic",
|
|
5
6
|
"main": "./dist/index.js",
|
|
6
7
|
"types": "./dist/index.d.ts",
|
|
@@ -14,13 +15,13 @@
|
|
|
14
15
|
},
|
|
15
16
|
"dependencies": {
|
|
16
17
|
"humanize": "0.0.9",
|
|
17
|
-
"node-opcua-address-space": "2.
|
|
18
|
-
"node-opcua-assert": "2.
|
|
19
|
-
"node-opcua-constants": "2.
|
|
20
|
-
"node-opcua-debug": "2.
|
|
21
|
-
"node-opcua-server": "2.
|
|
22
|
-
"node-opcua-status-code": "2.
|
|
23
|
-
"node-opcua-variant": "2.
|
|
18
|
+
"node-opcua-address-space": "2.184.0",
|
|
19
|
+
"node-opcua-assert": "2.184.0",
|
|
20
|
+
"node-opcua-constants": "2.184.0",
|
|
21
|
+
"node-opcua-debug": "2.184.0",
|
|
22
|
+
"node-opcua-server": "2.184.0",
|
|
23
|
+
"node-opcua-status-code": "2.184.0",
|
|
24
|
+
"node-opcua-variant": "2.184.0"
|
|
24
25
|
},
|
|
25
26
|
"author": "Etienne Rossignon",
|
|
26
27
|
"license": "MIT",
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
"internet of things"
|
|
38
39
|
],
|
|
39
40
|
"homepage": "http://node-opcua.github.io/",
|
|
40
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "441a5c63e3a4202eb8de8597acac77a3a49248b7",
|
|
41
42
|
"files": [
|
|
42
43
|
"dist",
|
|
43
44
|
"source"
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
/* c8 ignore start */
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
|
|
4
|
+
// `require` does not exist in an ES module. It is kept rather than replaced by import()
|
|
5
|
+
// because import() is async and resolves against the emitted .js, neither of which is
|
|
6
|
+
// safe to assume at a call site a tool has not read. Converting one by hand is fine.
|
|
7
|
+
const require = createRequire(import.meta.url);
|
|
8
|
+
|
|
2
9
|
import os from "node:os";
|
|
3
10
|
|
|
4
11
|
import { types } from "node:util";
|