diff --git a/docs/filesystem.html b/docs/filesystem.html index c405e14..c38b181 100644 --- a/docs/filesystem.html +++ b/docs/filesystem.html @@ -235,6 +235,37 @@
const si = require('systeminformation');
+si.diskLayout().then(data => console.log(data));
+
+[
+ {
+ device: '/dev/nvme0n1',
+ type: 'NVMe',
+ name: 'SAMSUNG xxxxxxxxxxxx-xxxx',
+ vendor: 'Samsung',
+ size: 1024209543168,
+ bytesPerSector: -1,
+ totalCylinders: -1,
+ totalHeads: -1,
+ totalSectors: -1,
+ totalTracks: -1,
+ tracksPerCylinder: -1,
+ sectorsPerTrack: -1,
+ firmwareRevision: '',
+ serialNum: '...serial....',
+ interfaceType: 'PCIe',
+ smartStatus: 'unknown'
+ },
+ {
+ ...
+ }
+]
+ const si = require('systeminformation');
+si.blockDevices().then(data => console.log(data));
+
+[
+ {
+ name: 'nvme0n1',
+ type: 'disk',
+ fstype: '',
+ mount: '',
+ size: 1024209543168,
+ physical: 'SSD',
+ uuid: '',
+ label: '',
+ model: 'SAMSUNG xxxxxxxxxxxx-xxxx',
+ serial: '... serial ...',
+ removable: false,
+ protocol: 'nvme',
+ group: undefined
+ },
+ {
+ ...
+ }
+]
+ const si = require('systeminformation');
+setInterval(function() {
+ si.disksIO().then(data => {
+ console.log(data);
+ })
+}, 1000)
+
+{ // first call
+ rIO: 899825,
+ wIO: 932331,
+ tIO: 1832156,
+ rIO_sec: -1,
+ wIO_sec: -1,
+ tIO_sec: -1,
+ ms: 0
+}
+{ // second call
+ rIO: 899863,
+ wIO: 932331,
+ tIO: 1832194,
+ rIO_sec: 38.5395537525355,
+ wIO_sec: 0,
+ tIO_sec: 38.5395537525355,
+ ms: 986
+}...
+ const si = require('systeminformation');
+si.fsSize().then(data => console.log(data));
+
+[
+ {
+ fs: '/dev/md2',
+ type: 'ext4',
+ size: 972577361920,
+ used: 59142635520,
+ use: 6.08,
+ mount: '/'
+ },
+ {
+ ...
+ }
+]
+ const si = require('systeminformation');
+si.fsOpenFiles().then(data => console.log(data));
+
+{
+ max: 6566555,
+ allocated: 1856,
+ available: 0
+}
+ const si = require('systeminformation');
+setInterval(function() {
+ si.fsStats().then(data => {
+ console.log(data);
+ })
+}, 1000)
+
+{ // first call
+ rx: 14015849472,
+ wx: 15316003328,
+ tx: 29331852800,
+ rx_sec: -1,
+ wx_sec: -1,
+ tx_sec: -1,
+ ms: 0
+}
+{ // second call
+ rx: 14015849472,
+ wx: 15316007424,
+ tx: 29331856896,
+ rx_sec: 0,
+ wx_sec: 4083.748753738784,
+ tx_sec: 4083.748753738784,
+ ms: 1003
+}...
+ const si = require('systeminformation');
+si.networkInterfaces().then(data => console.log(data));
+
+[
+ {
+ iface: 'lo0',
+ ifaceName: 'lo0',
+ ip4: '127.0.0.1',
+ ip6: '::1',
+ mac: '',
+ internal: true,
+ virtual: false,
+ operstate: 'down',
+ type: 'wired',
+ duplex: 'full',
+ mtu: 16384,
+ speed: -1,
+ dhcp: false,
+ dnsSuffix: '',
+ ieee8021xAuth: '',
+ ieee8021xState: '',
+ carrierChanges: 0
+ },
+ {
+ iface: 'en0',
+ ifaceName: 'en0',
+ ip4: '192.168.0.27',
+ ip6: 'fe80::134a:1e43:abc5:d413',
+ mac: 'xx:xx:xx:xx:xx:xx',
+ internal: false,
+ virtual: false,
+ operstate: 'up',
+ type: 'wired',
+ duplex: 'full',
+ mtu: 1500,
+ speed: 1000,
+ dhcp: true,
+ dnsSuffix: '',
+ ieee8021xAuth: '',
+ ieee8021xState: '',
+ carrierChanges: 0
+ }, ...
+]
+ const si = require('systeminformation');
+si.networkInterfaceDefault().then(data => console.log(data));
+ +eth0+
const si = require('systeminformation');
+si.networkGatewayDefault().then(data => console.log(data));
+ +192.168.0.1+
const si = require('systeminformation');
+setInterval(function() {
+ si.networkStats().then(data => {
+ console.log(data);
+ })
+}, 1000)
+
+[
+ { // first call
+ iface: 'en0',
+ operstate: 'up',
+ rx_bytes: 1752866207,
+ rx_dropped: 0,
+ rx_errors: 0,
+ tx_bytes: 180934681,
+ tx_dropped: 0,
+ tx_errors: 0,
+ rx_sec: -1,
+ tx_sec: -1,
+ ms: 0
+ }
+]
+[
+ { // second call
+ iface: 'en0',
+ operstate: 'up',
+ rx_bytes: 1752866822,
+ rx_dropped: 0,
+ rx_errors: 0,
+ tx_bytes: 180939820,
+ tx_dropped: 0,
+ tx_errors: 0,
+ rx_sec: 624.3654822335026,
+ tx_sec: 5217.258883248731,
+ ms: 985
+ }
+]...
+ const si = require('systeminformation');
+si.networkConnections().then(data => console.log(data));
+
+[
+ {
+ protocol: 'tcp4',
+ localaddress: '192.168.0.27',
+ localport: '55788',
+ peeraddress: '163.128.xxx.xxx',
+ peerport: '443',
+ state: 'CLOSE_WAIT',
+ pid: 702,
+ process: ''
+ },
+ {
+ protocol: 'tcp4',
+ localaddress: '192.168.0.27',
+ localport: '55761',
+ peeraddress: '148.253.xxx.xxx',
+ peerport: '22',
+ state: 'ESTABLISHED',
+ pid: 7267,
+ process: ''
+ },
+ ...
+]
+ const si = require('systeminformation');
+si.inetChecksite('google.com').then(data => console.log(data));
+
+{
+ url: 'google.com',
+ ok: true,
+ status: 301,
+ ms: 82
+}
+ const si = require('systeminformation');
+si.inetLatency().then(data => console.log(data));
+ +13.484+
const si = require('systeminformation');
+si.wifiNetworks().then(data => console.log(data));
+
+[
+ {
+ ssid: 'INTERNAL-WIFI',
+ bssid: 'ab:01:14:4f:d3:82',
+ mode: '',
+ channel: 44,
+ frequency: 5220,
+ signalLevel: -68,
+ quality: 64,
+ security: [ 'WPA', 'WPA2' ],
+ wpaFlags: [ 'PSK/TKIP/TKIP', 'PSK/AES/TKIP' ],
+ rsnFlags: []
+ },
+ {
+ ssid: 'FREE Wifi',
+ bssid: 'aa:14:e5:16:97:f3',
+ mode: '',
+ channel: 44,
+ frequency: 5220,
+ signalLevel: -50,
+ quality: 100,
+ security: [ 'WPA', 'WPA2' ],
+ wpaFlags: [ 'PSK/TKIP/TKIP', 'PSK/AES/TKIP' ],
+ rsnFlags: []
+ },
+ ...
+]
+