This commit is contained in:
2019-01-16 09:09:54 +08:00
parent 0cc08f136d
commit b2eeb13f83
12 changed files with 29 additions and 150 deletions
+3 -3
View File
@@ -164,7 +164,7 @@ function MQTTServer(adapter) {
memwatch.on('leak', (info) => {
//console.error('Memory leak detected:\n', info);
adapter.log.info('Memory leak detected:\n', info);
var filename='/opt/iobroker/dumps/' + Date.now() + '.heapsnapshot';
var filename='/opt/yunkong2/dumps/' + Date.now() + '.heapsnapshot';
heapdump.writeSnapshot((err,filename) => {
if (err) {
console.error(err);
@@ -1074,10 +1074,10 @@ function MQTTServer(adapter) {
adapter.log.info('mem: ' + state.val + ' MB');
if (heapTest==0 || (heapTest==1 && state.val>37.5)) {
heapTest+=1;
heapdump.writeSnapshot('/opt/iobroker/' + Date.now() + '.heapsnapshot');
heapdump.writeSnapshot('/opt/yunkong2/' + Date.now() + '.heapsnapshot');
adapter.log.info('Wrote snapshot: ');
var filename='/opt/iobroker/' + Date.now() + '.heapsnapshot';
var filename='/opt/yunkong2/' + Date.now() + '.heapsnapshot';
heapdump.writeSnapshot((err,filename) => {
if (err) {
adapter.log.info('heap: ' + err);
+2 -2
View File
@@ -27,8 +27,8 @@ let appName;
function getControllerDir(isInstall) {
// Find the js-controller location
const possibilities = [
'iobroker.js-controller',
'ioBroker.js-controller',
'yunkong2.js-controller',
'yunkong2.js-controller',
];
/** @type {string} */
let controllerPath;