v2
xiaojunnuo 2025-01-02 17:48:54 +08:00
parent 405591c5d0
commit ec342708b2
2 changed files with 4 additions and 1 deletions

View File

@ -267,6 +267,7 @@ cert.jksjks格式证书文件java服务器使用
let oldCert: CertReader | undefined = undefined;
try {
this.logger.info("读取上次证书");
oldCert = await this.readLastCert();
} catch (e) {
this.logger.warn("读取cert失败", e);
@ -304,6 +305,7 @@ cert.jksjks格式证书文件java服务器使用
async readLastCert(): Promise<CertReader | undefined> {
const cert = this.lastStatus?.status?.output?.cert;
if (cert == null) {
this.logger.info("没有找到上次的证书,lastStatus:", JSON.stringify(this.lastStatus?.status));
return undefined;
}
return new CertReader(cert);

View File

@ -45,7 +45,8 @@ export class AutoZPrint {
return (bytes / 1024 / 1024).toFixed(2) + ' MB';
}
setInterval(() => {
logger.info(`heapUsed: ${format(process.memoryUsage().heapUsed)}`);
const mu = process.memoryUsage();
logger.info(`rss:${format(mu.rss)},heapUsed: ${format(mu.heapUsed)},heapTotal: ${format(mu.heapTotal)},external: ${format(mu.external)}`);
}, 60000);
}