You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The CPU usage spikes to around 80-90%, which is quite unusual. Even only call a small function
Using almaLinux, on a VPS (kvm, amd64, solusVM)
Environment (please complete the following information):
systeminformation package version: 5.21.24
OS: AlmaLinux8.2 and debian10
Hardware: KVM VPS on solusVM
Bun.sh version: 1.0.25
importosfrom'os';import{currentLoad,cpu,networkStats,fsSize,osInfo,mem}from"systeminformation";exportconstdataCollector=async()=>{letnodeData: any={};nodeData.loadavg=os.loadavg();nodeData.uptime=os.uptime();nodeData.platform=os.platform();const[cpuData,currentLoadData,memData,osInfoData,networkStatsData,fsSizeData,]=awaitPromise.all([cpu(),currentLoad(),mem(),osInfo(),networkStats(),fsSize(),]);nodeData.cpu={cores: cpuData.cores,speedMax: cpuData.speedMax,speedMin: cpuData.speedMin,usage: Math.round(currentLoadData.currentLoad),};nodeData.mem={used: memData.active,total: memData.total,swap: {used: memData.swapused,total: memData.swaptotal,},};nodeData.oslogo=osInfoData.logofile;nodeData.network={rx: networkStatsData[0].rx_bytes,tx: networkStatsData[0].tx_bytes,rx_current: Math.round(networkStatsData[0].rx_sec)||0,tx_current: Math.round(networkStatsData[0].tx_sec)||0,};lettotalSize=0;letusedSize=0;for(constfsoffsSizeData){if(fs.type!=='udev'&&fs.type!=='tmpfs'&&fs.type!=='overlay'&&fs.type!=='devtmpfs'&&fs.type!=='efivarfs'){totalSize+=fs.size;usedSize+=fs.used;}}nodeData.fs={total: totalSize,used: usedSize,};returnJSON.stringify(nodeData);}letisDataCollectionInProgress=false;consttransmitter=setInterval(()=>{if(!isDataCollectionInProgress){// Only start collection if not already in progressisDataCollectionInProgress=true;(async()=>{try{constdata=awaitdataCollector();console.log(data)}finally{isDataCollectionInProgress=false;// Signal completion}})();}},1000);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Describe the bug
The CPU usage spikes to around 80-90%, which is quite unusual. Even only call a small function
Using almaLinux, on a VPS (kvm, amd64, solusVM)
Environment (please complete the following information):
Beta Was this translation helpful? Give feedback.
All reactions