Skip to content

Instantly share code, notes, and snippets.

@Unitech
Created May 9, 2019 06:05
Show Gist options
  • Save Unitech/ae4da144c6387459fcaf19da5cea0f7a to your computer and use it in GitHub Desktop.
Save Unitech/ae4da144c6387459fcaf19da5cea0f7a to your computer and use it in GitHub Desktop.
{
baseboard: {
manufacturer: 'Apple Inc.',
model: 'MacBookPro14,3',
version: '1.0'
},
cpu: {
brand: 'Intel®',
model: 'Core™ i7-7700HQ',
speed: '2.80',
cores: 8,
physicalCores: 4,
usage: '9.9',
temperature: -1
},
mem: {
total: '16384.00',
free: '410.98',
active: '6809.57',
available: '9574.43'
},
os: {
platform: 'darwin',
distro: 'Mac OS X',
release: '10.13.6',
codename: 'macOS High Sierra',
kernel: '17.7.0',
arch: 'x64'
},
fd: { opened: null },
storage: {
io: { read: 1.093, write: 0.128 },
physical_disks: [
{
device: null,
type: null,
name: null,
interfaceType: null,
vendor: null
},
{
device: 'disk0',
type: 'NVMe',
name: 'APPLE SSD SM0256L',
interfaceType: 'PCIe x4',
vendor: ''
}
],
filesystems: [
{
fs: '/dev/disk1s1',
type: 'HFS',
size: 250685575168,
used: 226362068992,
use: 90.3,
mount: '/'
},
{
fs: '/dev/disk1s4',
type: 'HFS',
size: 250685575168,
used: 4295065600,
use: 1.71,
mount: '/private/var/vm'
}
]
},
network: {
latency: 23.151,
tx_5: 0,
rx_5: 0.001,
rx_errors_60: 0,
tx_errors_60: 0,
tx_dropped_60: 0,
rx_dropped_60: 0
},
containers: [],
processes: {
cpu_sorted: [
{
pid: 22157,
name: 'Transmission',
cmd: '/Applications/Transmission.app/Contents/MacOS/Transmission',
ppid: 1,
uid: 501,
cpu: 10.1,
memory: 0.6
},
{
pid: 170,
name: 'WindowServer',
cmd: '/System/Library/PrivateFrameworks/SkyLight.framework/Resources/WindowServer ' +
'-daemon',
ppid: 1,
uid: 88,
cpu: 5.8,
memory: 0.9
},
{
pid: 50966,
name: 'node',
cmd: '/Users/alex/.nvm/versions/node/v12.1.0/bin/node ' +
'/Users/alex/keymetrics/pm2/lib/Sysinfo/SystemInfo.js',
ppid: 24372,
uid: 501,
cpu: 3.4,
memory: 0.3
},
{
pid: 279,
name: 'trustd',
cmd: '/usr/libexec/trustd --agent',
ppid: 1,
uid: 501,
cpu: 3,
memory: 0.1
},
{
pid: 98,
name: 'bluetoothd',
cmd: '/usr/sbin/bluetoothd',
ppid: 1,
uid: 0,
cpu: 2.8,
memory: 0.1
}
],
mem_sorted: [
{
pid: 382,
name: 'Google Chrome',
cmd: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
ppid: 1,
uid: 501,
cpu: 0.4,
memory: 5.9
},
{
pid: 7479,
name: 'Google Chrome Helper',
cmd: '/Applications/Google ' +
'Chrome.app/Contents/Versions/73.0.3683.103/Google Chrome ' +
'Helper.app/Contents/MacOS/Google Chrome Helper --type=renderer ' +
'--field-trial-handle=0,9136480832695578819,5461809369577728553,131072 ' +
'--service-pipe-token=16209622059334620547 --lang=en-US ' +
'--enable-offline-auto-reload ' +
'--enable-offline-auto-reload-visible-only --num-raster-threads=4 ' +
'--enable-zero-copy --enable-gpu-memory-buffer-compositor-resources ' +
'--enable-main-frame-before-activation ' +
'--service-request-channel-token=16209622059334620547 ' +
'--renderer-client-id=13105 --no-v8-untrusted-code-mitigations ' +
'--seatbelt-client=179',
ppid: 382,
uid: 501,
cpu: 0,
memory: 3.4
},
{
pid: 33679,
name: 'Google Chrome Helper',
cmd: '/Applications/Google ' +
'Chrome.app/Contents/Versions/73.0.3683.103/Google Chrome ' +
'Helper.app/Contents/MacOS/Google Chrome Helper --type=renderer ' +
'--field-trial-handle=0,9136480832695578819,5461809369577728553,131072 ' +
'--service-pipe-token=11338559899186691077 --lang=en-US ' +
'--enable-offline-auto-reload ' +
'--enable-offline-auto-reload-visible-only --num-raster-threads=4 ' +
'--enable-zero-copy --enable-gpu-memory-buffer-compositor-resources ' +
'--enable-main-frame-before-activation ' +
'--service-request-channel-token=11338559899186691077 ' +
'--renderer-client-id=13350 --no-v8-untrusted-code-mitigations ' +
'--seatbelt-client=277',
ppid: 382,
uid: 501,
cpu: 0,
memory: 2
},
{
pid: 424,
name: 'Google Chrome Helper',
cmd: '/Applications/Google ' +
'Chrome.app/Contents/Versions/73.0.3683.103/Google Chrome ' +
'Helper.app/Contents/MacOS/Google Chrome Helper --type=gpu-process ' +
'--field-trial-handle=0,9136480832695578819,5461809369577728553,131072 ' +
'--gpu-preferences=KAAAAAAAAACAAAAAAQAAAAAAAAAAAGAAAAAAAAAAAAAIAAAAAAAAADgBAAAmAAAAMAEAAAAAAAA4AQAAAAAAAEABAAAAAAAASAEAAAAAAABQAQAAAAAAAFgBAAAAAAAAYAEAAAAAAABoAQAAAAAAAHABAAAAAAAAeAEAAAAAAACAAQAAAAAAAIgBAAAAAAAAkAEAAAAAAACYAQAAAAAAAKABAAAAAAAAqAEAAAAAAACwAQAAAAAAALgBAAAAAAAAwAEAAAAAAADIAQAAAAAAANABAAAAAAAA2AEAAAAAAADgAQAAAAAAAOgBAAAAAAAA8AEAAAAAAAD4AQAAAAAAAAACAAAAAAAACAIAAAAAAAAQAgAAAAAAABgCAAAAAAAAIAIAAAAAAAAoAgAAAAAAADACAAAAAAAAOAIAAAAAAABAAgAAAAAAAEgCAAAAAAAAUAIAAAAAAABYAgAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAGAAAAEAAAAAAAAAAAAAAABwAAABAAAAAAAAAAAAAAAAgAAAAQAAAAAAAAAAAAAAAKAAAAEAAAAAAAAAAAAAAACwAAABAAAAAAAAAAAAAAAA0AAAAQAAAAAAAAAAAAAAAOAAAAEAAAAAAAAAABAAAAAAAAABAAAAAAAAAAAQAAAAYAAAAQAAAAAAAAAAEAAAAHAAAAEAAAAAAAAAABAAAACAAAABAAAAAAAAAAAQAAAAoAAAAQAAAAAAAAAAEAAAALAAAAEAAAAAAAAAABAAAADQAAABAAAAAAAAAAAQAAAA4AAAAQAAAAAAAAAAQAAAAAAAAAEAAAAAAAAAAEAAAABgAAABAAAAAAAAAABAAAAAcAAAAQAAAAAAAAAAQAAAAIAAAAEAAAAAAAAAAEAAAACgAAABAAAAAAAAAABAAAAAsAAAAQAAAAAAAAAAQAAAANAAAAEAAAAAAAAAAEAAAADgAAABAAAAAAAAAABgAAAAAAAAAQAAAAAAAAAAYAAAAGAAAAEAAAAAAAAAAGAAAACAAAABAAAAAAAAAABgAAAAoAAAAQAAAAAAAAAAYAAAALAAAAEAAAAAAAAAAGAAAADQAAABAAAAAAAAAABgAAAA4AAAAQAAAAAAAAAAcAAAAAAAAAEAAAAAAAAAAHAAAABgAAABAAAAAAAAAABwAAAAgAAAAQAAAAAAAAAAcAAAAKAAAAEAAAAAAAAAAHAAAACwAAABAAAAAAAAAABwAAAA0AAAAQAAAAAAAAAAcAAAAOAAAA ' +
'--service-request-channel-token=1942356768032448270',
ppid: 382,
uid: 501,
cpu: 0,
memory: 1.9
},
{
pid: 49664,
name: 'Google Chrome Helper',
cmd: '/Applications/Google ' +
'Chrome.app/Contents/Versions/73.0.3683.103/Google Chrome ' +
'Helper.app/Contents/MacOS/Google Chrome Helper --type=renderer ' +
'--field-trial-handle=0,9136480832695578819,5461809369577728553,131072 ' +
'--service-pipe-token=6358645371807348289 --lang=en-US ' +
'--enable-offline-auto-reload ' +
'--enable-offline-auto-reload-visible-only --num-raster-threads=4 ' +
'--enable-zero-copy --enable-gpu-memory-buffer-compositor-resources ' +
'--enable-main-frame-before-activation ' +
'--service-request-channel-token=6358645371807348289 ' +
'--renderer-client-id=12567 --no-v8-untrusted-code-mitigations ' +
'--seatbelt-client=114',
ppid: 382,
uid: 501,
cpu: 0,
memory: 1.8
}
]
},
services: {
running: [],
stopped: [ { name: '*', running: false, startmode: '', pcpu: 0, pmem: 0 } ]
}
}
this.infos = {
baseboard: {
model: null,
version: null
},
cpu: {
manufacturer: null,
brand: null,
speedmax: null,
cores: null,
physicalCores: null,
processors: null,
temperature: null,
usage: null
},
mem: {
total: null,
free: null,
active: null
},
os: {
platform: null,
distro: null,
release: null,
codename: null,
kernel: null,
arch: null,
},
fd: {
opened: null
},
storage: {
io: {
read: new MeanCalc(15),
write: new MeanCalc(15)
},
physical_disks: [{
device: null,
type: null,
name: null,
interfaceType: null,
vendor: null
}],
filesystems: [{
}]
},
network: {
latency: new MeanCalc(5),
tx_5: new MeanCalc(5),
rx_5: new MeanCalc(5),
rx_errors_60: new MeanCalc(60),
tx_errors_60: new MeanCalc(60),
tx_dropped_60: new MeanCalc(60),
rx_dropped_60: new MeanCalc(60)
},
// Procs
containers: [],
processes: {
cpu_sorted: null,
mem_sorted: null
},
services: {
running: null,
stopped: null
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment