systeminformation 5.33.5 → 6.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +873 -958
- package/dist/audio.d.ts +1 -0
- package/dist/audio.js +18 -0
- package/dist/baseboard.d.ts +1 -0
- package/dist/baseboard.js +17 -0
- package/dist/battery.d.ts +1 -0
- package/dist/battery.js +19 -0
- package/dist/bios.d.ts +1 -0
- package/dist/bios.js +17 -0
- package/dist/block-devices.d.ts +1 -0
- package/dist/block-devices.js +17 -0
- package/dist/bluetooth.d.ts +1 -0
- package/dist/bluetooth.js +17 -0
- package/dist/bsd/battery.d.ts +2 -0
- package/dist/bsd/battery.js +27 -0
- package/dist/bsd/cpu-cache.d.ts +1 -0
- package/dist/bsd/cpu-cache.js +37 -0
- package/dist/bsd/cpu-flags.d.ts +1 -0
- package/dist/bsd/cpu-flags.js +28 -0
- package/dist/bsd/cpu-temperature.d.ts +1 -0
- package/dist/bsd/cpu-temperature.js +29 -0
- package/dist/bsd/cpu.d.ts +1 -0
- package/dist/bsd/cpu.js +98 -0
- package/dist/bsd/index.d.ts +38 -0
- package/dist/bsd/index.js +85 -0
- package/dist/bsd/mem.d.ts +1 -0
- package/dist/bsd/mem.js +37 -0
- package/dist/bsd/network-stats.d.ts +2 -0
- package/dist/bsd/network-stats.js +92 -0
- package/dist/bsd/os-info.d.ts +24 -0
- package/dist/bsd/os-info.js +47 -0
- package/dist/bsd/uuid.d.ts +2 -0
- package/dist/bsd/uuid.js +30 -0
- package/dist/camera.d.ts +1 -0
- package/dist/camera.js +17 -0
- package/dist/chassis.d.ts +1 -0
- package/dist/chassis.js +17 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +107 -0
- package/dist/common/acceleration.d.ts +8 -0
- package/dist/common/acceleration.js +86 -0
- package/dist/common/codepage.d.ts +1 -0
- package/dist/common/codepage.js +43 -0
- package/dist/common/const.d.ts +25 -0
- package/dist/common/const.js +26 -0
- package/dist/common/cpu.d.ts +2 -0
- package/dist/common/cpu.js +12 -0
- package/dist/common/darwin.d.ts +6 -0
- package/dist/common/darwin.js +266 -0
- package/dist/common/datetime.d.ts +9 -0
- package/dist/common/datetime.js +161 -0
- package/dist/common/defaults.d.ts +25 -0
- package/dist/common/defaults.js +304 -0
- package/dist/common/exec.d.ts +10 -0
- package/dist/common/exec.js +69 -0
- package/dist/common/files.d.ts +2 -0
- package/dist/common/files.js +39 -0
- package/dist/common/filesys.d.ts +11 -0
- package/dist/common/filesys.js +282 -0
- package/dist/common/host.d.ts +2 -0
- package/dist/common/host.js +67 -0
- package/dist/common/index.d.ts +12 -0
- package/dist/common/index.js +146 -0
- package/dist/common/internet.d.ts +6 -0
- package/dist/common/internet.js +92 -0
- package/dist/common/mappings.d.ts +55 -0
- package/dist/common/mappings.js +4133 -0
- package/dist/common/network.d.ts +8 -0
- package/dist/common/network.js +162 -0
- package/dist/common/nvidia.d.ts +22 -0
- package/dist/common/nvidia.js +159 -0
- package/dist/common/parse.d.ts +13 -0
- package/dist/common/parse.js +157 -0
- package/dist/common/raspberry.d.ts +5 -0
- package/dist/common/raspberry.js +277 -0
- package/dist/common/security.d.ts +31 -0
- package/dist/common/security.js +241 -0
- package/dist/common/types.d.ts +1024 -0
- package/dist/common/types.js +2 -0
- package/dist/common/windows.d.ts +58 -0
- package/dist/common/windows.js +292 -0
- package/dist/cpu-cache.d.ts +1 -0
- package/dist/cpu-cache.js +19 -0
- package/dist/cpu-current-load.d.ts +2 -0
- package/dist/cpu-current-load.js +249 -0
- package/dist/cpu-current-speed.d.ts +3 -0
- package/dist/cpu-current-speed.js +84 -0
- package/dist/cpu-flags.d.ts +1 -0
- package/dist/cpu-flags.js +19 -0
- package/dist/cpu-full-load.d.ts +1 -0
- package/dist/cpu-full-load.js +30 -0
- package/dist/cpu-temperature.d.ts +1 -0
- package/dist/cpu-temperature.js +19 -0
- package/dist/cpu.d.ts +1 -0
- package/dist/cpu.js +19 -0
- package/dist/darwin/audio.d.ts +2 -0
- package/dist/darwin/audio.js +46 -0
- package/dist/darwin/baseboard.d.ts +1 -0
- package/dist/darwin/baseboard.js +48 -0
- package/dist/darwin/battery.d.ts +2 -0
- package/dist/darwin/battery.js +65 -0
- package/dist/darwin/bios.d.ts +1 -0
- package/dist/darwin/bios.js +45 -0
- package/dist/darwin/block-devices.d.ts +2 -0
- package/dist/darwin/block-devices.js +101 -0
- package/dist/darwin/bluetooth.d.ts +3 -0
- package/dist/darwin/bluetooth.js +84 -0
- package/dist/darwin/camera.d.ts +2 -0
- package/dist/darwin/camera.js +55 -0
- package/dist/darwin/chassis.d.ts +2 -0
- package/dist/darwin/chassis.js +32 -0
- package/dist/darwin/cpu-cache.d.ts +2 -0
- package/dist/darwin/cpu-cache.js +29 -0
- package/dist/darwin/cpu-flags.d.ts +1 -0
- package/dist/darwin/cpu-flags.js +16 -0
- package/dist/darwin/cpu-temperature.d.ts +1 -0
- package/dist/darwin/cpu-temperature.js +44 -0
- package/dist/darwin/cpu.d.ts +1 -0
- package/dist/darwin/cpu.js +69 -0
- package/dist/darwin/disk-layout.d.ts +2 -0
- package/dist/darwin/disk-layout.js +231 -0
- package/dist/darwin/disks-io.d.ts +2 -0
- package/dist/darwin/disks-io.js +56 -0
- package/dist/darwin/displays.d.ts +2 -0
- package/dist/darwin/displays.js +98 -0
- package/dist/darwin/fs-open-files.d.ts +2 -0
- package/dist/darwin/fs-open-files.js +27 -0
- package/dist/darwin/fs-stats.d.ts +2 -0
- package/dist/darwin/fs-stats.js +47 -0
- package/dist/darwin/gpu.d.ts +2 -0
- package/dist/darwin/gpu.js +55 -0
- package/dist/darwin/index.d.ts +56 -0
- package/dist/darwin/index.js +122 -0
- package/dist/darwin/keyboard.d.ts +2 -0
- package/dist/darwin/keyboard.js +73 -0
- package/dist/darwin/mem-layout.d.ts +2 -0
- package/dist/darwin/mem-layout.js +60 -0
- package/dist/darwin/mem.d.ts +2 -0
- package/dist/darwin/mem.js +50 -0
- package/dist/darwin/mouse.d.ts +2 -0
- package/dist/darwin/mouse.js +78 -0
- package/dist/darwin/network-connections.d.ts +2 -0
- package/dist/darwin/network-connections.js +98 -0
- package/dist/darwin/network-gateway-default.d.ts +1 -0
- package/dist/darwin/network-gateway-default.js +26 -0
- package/dist/darwin/network-interface-default.d.ts +2 -0
- package/dist/darwin/network-interface-default.js +41 -0
- package/dist/darwin/network-interfaces.d.ts +2 -0
- package/dist/darwin/network-interfaces.js +205 -0
- package/dist/darwin/network-stats.d.ts +2 -0
- package/dist/darwin/network-stats.js +86 -0
- package/dist/darwin/npm.d.ts +1 -0
- package/dist/darwin/npm.js +5 -0
- package/dist/darwin/npu.d.ts +2 -0
- package/dist/darwin/npu.js +41 -0
- package/dist/darwin/os-info.d.ts +2 -0
- package/dist/darwin/os-info.js +140 -0
- package/dist/darwin/pci.d.ts +2 -0
- package/dist/darwin/pci.js +37 -0
- package/dist/darwin/printer.d.ts +2 -0
- package/dist/darwin/printer.js +45 -0
- package/dist/darwin/software.d.ts +2 -0
- package/dist/darwin/software.js +39 -0
- package/dist/darwin/system.d.ts +1 -0
- package/dist/darwin/system.js +29 -0
- package/dist/darwin/thunderbolt.d.ts +1 -0
- package/dist/darwin/thunderbolt.js +53 -0
- package/dist/darwin/usb.d.ts +3 -0
- package/dist/darwin/usb.js +69 -0
- package/dist/darwin/users.d.ts +2 -0
- package/dist/darwin/users.js +13 -0
- package/dist/darwin/uuid.d.ts +2 -0
- package/dist/darwin/uuid.js +39 -0
- package/dist/darwin/wifi-connections.d.ts +2 -0
- package/dist/darwin/wifi-connections.js +60 -0
- package/dist/darwin/wifi-interfaces.d.ts +2 -0
- package/dist/darwin/wifi-interfaces.js +27 -0
- package/dist/darwin/wifi-networks.d.ts +2 -0
- package/dist/darwin/wifi-networks.js +61 -0
- package/dist/disk-layout.d.ts +1 -0
- package/dist/disk-layout.js +17 -0
- package/dist/disks-io.d.ts +1 -0
- package/dist/disks-io.js +17 -0
- package/dist/displays.d.ts +1 -0
- package/dist/displays.js +17 -0
- package/dist/docker-socket.d.ts +11 -0
- package/dist/docker-socket.js +113 -0
- package/dist/docker.d.ts +102 -0
- package/dist/docker.js +532 -0
- package/dist/fs-open-files.d.ts +1 -0
- package/dist/fs-open-files.js +17 -0
- package/dist/fs-size.d.ts +1 -0
- package/dist/fs-size.js +23 -0
- package/dist/fs-stats.d.ts +1 -0
- package/dist/fs-stats.js +17 -0
- package/dist/get-data.d.ts +110 -0
- package/dist/get-data.js +151 -0
- package/dist/get.d.ts +5 -0
- package/dist/get.js +117 -0
- package/dist/gpu.d.ts +1 -0
- package/dist/gpu.js +17 -0
- package/dist/index.d.ts +60 -0
- package/dist/index.js +132 -0
- package/dist/inet-checksite.d.ts +1 -0
- package/dist/inet-checksite.js +11 -0
- package/dist/inet-latency.d.ts +1 -0
- package/dist/inet-latency.js +17 -0
- package/dist/inet-public-ip.d.ts +2 -0
- package/dist/inet-public-ip.js +10 -0
- package/dist/keyboard.d.ts +1 -0
- package/dist/keyboard.js +17 -0
- package/dist/linux/audio.d.ts +2 -0
- package/dist/linux/audio.js +67 -0
- package/dist/linux/baseboard.d.ts +1 -0
- package/dist/linux/baseboard.js +81 -0
- package/dist/linux/battery.d.ts +2 -0
- package/dist/linux/battery.js +88 -0
- package/dist/linux/bios.d.ts +2 -0
- package/dist/linux/bios.js +55 -0
- package/dist/linux/block-devices.d.ts +2 -0
- package/dist/linux/block-devices.js +30 -0
- package/dist/linux/bluetooth.d.ts +2 -0
- package/dist/linux/bluetooth.js +86 -0
- package/dist/linux/camera.d.ts +2 -0
- package/dist/linux/camera.js +63 -0
- package/dist/linux/chassis.d.ts +1 -0
- package/dist/linux/chassis.js +41 -0
- package/dist/linux/cpu-cache.d.ts +1 -0
- package/dist/linux/cpu-cache.js +35 -0
- package/dist/linux/cpu-flags.d.ts +1 -0
- package/dist/linux/cpu-flags.js +33 -0
- package/dist/linux/cpu-temperature.d.ts +1 -0
- package/dist/linux/cpu-temperature.js +179 -0
- package/dist/linux/cpu.d.ts +1 -0
- package/dist/linux/cpu.js +135 -0
- package/dist/linux/disk-layout.d.ts +2 -0
- package/dist/linux/disk-layout.js +151 -0
- package/dist/linux/disks-io.d.ts +2 -0
- package/dist/linux/disks-io.js +58 -0
- package/dist/linux/displays.d.ts +2 -0
- package/dist/linux/displays.js +193 -0
- package/dist/linux/fs-open-files.d.ts +2 -0
- package/dist/linux/fs-open-files.js +44 -0
- package/dist/linux/fs-size.d.ts +2 -0
- package/dist/linux/fs-size.js +157 -0
- package/dist/linux/fs-stats.d.ts +2 -0
- package/dist/linux/fs-stats.js +65 -0
- package/dist/linux/gpu.d.ts +15 -0
- package/dist/linux/gpu.js +383 -0
- package/dist/linux/index.d.ts +56 -0
- package/dist/linux/index.js +122 -0
- package/dist/linux/inet-latency.d.ts +1 -0
- package/dist/linux/inet-latency.js +39 -0
- package/dist/linux/keyboard.d.ts +2 -0
- package/dist/linux/keyboard.js +61 -0
- package/dist/linux/mem-layout.d.ts +2 -0
- package/dist/linux/mem-layout.js +112 -0
- package/dist/linux/mem.d.ts +2 -0
- package/dist/linux/mem.js +61 -0
- package/dist/linux/mouse.d.ts +2 -0
- package/dist/linux/mouse.js +73 -0
- package/dist/linux/network-connections.d.ts +2 -0
- package/dist/linux/network-connections.js +114 -0
- package/dist/linux/network-gateway-default.d.ts +1 -0
- package/dist/linux/network-gateway-default.js +22 -0
- package/dist/linux/network-interface-default.d.ts +2 -0
- package/dist/linux/network-interface-default.js +46 -0
- package/dist/linux/network-interfaces.d.ts +3 -0
- package/dist/linux/network-interfaces.js +353 -0
- package/dist/linux/network-stats.d.ts +2 -0
- package/dist/linux/network-stats.js +99 -0
- package/dist/linux/npm.d.ts +1 -0
- package/dist/linux/npm.js +5 -0
- package/dist/linux/npu.d.ts +2 -0
- package/dist/linux/npu.js +77 -0
- package/dist/linux/os-info.d.ts +1 -0
- package/dist/linux/os-info.js +114 -0
- package/dist/linux/pci.d.ts +2 -0
- package/dist/linux/pci.js +56 -0
- package/dist/linux/printer.d.ts +2 -0
- package/dist/linux/printer.js +80 -0
- package/dist/linux/process-load.d.ts +2 -0
- package/dist/linux/process-load.js +164 -0
- package/dist/linux/processes.d.ts +2 -0
- package/dist/linux/processes.js +358 -0
- package/dist/linux/services.d.ts +2 -0
- package/dist/linux/services.js +222 -0
- package/dist/linux/software.d.ts +2 -0
- package/dist/linux/software.js +110 -0
- package/dist/linux/system.d.ts +1 -0
- package/dist/linux/system.js +186 -0
- package/dist/linux/thunderbolt.d.ts +2 -0
- package/dist/linux/thunderbolt.js +51 -0
- package/dist/linux/time.d.ts +6 -0
- package/dist/linux/time.js +28 -0
- package/dist/linux/usb.d.ts +2 -0
- package/dist/linux/usb.js +62 -0
- package/dist/linux/users.d.ts +2 -0
- package/dist/linux/users.js +102 -0
- package/dist/linux/uuid.d.ts +2 -0
- package/dist/linux/uuid.js +44 -0
- package/dist/linux/wifi-connections.d.ts +2 -0
- package/dist/linux/wifi-connections.js +196 -0
- package/dist/linux/wifi-interfaces.d.ts +2 -0
- package/dist/linux/wifi-interfaces.js +96 -0
- package/dist/linux/wifi-networks.d.ts +2 -0
- package/dist/linux/wifi-networks.js +176 -0
- package/dist/mem-layout.d.ts +1 -0
- package/dist/mem-layout.js +17 -0
- package/dist/mem.d.ts +1 -0
- package/dist/mem.js +19 -0
- package/dist/mouse.d.ts +1 -0
- package/dist/mouse.js +17 -0
- package/dist/network-connections.d.ts +1 -0
- package/dist/network-connections.js +17 -0
- package/dist/network-gateway-default.d.ts +1 -0
- package/dist/network-gateway-default.js +17 -0
- package/dist/network-interface-default.d.ts +1 -0
- package/dist/network-interface-default.js +17 -0
- package/dist/network-interfaces.d.ts +1 -0
- package/dist/network-interfaces.js +18 -0
- package/dist/network-stats.d.ts +1 -0
- package/dist/network-stats.js +19 -0
- package/dist/npm.d.ts +2 -0
- package/dist/npm.js +22 -0
- package/dist/npu.d.ts +1 -0
- package/dist/npu.js +17 -0
- package/dist/observe.d.ts +5 -0
- package/dist/observe.js +16 -0
- package/dist/os-info.d.ts +1 -0
- package/dist/os-info.js +21 -0
- package/dist/pci.d.ts +1 -0
- package/dist/pci.js +17 -0
- package/dist/printer.d.ts +1 -0
- package/dist/printer.js +17 -0
- package/dist/process-load.d.ts +1 -0
- package/dist/process-load.js +15 -0
- package/dist/processes.d.ts +1 -0
- package/dist/processes.js +15 -0
- package/dist/services.d.ts +1 -0
- package/dist/services.js +15 -0
- package/dist/shell.d.ts +1 -0
- package/dist/shell.js +16 -0
- package/dist/software.d.ts +1 -0
- package/dist/software.js +17 -0
- package/dist/sun/index.d.ts +17 -0
- package/dist/sun/index.js +43 -0
- package/dist/sun/inet-latency.d.ts +1 -0
- package/dist/sun/inet-latency.js +30 -0
- package/dist/sun/os-info.d.ts +1 -0
- package/dist/sun/os-info.js +26 -0
- package/dist/sun/users.d.ts +2 -0
- package/dist/sun/users.js +13 -0
- package/dist/system.d.ts +1 -0
- package/dist/system.js +17 -0
- package/dist/thunderbolt.d.ts +1 -0
- package/dist/thunderbolt.js +17 -0
- package/dist/time.d.ts +6 -0
- package/dist/time.js +28 -0
- package/dist/usb.d.ts +1 -0
- package/dist/usb.js +17 -0
- package/dist/users.d.ts +1 -0
- package/dist/users.js +21 -0
- package/dist/uuid.d.ts +1 -0
- package/dist/uuid.js +19 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +16 -0
- package/dist/versions.d.ts +2 -0
- package/dist/versions.js +1150 -0
- package/dist/virtualbox.d.ts +2 -0
- package/dist/virtualbox.js +89 -0
- package/dist/wifi-connections.d.ts +1 -0
- package/dist/wifi-connections.js +17 -0
- package/dist/wifi-interfaces.d.ts +1 -0
- package/dist/wifi-interfaces.js +17 -0
- package/dist/wifi-networks.d.ts +1 -0
- package/dist/wifi-networks.js +17 -0
- package/dist/windows/audio.d.ts +2 -0
- package/dist/windows/audio.js +23 -0
- package/dist/windows/baseboard.d.ts +1 -0
- package/dist/windows/baseboard.js +35 -0
- package/dist/windows/battery.d.ts +1 -0
- package/dist/windows/battery.js +81 -0
- package/dist/windows/bios.d.ts +1 -0
- package/dist/windows/bios.js +37 -0
- package/dist/windows/block-devices.d.ts +3 -0
- package/dist/windows/block-devices.js +58 -0
- package/dist/windows/bluetooth.d.ts +2 -0
- package/dist/windows/bluetooth.js +31 -0
- package/dist/windows/camera.d.ts +2 -0
- package/dist/windows/camera.js +47 -0
- package/dist/windows/chassis.d.ts +1 -0
- package/dist/windows/chassis.js +29 -0
- package/dist/windows/cpu-cache.d.ts +2 -0
- package/dist/windows/cpu-cache.js +59 -0
- package/dist/windows/cpu-flags.d.ts +1 -0
- package/dist/windows/cpu-flags.js +61 -0
- package/dist/windows/cpu-temperature.d.ts +1 -0
- package/dist/windows/cpu-temperature.js +32 -0
- package/dist/windows/cpu.d.ts +1 -0
- package/dist/windows/cpu.js +96 -0
- package/dist/windows/disk-layout.d.ts +2 -0
- package/dist/windows/disk-layout.js +129 -0
- package/dist/windows/disks-io.d.ts +2 -0
- package/dist/windows/disks-io.js +46 -0
- package/dist/windows/displays.d.ts +2 -0
- package/dist/windows/displays.js +213 -0
- package/dist/windows/fs-open-files.d.ts +2 -0
- package/dist/windows/fs-open-files.js +22 -0
- package/dist/windows/fs-size.d.ts +2 -0
- package/dist/windows/fs-size.js +47 -0
- package/dist/windows/fs-stats.d.ts +2 -0
- package/dist/windows/fs-stats.js +37 -0
- package/dist/windows/gpu.d.ts +2 -0
- package/dist/windows/gpu.js +128 -0
- package/dist/windows/index.d.ts +56 -0
- package/dist/windows/index.js +122 -0
- package/dist/windows/inet-latency.d.ts +1 -0
- package/dist/windows/inet-latency.js +34 -0
- package/dist/windows/keyboard.d.ts +2 -0
- package/dist/windows/keyboard.js +47 -0
- package/dist/windows/mem-layout.d.ts +2 -0
- package/dist/windows/mem-layout.js +39 -0
- package/dist/windows/mem.d.ts +2 -0
- package/dist/windows/mem.js +33 -0
- package/dist/windows/mouse.d.ts +2 -0
- package/dist/windows/mouse.js +64 -0
- package/dist/windows/network-connections.d.ts +2 -0
- package/dist/windows/network-connections.js +93 -0
- package/dist/windows/network-gateway-default.d.ts +1 -0
- package/dist/windows/network-gateway-default.js +36 -0
- package/dist/windows/network-interface-default.d.ts +2 -0
- package/dist/windows/network-interface-default.js +56 -0
- package/dist/windows/network-interfaces.d.ts +2 -0
- package/dist/windows/network-interfaces.js +346 -0
- package/dist/windows/network-stats.d.ts +2 -0
- package/dist/windows/network-stats.js +135 -0
- package/dist/windows/npm.d.ts +1 -0
- package/dist/windows/npm.js +5 -0
- package/dist/windows/npu.d.ts +2 -0
- package/dist/windows/npu.js +29 -0
- package/dist/windows/os-info.d.ts +1 -0
- package/dist/windows/os-info.js +70 -0
- package/dist/windows/pci.d.ts +2 -0
- package/dist/windows/pci.js +33 -0
- package/dist/windows/printer.d.ts +2 -0
- package/dist/windows/printer.js +36 -0
- package/dist/windows/process-load.d.ts +2 -0
- package/dist/windows/process-load.js +121 -0
- package/dist/windows/processes.d.ts +9 -0
- package/dist/windows/processes.js +139 -0
- package/dist/windows/services.d.ts +2 -0
- package/dist/windows/services.js +83 -0
- package/dist/windows/shell.d.ts +1 -0
- package/dist/windows/shell.js +19 -0
- package/dist/windows/software.d.ts +2 -0
- package/dist/windows/software.js +53 -0
- package/dist/windows/system.d.ts +1 -0
- package/dist/windows/system.js +98 -0
- package/dist/windows/thunderbolt.d.ts +2 -0
- package/dist/windows/thunderbolt.js +34 -0
- package/dist/windows/usb.d.ts +2 -0
- package/dist/windows/usb.js +37 -0
- package/dist/windows/users.d.ts +2 -0
- package/dist/windows/users.js +151 -0
- package/dist/windows/uuid.d.ts +2 -0
- package/dist/windows/uuid.js +28 -0
- package/dist/windows/wifi-connections.d.ts +2 -0
- package/dist/windows/wifi-connections.js +56 -0
- package/dist/windows/wifi-interfaces.d.ts +2 -0
- package/dist/windows/wifi-interfaces.js +45 -0
- package/dist/windows/wifi-networks.d.ts +2 -0
- package/dist/windows/wifi-networks.js +50 -0
- package/package.json +78 -12
- package/lib/audio.js +0 -277
- package/lib/battery.js +0 -334
- package/lib/bluetooth.js +0 -315
- package/lib/bluetoothVendors.js +0 -1138
- package/lib/cli.js +0 -100
- package/lib/cpu.js +0 -2285
- package/lib/docker.js +0 -791
- package/lib/dockerSocket.js +0 -117
- package/lib/filesystem.js +0 -1849
- package/lib/graphics.js +0 -1321
- package/lib/index.d.ts +0 -1051
- package/lib/index.js +0 -520
- package/lib/internet.js +0 -259
- package/lib/memory.js +0 -622
- package/lib/network.js +0 -2008
- package/lib/osinfo.js +0 -1322
- package/lib/printer.js +0 -209
- package/lib/processes.js +0 -1459
- package/lib/system.js +0 -855
- package/lib/usb.js +0 -309
- package/lib/users.js +0 -412
- package/lib/util.js +0 -2833
- package/lib/virtualbox.js +0 -116
- package/lib/wifi.js +0 -839
package/dist/audio.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const audio: () => Promise<import("./common/types").AudioData[] | null>;
|
package/dist/audio.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.audio = void 0;
|
|
4
|
+
const const_1 = require("./common/const");
|
|
5
|
+
const audio = async () => {
|
|
6
|
+
const newLocal = const_1.LINUX || const_1.FREEBSD || const_1.NETBSD || const_1.OPENBSD || const_1.ANDROID;
|
|
7
|
+
switch (true) {
|
|
8
|
+
case newLocal:
|
|
9
|
+
return (await import('./linux/audio.js')).audio();
|
|
10
|
+
case const_1.DARWIN:
|
|
11
|
+
return (await import('./darwin/audio.js')).audio();
|
|
12
|
+
case const_1.WINDOWS:
|
|
13
|
+
return (await import('./windows/audio.js')).audio();
|
|
14
|
+
default:
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
exports.audio = audio;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const baseboard: () => Promise<any>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.baseboard = void 0;
|
|
4
|
+
const const_1 = require("./common/const");
|
|
5
|
+
const baseboard = async () => {
|
|
6
|
+
switch (true) {
|
|
7
|
+
case const_1.LINUX || const_1.ANDROID:
|
|
8
|
+
return (await import('./linux/baseboard.js')).baseboard();
|
|
9
|
+
case const_1.DARWIN:
|
|
10
|
+
return (await import('./darwin/baseboard.js')).baseboard();
|
|
11
|
+
case const_1.WINDOWS:
|
|
12
|
+
return (await import('./windows/baseboard.js')).baseboard();
|
|
13
|
+
default:
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
exports.baseboard = baseboard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const battery: () => Promise<any[] | null>;
|
package/dist/battery.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.battery = void 0;
|
|
4
|
+
const const_1 = require("./common/const");
|
|
5
|
+
const battery = async () => {
|
|
6
|
+
switch (true) {
|
|
7
|
+
case const_1.LINUX || const_1.ANDROID:
|
|
8
|
+
return (await import('./linux/battery.js')).battery();
|
|
9
|
+
case const_1.FREEBSD || const_1.NETBSD || const_1.OPENBSD:
|
|
10
|
+
return (await import('./bsd/battery.js')).battery();
|
|
11
|
+
case const_1.DARWIN:
|
|
12
|
+
return (await import('./darwin/battery.js')).battery();
|
|
13
|
+
case const_1.WINDOWS:
|
|
14
|
+
return (await import('./windows/battery.js')).battery();
|
|
15
|
+
default:
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
exports.battery = battery;
|
package/dist/bios.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const bios: () => Promise<any>;
|
package/dist/bios.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bios = void 0;
|
|
4
|
+
const const_1 = require("./common/const");
|
|
5
|
+
const bios = async () => {
|
|
6
|
+
switch (true) {
|
|
7
|
+
case const_1.LINUX || const_1.ANDROID:
|
|
8
|
+
return (await import('./linux/bios.js')).bios();
|
|
9
|
+
case const_1.DARWIN:
|
|
10
|
+
return (await import('./darwin/bios.js')).bios();
|
|
11
|
+
case const_1.WINDOWS:
|
|
12
|
+
return (await import('./windows/bios.js')).bios();
|
|
13
|
+
default:
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
exports.bios = bios;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const blockDevices: () => Promise<import("./common/types").FsBlockDevicesData[] | null>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.blockDevices = void 0;
|
|
4
|
+
const const_1 = require("./common/const");
|
|
5
|
+
const blockDevices = async () => {
|
|
6
|
+
switch (true) {
|
|
7
|
+
case const_1.LINUX:
|
|
8
|
+
return (await import('./linux/block-devices.js')).blockDevices();
|
|
9
|
+
case const_1.DARWIN:
|
|
10
|
+
return (await import('./darwin/block-devices.js')).blockDevices();
|
|
11
|
+
case const_1.WINDOWS:
|
|
12
|
+
return (await import('./windows/block-devices.js')).blockDevices();
|
|
13
|
+
default:
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
exports.blockDevices = blockDevices;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const bluetoothDevices: () => Promise<import("./common/types").BluetoothObject[] | null>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bluetoothDevices = void 0;
|
|
4
|
+
const const_1 = require("./common/const");
|
|
5
|
+
const bluetoothDevices = async () => {
|
|
6
|
+
switch (true) {
|
|
7
|
+
case const_1.LINUX || const_1.ANDROID:
|
|
8
|
+
return (await import('./linux/bluetooth.js')).bluetoothDevices();
|
|
9
|
+
case const_1.DARWIN:
|
|
10
|
+
return (await import('./darwin/bluetooth.js')).bluetoothDevices();
|
|
11
|
+
case const_1.WINDOWS:
|
|
12
|
+
return (await import('./windows/bluetooth.js')).bluetoothDevices();
|
|
13
|
+
default:
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
exports.bluetoothDevices = bluetoothDevices;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.battery = void 0;
|
|
4
|
+
const exec_1 = require("../common/exec");
|
|
5
|
+
const common_1 = require("../common");
|
|
6
|
+
const defaults_1 = require("../common/defaults");
|
|
7
|
+
const battery = async () => {
|
|
8
|
+
await (0, common_1.nextTick)();
|
|
9
|
+
const defaults = (0, common_1.cloneObj)(defaults_1.initBatteryResult);
|
|
10
|
+
const { stdout } = await (0, exec_1.execSave)('/sbin/sysctl -i hw.acpi.battery hw.acpi.acline');
|
|
11
|
+
const lines = stdout.toString().split('\n');
|
|
12
|
+
const batteries = (0, common_1.toInt)('0' + (0, common_1.getValue)(lines, 'hw.acpi.battery.units'));
|
|
13
|
+
const percent = (0, common_1.toInt)('0' + (0, common_1.getValue)(lines, 'hw.acpi.battery.life'));
|
|
14
|
+
const isCharging = (0, common_1.getValue)(lines, 'hw.acpi.acline') !== '1';
|
|
15
|
+
return batteries > 0
|
|
16
|
+
? [
|
|
17
|
+
{
|
|
18
|
+
...defaults,
|
|
19
|
+
isCharging,
|
|
20
|
+
acConnected: isCharging,
|
|
21
|
+
capacityUnit: 'unknown',
|
|
22
|
+
percent: batteries ? percent : null
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
: [];
|
|
26
|
+
};
|
|
27
|
+
exports.battery = battery;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cpuCache: () => Promise<any>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cpuCache = void 0;
|
|
4
|
+
const exec_1 = require("../common/exec");
|
|
5
|
+
const common_1 = require("../common");
|
|
6
|
+
const defaults_1 = require("../common/defaults");
|
|
7
|
+
const cpuCache = async () => {
|
|
8
|
+
await (0, common_1.nextTick)();
|
|
9
|
+
const result = (0, common_1.cloneObj)(defaults_1.initCpuCacheResult);
|
|
10
|
+
const { stdout } = await (0, exec_1.exec)('dmidecode -t 7');
|
|
11
|
+
let cache = [];
|
|
12
|
+
cache = stdout.split('Cache Information').splice(1);
|
|
13
|
+
for (let i = 0; i < cache.length; i++) {
|
|
14
|
+
const lines = cache[i].split('\n');
|
|
15
|
+
const cacheTypeParts = (0, common_1.getValue)(lines, 'Socket Designation').toLowerCase().replace(' ', '-').split('-');
|
|
16
|
+
const cacheType = cacheTypeParts.length ? cacheTypeParts[0] : '';
|
|
17
|
+
const sizeParts = (0, common_1.getValue)(lines, 'Installed Size').split(' ');
|
|
18
|
+
let size = parseInt(sizeParts[0], 10);
|
|
19
|
+
const unit = sizeParts.length > 1 ? sizeParts[1] : 'kb';
|
|
20
|
+
size = size * (unit === 'kb' ? 1024 : unit === 'mb' ? 1024 * 1024 : unit === 'gb' ? 1024 * 1024 * 1024 : 1);
|
|
21
|
+
if (cacheType) {
|
|
22
|
+
switch (true) {
|
|
23
|
+
case cacheType === 'l1':
|
|
24
|
+
result.l1d = size / 2;
|
|
25
|
+
result.l1i = size / 2;
|
|
26
|
+
break;
|
|
27
|
+
case cacheType === 'l2':
|
|
28
|
+
result.l2 = size;
|
|
29
|
+
break;
|
|
30
|
+
case cacheType === 'l3':
|
|
31
|
+
result.l3 = size;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
exports.cpuCache = cpuCache;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cpuFlags: () => Promise<string>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cpuFlags = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const exec_1 = require("../common/exec");
|
|
6
|
+
const cpuFlags = async () => {
|
|
7
|
+
await (0, common_1.nextTick)();
|
|
8
|
+
let result = '';
|
|
9
|
+
try {
|
|
10
|
+
const { stdout } = await (0, exec_1.exec)('dmidecode -t 4');
|
|
11
|
+
const flagsArray = [];
|
|
12
|
+
const parts = stdout.toString().split('\tFlags:');
|
|
13
|
+
const parts2 = parts.length > 1 ? parts[1].split('\tVersion:') : [''];
|
|
14
|
+
const lines = parts2[0].split('\n');
|
|
15
|
+
lines.forEach((line) => {
|
|
16
|
+
const flag = (line.indexOf('(') ? line.split('(')[0].toLowerCase() : '').trim().replace(/\t/g, '');
|
|
17
|
+
if (flag) {
|
|
18
|
+
flagsArray.push(flag);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
result = flagsArray.join(' ').trim().toLowerCase();
|
|
22
|
+
return result;
|
|
23
|
+
}
|
|
24
|
+
catch (e) {
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.cpuFlags = cpuFlags;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cpuTemperature: () => Promise<any>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cpuTemperature = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const exec_1 = require("../common/exec");
|
|
6
|
+
const defaults_1 = require("../common/defaults");
|
|
7
|
+
const cpuTemperature = async () => {
|
|
8
|
+
await (0, common_1.nextTick)();
|
|
9
|
+
const result = (0, common_1.cloneObj)(defaults_1.initCpuTemperature);
|
|
10
|
+
const { stdout } = await (0, exec_1.exec)('/sbin/sysctl -i dev.cpu | grep temp');
|
|
11
|
+
const lines = stdout.toString().split('\n');
|
|
12
|
+
let sum = 0;
|
|
13
|
+
lines.forEach((line) => {
|
|
14
|
+
const parts = line.split(':');
|
|
15
|
+
if (parts.length > 1) {
|
|
16
|
+
const temp = parseFloat(parts[1].replace(',', '.'));
|
|
17
|
+
if (!result.max || temp > result.max) {
|
|
18
|
+
result.max = temp;
|
|
19
|
+
}
|
|
20
|
+
sum = sum + temp;
|
|
21
|
+
result.cores.push(temp);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
if (result.cores.length) {
|
|
25
|
+
result.main = Math.round((sum / result.cores.length) * 100) / 100;
|
|
26
|
+
}
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
exports.cpuTemperature = cpuTemperature;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cpu: () => Promise<any>;
|
package/dist/bsd/cpu.js
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cpu = void 0;
|
|
4
|
+
const node_os_1 = require("node:os");
|
|
5
|
+
const common_1 = require("../common");
|
|
6
|
+
const cpu_1 = require("./../common/cpu");
|
|
7
|
+
const defaults_1 = require("../common/defaults");
|
|
8
|
+
const exec_1 = require("../common/exec");
|
|
9
|
+
const mappings_1 = require("../common/mappings");
|
|
10
|
+
const cpu_current_speed_1 = require("../cpu-current-speed");
|
|
11
|
+
const cpu_flags_1 = require("./cpu-flags");
|
|
12
|
+
const cpu = async () => {
|
|
13
|
+
await (0, common_1.nextTick)();
|
|
14
|
+
let result = (0, common_1.cloneObj)(defaults_1.initCpuResult);
|
|
15
|
+
const flags = await (0, cpu_flags_1.cpuFlags)();
|
|
16
|
+
result.flags = flags;
|
|
17
|
+
result.virtualization = flags.indexOf('vmx') > -1 || flags.indexOf('svm') > -1;
|
|
18
|
+
let modelline = '';
|
|
19
|
+
if ((0, node_os_1.cpus)()[0] && (0, node_os_1.cpus)()[0].model) {
|
|
20
|
+
modelline = (0, node_os_1.cpus)()[0].model;
|
|
21
|
+
}
|
|
22
|
+
const { stdout } = await (0, exec_1.execSave)('dmidecode -t 4');
|
|
23
|
+
if (stdout) {
|
|
24
|
+
let cache = [];
|
|
25
|
+
const data = stdout.toString().split('# dmidecode');
|
|
26
|
+
const processor = data.length > 1 ? data[1] : '';
|
|
27
|
+
cache = data.length > 2 ? data[2].split('Cache Information') : [];
|
|
28
|
+
let lines = processor.split('\n');
|
|
29
|
+
result.brand = modelline.split('@')[0].trim();
|
|
30
|
+
result.speed = modelline.split('@')[1] ? parseFloat(modelline.split('@')[1].trim()) : 0;
|
|
31
|
+
if (result.speed === 0 && (result.brand.indexOf('AMD') > -1 || result.brand.toLowerCase().indexOf('ryzen') > -1)) {
|
|
32
|
+
result.speed = (0, mappings_1.getAMDSpeed)(result.brand);
|
|
33
|
+
}
|
|
34
|
+
if (result.speed === 0) {
|
|
35
|
+
const current = await (0, cpu_current_speed_1.getCpuCurrentSpeed)();
|
|
36
|
+
if (current.avg !== 0) {
|
|
37
|
+
result.speed = current.avg;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
(0, cpu_1.setCpuSpeed)(result.speed);
|
|
41
|
+
result.speedMin = result.speed;
|
|
42
|
+
result.speedMax = Math.round(parseFloat((0, common_1.getValue)(lines, 'max speed').replace(/Mhz/g, '')) / 10.0) / 100 || result.speed;
|
|
43
|
+
result = (0, mappings_1.cpuBrandManufacturer)(result);
|
|
44
|
+
result.vendor = (0, mappings_1.cpuManufacturer)((0, common_1.getValue)(lines, 'manufacturer'));
|
|
45
|
+
const sig = (0, common_1.getValue)(lines, 'signature');
|
|
46
|
+
const sigParts = sig.split(',');
|
|
47
|
+
for (let i = 0; i < sigParts.length; i++) {
|
|
48
|
+
sigParts[i] = sigParts[i].trim();
|
|
49
|
+
}
|
|
50
|
+
result.family = (0, common_1.getValue)(sigParts, 'Family', ' ', true);
|
|
51
|
+
result.model = (0, common_1.getValue)(sigParts, 'Model', ' ', true);
|
|
52
|
+
result.stepping = (0, common_1.getValue)(sigParts, 'Stepping', ' ', true);
|
|
53
|
+
result.revision = '';
|
|
54
|
+
const voltage = parseFloat((0, common_1.getValue)(lines, 'voltage'));
|
|
55
|
+
result.voltage = isNaN(voltage) ? '' : voltage.toFixed(2);
|
|
56
|
+
result.cache = defaults_1.initCpuCacheResult;
|
|
57
|
+
for (let i = 0; i < cache.length; i++) {
|
|
58
|
+
lines = cache[i].split('\n');
|
|
59
|
+
const cacheTypeParts = (0, common_1.getValue)(lines, 'Socket Designation').toLowerCase().replace(' ', '-').split('-');
|
|
60
|
+
const cacheType = cacheTypeParts.length ? cacheTypeParts[0] : '';
|
|
61
|
+
const sizeParts = (0, common_1.getValue)(lines, 'Installed Size').split(' ');
|
|
62
|
+
let size = parseInt(sizeParts[0], 10);
|
|
63
|
+
const unit = sizeParts.length > 1 ? sizeParts[1] : 'kb';
|
|
64
|
+
size = size * (unit === 'kb' ? 1024 : unit === 'mb' ? 1024 * 1024 : unit === 'gb' ? 1024 * 1024 * 1024 : 1);
|
|
65
|
+
if (cacheType) {
|
|
66
|
+
switch (true) {
|
|
67
|
+
case cacheType === 'l1':
|
|
68
|
+
result.cache.l1d = size / 2;
|
|
69
|
+
result.cache.l1i = size / 2;
|
|
70
|
+
break;
|
|
71
|
+
case cacheType === 'l2':
|
|
72
|
+
result.cache.l2 = size;
|
|
73
|
+
break;
|
|
74
|
+
case cacheType === 'l3':
|
|
75
|
+
result.cache.l3 = size;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
result.socket = (0, common_1.getValue)(lines, 'Upgrade').replace('Socket', '').trim();
|
|
80
|
+
const threadCount = (0, common_1.getValue)(lines, 'thread count').trim();
|
|
81
|
+
const coreCount = (0, common_1.getValue)(lines, 'core count').trim();
|
|
82
|
+
if (coreCount && threadCount) {
|
|
83
|
+
result.cores = parseInt(threadCount, 10);
|
|
84
|
+
result.physicalCores = parseInt(coreCount, 10);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
const brandManufacurer = (0, mappings_1.cpuBrandManufacturer)((0, node_os_1.cpus)()[0].model);
|
|
89
|
+
return {
|
|
90
|
+
...result,
|
|
91
|
+
speed: Number(((0, node_os_1.cpus)()[0].speed / 1000).toFixed(2)),
|
|
92
|
+
brand: brandManufacurer.brand,
|
|
93
|
+
manufacturer: brandManufacurer.manufacturer
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
return result;
|
|
97
|
+
};
|
|
98
|
+
exports.cpu = cpu;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export { currentLoad } from '../cpu-current-load';
|
|
2
|
+
export { cpuCurrentSpeed } from '../cpu-current-speed';
|
|
3
|
+
export { fullLoad } from '../cpu-full-load';
|
|
4
|
+
export { fsOpenFiles } from '../darwin/fs-open-files';
|
|
5
|
+
export { networkInterfaceDefault } from '../darwin/network-interface-default';
|
|
6
|
+
export { networkInterfaces } from '../darwin/network-interfaces';
|
|
7
|
+
export { users } from '../darwin/users';
|
|
8
|
+
export { dockerAll, dockerContainerProcesses, dockerContainers, dockerContainerStats, dockerImages, dockerInfo, dockerVolumes } from '../docker';
|
|
9
|
+
export { inetChecksite } from '../inet-checksite';
|
|
10
|
+
export { audio } from '../linux/audio';
|
|
11
|
+
export { baseboard } from '../linux/baseboard';
|
|
12
|
+
export { bios } from '../linux/bios';
|
|
13
|
+
export { chassis } from '../linux/chassis';
|
|
14
|
+
export { disksIO } from '../linux/disks-io';
|
|
15
|
+
export { fsSize } from '../linux/fs-size';
|
|
16
|
+
export { inetLatency } from '../linux/inet-latency';
|
|
17
|
+
export { memLayout } from '../linux/mem-layout';
|
|
18
|
+
export { networkConnections } from '../linux/network-connections';
|
|
19
|
+
export { networkGatewayDefault } from '../linux/network-gateway-default';
|
|
20
|
+
export { printer } from '../linux/printer';
|
|
21
|
+
export { processLoad } from '../linux/process-load';
|
|
22
|
+
export { processes } from '../linux/processes';
|
|
23
|
+
export { services } from '../linux/services';
|
|
24
|
+
export { system } from '../linux/system';
|
|
25
|
+
export { shell } from '../shell';
|
|
26
|
+
export { time } from '../time';
|
|
27
|
+
export { version } from '../version';
|
|
28
|
+
export { versions } from '../versions';
|
|
29
|
+
export { vboxInfo } from '../virtualbox';
|
|
30
|
+
export { battery } from './battery';
|
|
31
|
+
export { cpu } from './cpu';
|
|
32
|
+
export { cpuCache } from './cpu-cache';
|
|
33
|
+
export { cpuFlags } from './cpu-flags';
|
|
34
|
+
export { cpuTemperature } from './cpu-temperature';
|
|
35
|
+
export { mem } from './mem';
|
|
36
|
+
export { networkStats } from './network-stats';
|
|
37
|
+
export { osInfo } from './os-info';
|
|
38
|
+
export { uuid } from './uuid';
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uuid = exports.osInfo = exports.networkStats = exports.mem = exports.cpuTemperature = exports.cpuFlags = exports.cpuCache = exports.cpu = exports.battery = exports.vboxInfo = exports.versions = exports.version = exports.time = exports.shell = exports.system = exports.services = exports.processes = exports.processLoad = exports.printer = exports.networkGatewayDefault = exports.networkConnections = exports.memLayout = exports.inetLatency = exports.fsSize = exports.disksIO = exports.chassis = exports.bios = exports.baseboard = exports.audio = exports.inetChecksite = exports.dockerVolumes = exports.dockerInfo = exports.dockerImages = exports.dockerContainerStats = exports.dockerContainers = exports.dockerContainerProcesses = exports.dockerAll = exports.users = exports.networkInterfaces = exports.networkInterfaceDefault = exports.fsOpenFiles = exports.fullLoad = exports.cpuCurrentSpeed = exports.currentLoad = void 0;
|
|
4
|
+
var cpu_current_load_1 = require("../cpu-current-load");
|
|
5
|
+
Object.defineProperty(exports, "currentLoad", { enumerable: true, get: function () { return cpu_current_load_1.currentLoad; } });
|
|
6
|
+
var cpu_current_speed_1 = require("../cpu-current-speed");
|
|
7
|
+
Object.defineProperty(exports, "cpuCurrentSpeed", { enumerable: true, get: function () { return cpu_current_speed_1.cpuCurrentSpeed; } });
|
|
8
|
+
var cpu_full_load_1 = require("../cpu-full-load");
|
|
9
|
+
Object.defineProperty(exports, "fullLoad", { enumerable: true, get: function () { return cpu_full_load_1.fullLoad; } });
|
|
10
|
+
var fs_open_files_1 = require("../darwin/fs-open-files");
|
|
11
|
+
Object.defineProperty(exports, "fsOpenFiles", { enumerable: true, get: function () { return fs_open_files_1.fsOpenFiles; } });
|
|
12
|
+
var network_interface_default_1 = require("../darwin/network-interface-default");
|
|
13
|
+
Object.defineProperty(exports, "networkInterfaceDefault", { enumerable: true, get: function () { return network_interface_default_1.networkInterfaceDefault; } });
|
|
14
|
+
var network_interfaces_1 = require("../darwin/network-interfaces");
|
|
15
|
+
Object.defineProperty(exports, "networkInterfaces", { enumerable: true, get: function () { return network_interfaces_1.networkInterfaces; } });
|
|
16
|
+
var users_1 = require("../darwin/users");
|
|
17
|
+
Object.defineProperty(exports, "users", { enumerable: true, get: function () { return users_1.users; } });
|
|
18
|
+
var docker_1 = require("../docker");
|
|
19
|
+
Object.defineProperty(exports, "dockerAll", { enumerable: true, get: function () { return docker_1.dockerAll; } });
|
|
20
|
+
Object.defineProperty(exports, "dockerContainerProcesses", { enumerable: true, get: function () { return docker_1.dockerContainerProcesses; } });
|
|
21
|
+
Object.defineProperty(exports, "dockerContainers", { enumerable: true, get: function () { return docker_1.dockerContainers; } });
|
|
22
|
+
Object.defineProperty(exports, "dockerContainerStats", { enumerable: true, get: function () { return docker_1.dockerContainerStats; } });
|
|
23
|
+
Object.defineProperty(exports, "dockerImages", { enumerable: true, get: function () { return docker_1.dockerImages; } });
|
|
24
|
+
Object.defineProperty(exports, "dockerInfo", { enumerable: true, get: function () { return docker_1.dockerInfo; } });
|
|
25
|
+
Object.defineProperty(exports, "dockerVolumes", { enumerable: true, get: function () { return docker_1.dockerVolumes; } });
|
|
26
|
+
var inet_checksite_1 = require("../inet-checksite");
|
|
27
|
+
Object.defineProperty(exports, "inetChecksite", { enumerable: true, get: function () { return inet_checksite_1.inetChecksite; } });
|
|
28
|
+
var audio_1 = require("../linux/audio");
|
|
29
|
+
Object.defineProperty(exports, "audio", { enumerable: true, get: function () { return audio_1.audio; } });
|
|
30
|
+
var baseboard_1 = require("../linux/baseboard");
|
|
31
|
+
Object.defineProperty(exports, "baseboard", { enumerable: true, get: function () { return baseboard_1.baseboard; } });
|
|
32
|
+
var bios_1 = require("../linux/bios");
|
|
33
|
+
Object.defineProperty(exports, "bios", { enumerable: true, get: function () { return bios_1.bios; } });
|
|
34
|
+
var chassis_1 = require("../linux/chassis");
|
|
35
|
+
Object.defineProperty(exports, "chassis", { enumerable: true, get: function () { return chassis_1.chassis; } });
|
|
36
|
+
var disks_io_1 = require("../linux/disks-io");
|
|
37
|
+
Object.defineProperty(exports, "disksIO", { enumerable: true, get: function () { return disks_io_1.disksIO; } });
|
|
38
|
+
var fs_size_1 = require("../linux/fs-size");
|
|
39
|
+
Object.defineProperty(exports, "fsSize", { enumerable: true, get: function () { return fs_size_1.fsSize; } });
|
|
40
|
+
var inet_latency_1 = require("../linux/inet-latency");
|
|
41
|
+
Object.defineProperty(exports, "inetLatency", { enumerable: true, get: function () { return inet_latency_1.inetLatency; } });
|
|
42
|
+
var mem_layout_1 = require("../linux/mem-layout");
|
|
43
|
+
Object.defineProperty(exports, "memLayout", { enumerable: true, get: function () { return mem_layout_1.memLayout; } });
|
|
44
|
+
var network_connections_1 = require("../linux/network-connections");
|
|
45
|
+
Object.defineProperty(exports, "networkConnections", { enumerable: true, get: function () { return network_connections_1.networkConnections; } });
|
|
46
|
+
var network_gateway_default_1 = require("../linux/network-gateway-default");
|
|
47
|
+
Object.defineProperty(exports, "networkGatewayDefault", { enumerable: true, get: function () { return network_gateway_default_1.networkGatewayDefault; } });
|
|
48
|
+
var printer_1 = require("../linux/printer");
|
|
49
|
+
Object.defineProperty(exports, "printer", { enumerable: true, get: function () { return printer_1.printer; } });
|
|
50
|
+
var process_load_1 = require("../linux/process-load");
|
|
51
|
+
Object.defineProperty(exports, "processLoad", { enumerable: true, get: function () { return process_load_1.processLoad; } });
|
|
52
|
+
var processes_1 = require("../linux/processes");
|
|
53
|
+
Object.defineProperty(exports, "processes", { enumerable: true, get: function () { return processes_1.processes; } });
|
|
54
|
+
var services_1 = require("../linux/services");
|
|
55
|
+
Object.defineProperty(exports, "services", { enumerable: true, get: function () { return services_1.services; } });
|
|
56
|
+
var system_1 = require("../linux/system");
|
|
57
|
+
Object.defineProperty(exports, "system", { enumerable: true, get: function () { return system_1.system; } });
|
|
58
|
+
var shell_1 = require("../shell");
|
|
59
|
+
Object.defineProperty(exports, "shell", { enumerable: true, get: function () { return shell_1.shell; } });
|
|
60
|
+
var time_1 = require("../time");
|
|
61
|
+
Object.defineProperty(exports, "time", { enumerable: true, get: function () { return time_1.time; } });
|
|
62
|
+
var version_1 = require("../version");
|
|
63
|
+
Object.defineProperty(exports, "version", { enumerable: true, get: function () { return version_1.version; } });
|
|
64
|
+
var versions_1 = require("../versions");
|
|
65
|
+
Object.defineProperty(exports, "versions", { enumerable: true, get: function () { return versions_1.versions; } });
|
|
66
|
+
var virtualbox_1 = require("../virtualbox");
|
|
67
|
+
Object.defineProperty(exports, "vboxInfo", { enumerable: true, get: function () { return virtualbox_1.vboxInfo; } });
|
|
68
|
+
var battery_1 = require("./battery");
|
|
69
|
+
Object.defineProperty(exports, "battery", { enumerable: true, get: function () { return battery_1.battery; } });
|
|
70
|
+
var cpu_1 = require("./cpu");
|
|
71
|
+
Object.defineProperty(exports, "cpu", { enumerable: true, get: function () { return cpu_1.cpu; } });
|
|
72
|
+
var cpu_cache_1 = require("./cpu-cache");
|
|
73
|
+
Object.defineProperty(exports, "cpuCache", { enumerable: true, get: function () { return cpu_cache_1.cpuCache; } });
|
|
74
|
+
var cpu_flags_1 = require("./cpu-flags");
|
|
75
|
+
Object.defineProperty(exports, "cpuFlags", { enumerable: true, get: function () { return cpu_flags_1.cpuFlags; } });
|
|
76
|
+
var cpu_temperature_1 = require("./cpu-temperature");
|
|
77
|
+
Object.defineProperty(exports, "cpuTemperature", { enumerable: true, get: function () { return cpu_temperature_1.cpuTemperature; } });
|
|
78
|
+
var mem_1 = require("./mem");
|
|
79
|
+
Object.defineProperty(exports, "mem", { enumerable: true, get: function () { return mem_1.mem; } });
|
|
80
|
+
var network_stats_1 = require("./network-stats");
|
|
81
|
+
Object.defineProperty(exports, "networkStats", { enumerable: true, get: function () { return network_stats_1.networkStats; } });
|
|
82
|
+
var os_info_1 = require("./os-info");
|
|
83
|
+
Object.defineProperty(exports, "osInfo", { enumerable: true, get: function () { return os_info_1.osInfo; } });
|
|
84
|
+
var uuid_1 = require("./uuid");
|
|
85
|
+
Object.defineProperty(exports, "uuid", { enumerable: true, get: function () { return uuid_1.uuid; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const mem: () => Promise<any>;
|
package/dist/bsd/mem.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mem = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const defaults_1 = require("../common/defaults");
|
|
6
|
+
const exec_1 = require("../common/exec");
|
|
7
|
+
const mem = async () => {
|
|
8
|
+
await (0, common_1.nextTick)();
|
|
9
|
+
const defaults = (0, common_1.cloneObj)(defaults_1.initMemData);
|
|
10
|
+
try {
|
|
11
|
+
const { stdout } = await (0, exec_1.execSave)('/sbin/sysctl -i hw.realmem hw.physmem vm.stats.vm.v_page_count vm.stats.vm.v_wire_count vm.stats.vm.v_active_count vm.stats.vm.v_inactive_count vm.stats.vm.v_cache_count vm.stats.vm.v_free_count vm.stats.vm.v_page_size');
|
|
12
|
+
const lines = stdout.toString().split('\n');
|
|
13
|
+
const pagesize = parseInt((0, common_1.getValue)(lines, 'vm.stats.vm.v_page_size'), 10);
|
|
14
|
+
const inactive = parseInt((0, common_1.getValue)(lines, 'vm.stats.vm.v_inactive_count'), 10) * pagesize;
|
|
15
|
+
const cache = parseInt((0, common_1.getValue)(lines, 'vm.stats.vm.v_cache_count'), 10) * pagesize;
|
|
16
|
+
const free = parseInt((0, common_1.getValue)(lines, 'vm.stats.vm.v_free_count'), 10) * pagesize;
|
|
17
|
+
const buffcache = inactive + cache;
|
|
18
|
+
let total = parseInt((0, common_1.getValue)(lines, 'hw.realmem'), 10);
|
|
19
|
+
if (isNaN(total)) {
|
|
20
|
+
total = parseInt((0, common_1.getValue)(lines, 'hw.physmem'), 10);
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
...defaults,
|
|
24
|
+
total,
|
|
25
|
+
free,
|
|
26
|
+
buffcache,
|
|
27
|
+
available: buffcache + free,
|
|
28
|
+
active: total - free - buffcache,
|
|
29
|
+
swaptotal: 0,
|
|
30
|
+
swapfree: 0,
|
|
31
|
+
swapused: 0
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
catch { }
|
|
35
|
+
return defaults;
|
|
36
|
+
};
|
|
37
|
+
exports.mem = mem;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.networkStats = void 0;
|
|
4
|
+
const exec_1 = require("../common/exec");
|
|
5
|
+
const common_1 = require("../common");
|
|
6
|
+
const security_1 = require("../common/security");
|
|
7
|
+
const defaults_1 = require("../common/defaults");
|
|
8
|
+
const darwin_1 = require("../darwin");
|
|
9
|
+
const network_1 = require("../common/network");
|
|
10
|
+
const _network = {};
|
|
11
|
+
const networkStatsSingle = async (iface) => {
|
|
12
|
+
const defaults = defaults_1.initNetworkSpeed;
|
|
13
|
+
if (!_network[iface] || (_network[iface] && !_network[iface].ms) || (_network[iface] && _network[iface].ms && Date.now() - _network[iface].ms >= 500)) {
|
|
14
|
+
let operstate = 'unknown';
|
|
15
|
+
let rx_bytes = 0;
|
|
16
|
+
let tx_bytes = 0;
|
|
17
|
+
let rx_dropped = 0;
|
|
18
|
+
let rx_errors = 0;
|
|
19
|
+
let tx_dropped = 0;
|
|
20
|
+
let tx_errors = 0;
|
|
21
|
+
const { stdout } = await (0, exec_1.execSave)(`netstat -ibndI ${iface}`);
|
|
22
|
+
if (stdout) {
|
|
23
|
+
const lines = stdout.split('\n');
|
|
24
|
+
for (let i = 1; i < lines.length; i++) {
|
|
25
|
+
const line = lines[i].replace(/ +/g, ' ').split(' ');
|
|
26
|
+
if (line && line[0] && line[7] && line[10]) {
|
|
27
|
+
rx_bytes = rx_bytes + (0, common_1.toInt)(line[7]);
|
|
28
|
+
if (line[6].trim() !== '-') {
|
|
29
|
+
rx_dropped = rx_dropped + (0, common_1.toInt)(line[6]);
|
|
30
|
+
}
|
|
31
|
+
if (line[5].trim() !== '-') {
|
|
32
|
+
rx_errors = rx_errors + (0, common_1.toInt)(line[5]);
|
|
33
|
+
}
|
|
34
|
+
tx_bytes = tx_bytes + (0, common_1.toInt)(line[10]);
|
|
35
|
+
if (line[12] && line[12].trim() !== '-') {
|
|
36
|
+
tx_dropped = tx_dropped + (0, common_1.toInt)(line[12]);
|
|
37
|
+
}
|
|
38
|
+
if (line[9].trim() !== '-') {
|
|
39
|
+
tx_errors = tx_errors + (0, common_1.toInt)(line[9]);
|
|
40
|
+
}
|
|
41
|
+
operstate = 'up';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return (0, network_1.calcNetworkSpeed)(iface, rx_bytes, tx_bytes, rx_dropped, rx_errors, tx_dropped, tx_errors, operstate, _network);
|
|
45
|
+
}
|
|
46
|
+
return defaults;
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
return {
|
|
50
|
+
...defaults,
|
|
51
|
+
rx_bytes: _network[iface].rx_bytes,
|
|
52
|
+
tx_bytes: _network[iface].tx_bytes,
|
|
53
|
+
rx_sec: _network[iface].rx_sec,
|
|
54
|
+
tx_sec: _network[iface].tx_sec,
|
|
55
|
+
rx_dropped: _network[iface].rx_dropped,
|
|
56
|
+
tx_dropped: _network[iface].tx_dropped,
|
|
57
|
+
rx_errors: _network[iface].rx_errors,
|
|
58
|
+
tx_errors: _network[iface].tx_errors,
|
|
59
|
+
ms: _network[iface].last_ms,
|
|
60
|
+
operstate: _network[iface].operstate
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const networkStats = async (interfaces) => {
|
|
65
|
+
await (0, common_1.nextTick)();
|
|
66
|
+
const result = [];
|
|
67
|
+
let interfacesArray = [];
|
|
68
|
+
const interfacesSanitized = (0, security_1.sanitizeInterfacesString)(interfaces);
|
|
69
|
+
if (interfacesSanitized === '-') {
|
|
70
|
+
return result;
|
|
71
|
+
}
|
|
72
|
+
if (interfacesSanitized === '*') {
|
|
73
|
+
const allIFaces = await (0, darwin_1.networkInterfaces)('', false);
|
|
74
|
+
for (const iface of allIFaces || []) {
|
|
75
|
+
interfacesArray.push(iface.iface);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
interfacesArray = interfacesSanitized.split('|');
|
|
80
|
+
}
|
|
81
|
+
const workload = [];
|
|
82
|
+
for (const iface of interfacesArray) {
|
|
83
|
+
workload.push(networkStatsSingle(iface.trim()));
|
|
84
|
+
}
|
|
85
|
+
if (workload.length) {
|
|
86
|
+
return await Promise.all(workload);
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
return result;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
exports.networkStats = networkStats;
|