Socket
Socket
Sign inDemoInstall

spm-agent-os

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spm-agent-os - npm Package Compare versions

Comparing version 1.30.8 to 1.30.9

test-container/Dockerfile

58

linuxAgent.js

@@ -85,3 +85,3 @@ /*

cpuLastValues['cpu'] = {idle: 0, user: 0, system: 0, irq: 0, nice: 0, iowait: 0, softirq: 0, steal: 0, total: 0}
linux.cpuStats(function (cpu) {

@@ -119,5 +119,4 @@ if (!cpu || !cpu.cpu) {

}
})
})
linux.networkStats(function (data) {

@@ -165,17 +164,38 @@ if (data) {

}
agent.addMetrics({
ts: time,
type: 'os',
name: 'osmem',
filters: '',
value: [
(vmstats.memory.used - (vmstats.memory.buffer + vmstats.memory.cache)) * 1024,
vmstats.memory.free * 1024,
vmstats.memory.cache * 1024,
vmstats.memory.buffer * 1024,
vmstat.swapd * 1024,
vmstat.si,
vmstat.so],
sct: 'OS'
})
var checkMemTotal = vmstats.memory.used + vmstats.memory.free + vmstats.memory.buffer + vmstats.memory.cache
if (checkMemTotal <= vmstats.memory.total) {
// should be equal on CentoOS 7.2
agent.addMetrics({
ts: time,
type: 'os',
name: 'osmem',
filters: '',
value: [
vmstats.memory.used * 1024,
vmstats.memory.free * 1024,
vmstats.memory.cache * 1024,
vmstats.memory.buffer * 1024,
vmstat.swapd * 1024,
vmstat.si,
vmstat.so],
sct: 'OS'
})
} else {
agent.addMetrics({
ts: time,
type: 'os',
name: 'osmem',
filters: '',
value: [
(vmstats.memory.used - (vmstats.memory.buffer + vmstats.memory.cache)) * 1024,
vmstats.memory.free * 1024,
vmstats.memory.cache * 1024,
vmstats.memory.buffer * 1024,
vmstat.swapd * 1024,
vmstat.si,
vmstat.so],
sct: 'OS'
})
}
if (vmstats.disks) {

@@ -182,0 +202,0 @@ try {

{
"name": "spm-agent-os",
"version": "1.30.8",
"version": "1.30.9",
"description": "SPM Agent for monitoring operating system metrics",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc