linux_stat 0.9.2 → 1.1.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51a901fa3464ea37e42bdc1f798be4feb01bbdf58bc3c00c939166c302f65fc7
4
- data.tar.gz: 8edfc5a3d31ae3be01848ad0984314702940e34ad14bbb7016144f2208f9bfb2
3
+ metadata.gz: 86307b8ccfb101dbd829b5fdf36d6c9bf4eaffb555e1387311f34f10d5cb748e
4
+ data.tar.gz: 5576fa510cffef8567df558cd096afe91ccb5afa536532f5625f04be19279ae6
5
5
  SHA512:
6
- metadata.gz: 2ebcdc193d240a363b7563ddac6c4de631927bd2617f5ec69a7cf4858cda63ec3e712b1b518625729a875b676b74bdf1ca5e6522bbf78bda10eb7abf8aff0efb
7
- data.tar.gz: a5903aa2b5a941ac23fb090c6577997383bb8435a41d8c52a4532c174e910b5901a94687a55373bf0f9b0ae87faf91547c1d30507781bbd8b3401e792ad05549
6
+ metadata.gz: c6960ddec53d610b61e44de4c7432f4e05fb00c7588629924fd34d17d711357c00867bd80c48497082332507879c6b7ad5472f0b66f188fab14d34d0d491d579
7
+ data.tar.gz: 1f31b0c48520ec826bc9b74fb48e5d752fb61aedab841911c2de92e9027861226ebafb03e210fea67667b5d1ab8b68a271f7859fe2ae2acd25b5f50efc9e2c7d
data/README.md CHANGED
@@ -153,7 +153,7 @@ LinuxStat::Battery.technology()
153
153
  # File: battery.rb | Line: 160
154
154
  # Definition: def voltage_now
155
155
  LinuxStat::Battery.voltage_now()
156
- => 12.561
156
+ => 12.541
157
157
 
158
158
  ```
159
159
 
@@ -177,7 +177,7 @@ LinuxStat::CPU.count_online()
177
177
  # File: cpu.rb | Line: 197
178
178
  # Definition: def cur_freq
179
179
  LinuxStat::CPU.cur_freq()
180
- => {"cpu0"=>2000033, "cpu1"=>2000014, "cpu2"=>2000085, "cpu3"=>2000299}
180
+ => {"cpu0"=>2000006, "cpu1"=>2000050, "cpu2"=>2000024, "cpu3"=>2000195}
181
181
 
182
182
  # File: cpu.rb | Line: 265
183
183
  # Definition: def governor
@@ -212,29 +212,29 @@ LinuxStat::CPU.online()
212
212
  # File: cpu.rb | Line: 23
213
213
  # Definition: def stat(sleep = ticks_to_ms_t5)
214
214
  LinuxStat::CPU.stat(sleep)
215
- => {0=>14.29, 1=>20.0, 2=>20.0, 3=>16.67, 4=>0.0}
215
+ => {0=>9.52, 1=>0.0, 2=>0.0, 3=>0.0, 4=>0.0}
216
216
 
217
217
  # File: cpu.rb | Line: 63
218
218
  # Definition: def total_usage(sleep = ticks_to_ms_t5)
219
219
  LinuxStat::CPU.total_usage(sleep)
220
- => 5.26
220
+ => 0.0
221
221
 
222
222
  # File: cpu.rb | Line: 63
223
223
  # Definition: def total_usage(sleep = ticks_to_ms_t5)
224
224
  LinuxStat::CPU.usage(sleep)
225
- => 5.26
225
+ => 14.29
226
226
 
227
227
  # File: cpu.rb | Line: 23
228
228
  # Definition: def stat(sleep = ticks_to_ms_t5)
229
229
  LinuxStat::CPU.usages(sleep)
230
- => {0=>10.0, 1=>20.0, 2=>16.67, 3=>16.67, 4=>16.67}
230
+ => {0=>5.0, 1=>0.0, 2=>20.0, 3=>20.0, 4=>16.67}
231
231
 
232
232
  ```
233
233
 
234
234
  ### LinuxStat::FS
235
235
  ```
236
236
  LinuxStat::FS.stat(arg = "/")
237
- => {:block_size=>4096, :fragment_size=>4096, :blocks=>29292283, :block_free=>12254480, :block_avail_unpriv=>12254480, :inodes=>58612160, :free_inodes=>56866575, :filesystem_id=>2050, :mount_flags=>1024, :max_filename_length=>255}
237
+ => {:block_size=>4096, :fragment_size=>4096, :blocks=>29292283, :block_free=>10607830, :block_avail_unpriv=>10607830, :inodes=>58612160, :free_inodes=>56826206, :filesystem_id=>2050, :mount_flags=>1024, :max_filename_length=>255}
238
238
 
239
239
  ```
240
240
 
@@ -243,22 +243,22 @@ LinuxStat::FS.stat(arg = "/")
243
243
  # File: filesystem.rb | Line: 92
244
244
  # Definition: def available(fs = ?..freeze)
245
245
  LinuxStat::Filesystem.available(fs)
246
- => 50194350080
246
+ => 43449671680
247
247
 
248
248
  # File: filesystem.rb | Line: 58
249
249
  # Definition: def free(fs = ?..freeze)
250
250
  LinuxStat::Filesystem.free(fs)
251
- => 50194350080
251
+ => 43449671680
252
252
 
253
253
  # File: filesystem.rb | Line: 19
254
254
  # Definition: def stat(fs = ?..freeze)
255
255
  LinuxStat::Filesystem.stat(fs)
256
- => {:total=>119981191168, :free=>50194350080, :used=>69786841088}
256
+ => {:total=>119981191168, :free=>43449671680, :used=>76531519488}
257
257
 
258
258
  # File: filesystem.rb | Line: 108
259
259
  # Definition: def stat_raw(fs = ?..freeze)
260
260
  LinuxStat::Filesystem.stat_raw(fs)
261
- => {:block_size=>4096, :fragment_size=>4096, :blocks=>29292283, :block_free=>12254480, :block_avail_unpriv=>12254480, :inodes=>58612160, :free_inodes=>56866575, :filesystem_id=>2050, :mount_flags=>1024, :max_filename_length=>255}
261
+ => {:block_size=>4096, :fragment_size=>4096, :blocks=>29292283, :block_free=>10607830, :block_avail_unpriv=>10607830, :inodes=>58612160, :free_inodes=>56826206, :filesystem_id=>2050, :mount_flags=>1024, :max_filename_length=>255}
262
262
 
263
263
  # File: filesystem.rb | Line: 39
264
264
  # Definition: def total(fs = ?..freeze)
@@ -268,7 +268,7 @@ LinuxStat::Filesystem.total(fs)
268
268
  # File: filesystem.rb | Line: 73
269
269
  # Definition: def used(fs = ?..freeze)
270
270
  LinuxStat::Filesystem.used(fs)
271
- => 69786841088
271
+ => 76531519488
272
272
 
273
273
  ```
274
274
 
@@ -277,12 +277,12 @@ LinuxStat::Filesystem.used(fs)
277
277
  # File: kernel.rb | Line: 86
278
278
  # Definition: def build_date
279
279
  LinuxStat::Kernel.build_date()
280
- => 2020-11-20 07:44:55 +0000
280
+ => 2020-12-24 18:28:16 +0000
281
281
 
282
282
  # File: kernel.rb | Line: 140
283
283
  # Definition: def build_date_string
284
284
  LinuxStat::Kernel.build_date_string()
285
- => "20 Nov 2020 07:44:55 +0000"
285
+ => "24 Dec 2020 18:28:16 +0000"
286
286
 
287
287
  # File: kernel.rb | Line: 21
288
288
  # Definition: def build_user
@@ -307,12 +307,12 @@ LinuxStat::Kernel.compiler_version()
307
307
  # File: kernel.rb | Line: 10
308
308
  # Definition: def version
309
309
  LinuxStat::Kernel.release()
310
- => "5.9.9-xanmod1-1"
310
+ => "5.10.2-xanmod1-cacule-1-cacule"
311
311
 
312
312
  # File: kernel.rb | Line: 169
313
313
  # Definition: def string
314
314
  LinuxStat::Kernel.string()
315
- => "Linux version 5.9.9-xanmod1-1 (souravgoswami@archlinux) (gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35.1) #1 SMP PREEMPT Fri, 20 Nov 2020 07:44:55 +0000"
315
+ => "Linux version 5.10.2-xanmod1-cacule-1-cacule (souravgoswami@archlinux) (gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35.1) #1 SMP PREEMPT Thu, 24 Dec 2020 18:28:16 +0000"
316
316
 
317
317
  # File: kernel.rb | Line: 179
318
318
  # Definition: def ticks
@@ -322,7 +322,7 @@ LinuxStat::Kernel.ticks()
322
322
  # File: kernel.rb | Line: 10
323
323
  # Definition: def version
324
324
  LinuxStat::Kernel.version()
325
- => "5.9.9-xanmod1-1"
325
+ => "5.10.2-xanmod1-cacule-1-cacule"
326
326
 
327
327
  ```
328
328
 
@@ -331,32 +331,32 @@ LinuxStat::Kernel.version()
331
331
  # File: memory.rb | Line: 50
332
332
  # Definition: def available
333
333
  LinuxStat::Memory.available()
334
- => 1137124
334
+ => 1000240
335
335
 
336
336
  # File: memory.rb | Line: 81
337
337
  # Definition: def percent_available
338
338
  LinuxStat::Memory.percent_available()
339
- => 29.64
339
+ => 26.07
340
340
 
341
341
  # File: memory.rb | Line: 70
342
342
  # Definition: def percent_used
343
343
  LinuxStat::Memory.percent_used()
344
- => 70.36
344
+ => 73.93
345
345
 
346
346
  # File: memory.rb | Line: 11
347
347
  # Definition: def stat
348
348
  LinuxStat::Memory.stat()
349
- => {:total=>3836228, :used=>2699104, :available=>1137124, :percent_used=>70.36, :percent_available=>29.64}
349
+ => {:total=>3836036, :used=>2835796, :available=>1000240, :percent_used=>73.93, :percent_available=>26.07}
350
350
 
351
351
  # File: memory.rb | Line: 40
352
352
  # Definition: def total
353
353
  LinuxStat::Memory.total()
354
- => 3836228
354
+ => 3836036
355
355
 
356
356
  # File: memory.rb | Line: 60
357
357
  # Definition: def used
358
358
  LinuxStat::Memory.used()
359
- => 2699104
359
+ => 2835796
360
360
 
361
361
  ```
362
362
 
@@ -365,7 +365,7 @@ LinuxStat::Memory.used()
365
365
  # File: mounts.rb | Line: 179
366
366
  # Definition: def device_stat(dev = root)
367
367
  LinuxStat::Mounts.device_stat(dev)
368
- => {:mountpoint=>"/", :total=>119981191168, :free=>50194350080, :available=>50194350080, :used=>69786841088, :percent_used=>58.16, :percent_free=>41.84, :percent_available=>41.84}
368
+ => {:mountpoint=>"/", :total=>119981191168, :free=>43449671680, :available=>43449671680, :used=>76531519488, :percent_used=>63.79, :percent_free=>36.21, :percent_available=>36.21}
369
369
 
370
370
  # File: mounts.rb | Line: 137
371
371
  # Definition: def devices_stat
@@ -375,17 +375,17 @@ LinuxStat::Mounts.devices_stat()
375
375
  # File: mounts.rb | Line: 11
376
376
  # Definition: def list
377
377
  LinuxStat::Mounts.list()
378
- => ["proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0", "sys /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0", "dev /dev devtmpfs rw,nosuid,relatime,size=1892900k,nr_inodes=473225,mode=755 0 0", "run /run tmpfs rw,nosuid,nodev,relatime,mode=755 0 0", "...
378
+ => ["proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0", "sys /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0", "dev /dev devtmpfs rw,nosuid,relatime,size=1909256k,nr_inodes=477314,mode=755,inode64 0 0", "run /run tmpfs rw,nosuid,nodev,relatime,mode=755...
379
379
 
380
380
  # File: mounts.rb | Line: 20
381
381
  # Definition: def list_devices
382
382
  LinuxStat::Mounts.list_devices()
383
- => ["proc", "sys", "dev", "run", "/dev/sda2", "securityfs", "tmpfs", "devpts", "tmpfs", "cgroup2", "cgroup", "pstore", "none", "cgroup", "cgroup", "cgroup", "cgroup", "cgroup", "cgroup", "cgroup", "cgroup", "cgroup", "cgroup", "cgroup", "systemd-1", "hug...
383
+ => ["proc", "sys", "dev", "run", "/dev/sda2", "securityfs", "tmpfs", "devpts", "tmpfs", "cgroup2", "cgroup", "pstore", "none", "cgroup", "cgroup", "cgroup", "cgroup", "cgroup", "cgroup", "cgroup", "cgroup", "cgroup", "cgroup", "cgroup", "systemd-1", "mqu...
384
384
 
385
385
  # File: mounts.rb | Line: 109
386
386
  # Definition: def list_devices_mount_point
387
387
  LinuxStat::Mounts.list_devices_mount_point()
388
- => {"proc"=>"/proc", "sys"=>"/sys", "dev"=>"/dev", "run"=>"/run", "/dev/sda2"=>"/", "securityfs"=>"/sys/kernel/security", "tmpfs"=>"/run/user/1000", "devpts"=>"/dev/pts", "cgroup2"=>"/sys/fs/cgroup/unified", "cgroup"=>"/sys/fs/cgroup/freezer", "pstore"=>...
388
+ => {"proc"=>"/proc", "sys"=>"/sys", "dev"=>"/dev", "run"=>"/run", "/dev/sda2"=>"/", "securityfs"=>"/sys/kernel/security", "tmpfs"=>"/run/user/1000", "devpts"=>"/dev/pts", "cgroup2"=>"/sys/fs/cgroup/unified", "cgroup"=>"/sys/fs/cgroup/pids", "pstore"=>"/s...
389
389
 
390
390
  # File: mounts.rb | Line: 80
391
391
  # Definition: def mount_point(dev = root)
@@ -410,38 +410,38 @@ LinuxStat::Mounts.root_mount_options()
410
410
  # File: mounts.rb | Line: 56
411
411
  # Definition: def tmpfs
412
412
  LinuxStat::Mounts.tmpfs()
413
- => {"/dev/shm"=>"tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0", "/sys/fs/cgroup"=>"tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,size=4096k,nr_inodes=1024,mode=755 0 0", "/cache"=>"tmpfs /cache tmpfs rw,nosuid,nodev,relatime,size=2097152k 0 0", "/ramdisk...
413
+ => {"/dev/shm"=>"tmpfs /dev/shm tmpfs rw,nosuid,nodev,inode64 0 0", "/sys/fs/cgroup"=>"tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,size=4096k,nr_inodes=1024,mode=755,inode64 0 0", "/tmp"=>"tmpfs /tmp tmpfs rw,nosuid,nodev,relatime,size=4194304k,ino...
414
414
 
415
415
  ```
416
416
 
417
417
  ### LinuxStat::Net
418
418
  ```
419
- # File: net.rb | Line: 80
419
+ # File: net.rb | Line: 84
420
420
  # Definition: def usage(interval = 0.1)
421
421
  LinuxStat::Net.current_usage(interval)
422
- => {:received=>1020.0, :transmitted=>940.0}
422
+ => {:received=>0.0, :transmitted=>0.0}
423
423
 
424
424
  # File: net.rb | Line: 10
425
425
  # Definition: def ipv4_private
426
426
  LinuxStat::Net.ipv4_private()
427
427
  => "192.168.0.102"
428
428
 
429
- # File: net.rb | Line: 23
429
+ # File: net.rb | Line: 25
430
430
  # Definition: def total_bytes
431
431
  LinuxStat::Net.total_bytes()
432
- => {:received=>336164612, :transmitted=>69471921}
432
+ => {:received=>4509667469, :transmitted=>172614974}
433
433
 
434
- # File: net.rb | Line: 41
434
+ # File: net.rb | Line: 43
435
435
  # Definition: def total_bytes_received
436
436
  LinuxStat::Net.total_bytes_received()
437
- => 336164612
437
+ => 4509667469
438
438
 
439
- # File: net.rb | Line: 54
439
+ # File: net.rb | Line: 56
440
440
  # Definition: def total_bytes_transmitted
441
441
  LinuxStat::Net.total_bytes_transmitted()
442
- => 69471921
442
+ => 172614974
443
443
 
444
- # File: net.rb | Line: 80
444
+ # File: net.rb | Line: 84
445
445
  # Definition: def usage(interval = 0.1)
446
446
  LinuxStat::Net.usage(interval)
447
447
  => {:received=>0.0, :transmitted=>0.0}
@@ -450,45 +450,69 @@ LinuxStat::Net.usage(interval)
450
450
 
451
451
  ### LinuxStat::OS
452
452
  ```
453
- # File: os.rb | Line: 97
453
+ # File: os.rb | Line: 99
454
454
  # Definition: def bits
455
455
  LinuxStat::OS.bits()
456
456
  => 64
457
457
 
458
- # File: os.rb | Line: 42
458
+ # File: os.rb | Line: 44
459
459
  # Definition: def distribution
460
460
  LinuxStat::OS.distribution()
461
461
  => "Arch Linux"
462
462
 
463
- # File: os.rb | Line: 81
463
+ # File: os.rb | Line: 83
464
464
  # Definition: def hostname
465
465
  LinuxStat::OS.hostname()
466
466
  => "archlinux"
467
467
 
468
- # File: os.rb | Line: 30
468
+ # File: os.rb | Line: 33
469
469
  # Definition: def lsb_release
470
470
  LinuxStat::OS.lsb_release()
471
471
  => {:LSB_VERSION=>"1.4", :DISTRIB_ID=>"Arch", :DISTRIB_RELEASE=>"rolling", :DISTRIB_DESCRIPTION=>"Arch Linux"}
472
472
 
473
- # File: os.rb | Line: 64
473
+ # File: os.rb | Line: 66
474
474
  # Definition: def machine
475
475
  LinuxStat::OS.machine()
476
476
  => "x86_64"
477
477
 
478
- # File: os.rb | Line: 72
478
+ # File: os.rb | Line: 74
479
479
  # Definition: def nodename
480
480
  LinuxStat::OS.nodename()
481
481
  => "archlinux"
482
482
 
483
- # File: os.rb | Line: 15
483
+ # File: os.rb | Line: 17
484
484
  # Definition: def os_release
485
485
  LinuxStat::OS.os_release()
486
486
  => {:NAME=>"Arch Linux", :PRETTY_NAME=>"Arch Linux", :ID=>"arch", :BUILD_ID=>"rolling", :ANSI_COLOR=>"38;2;23;147;209", :HOME_URL=>"https://www.archlinux.org/", :DOCUMENTATION_URL=>"https://wiki.archlinux.org/", :SUPPORT_URL=>"https://bbs.archlinux.org/"...
487
487
 
488
- # File: os.rb | Line: 110
488
+ # File: os.rb | Line: 114
489
489
  # Definition: def uptime
490
490
  LinuxStat::OS.uptime()
491
- => {:hour=>12, :minute=>11, :second=>45.16}
491
+ => {:hour=>8, :minute=>50, :second=>58.38}
492
+
493
+ ```
494
+
495
+ ### LinuxStat::PCI
496
+ ```
497
+ # File: pci.rb | Line: 211
498
+ # Definition: def count
499
+ LinuxStat::PCI.count()
500
+ => 13
501
+
502
+ # File: pci.rb | Line: 211
503
+ # Definition: def count
504
+ LinuxStat::PCI.count_devices()
505
+ => 13
506
+
507
+ # File: pci.rb | Line: 52
508
+ # Definition: def devices_info(hwdata: true)
509
+ LinuxStat::PCI.devices_info(hwdata:)
510
+ => [{:id=>"8086:1904", :vendor=>"8086", :device=>"1904", :irq=>0, :kernel_driver=>"skl_uncore", :hwdata=>{:vendor=>"Intel Corporation", :product=>"Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers"}}, {:id=>"8086:1916", :vendor...
511
+
512
+ # File: pci.rb | Line: 128
513
+ # Definition: def devices_stat(hwdata: true)
514
+ LinuxStat::PCI.devices_stat(hwdata:)
515
+ => [{:path=>"/sys/bus/pci/devices/0000:00:00.0/", :id=>"8086:1904", :vendor=>"8086", :device=>"1904", :sub_vendor=>"1028", :sub_device=>"077d", :kernel_driver=>"skl_uncore", :revision=>"0x08", :irq=>0, :enable=>false, :hwdata=>{:vendor=>"Intel Corporatio...
492
516
 
493
517
  ```
494
518
 
@@ -496,23 +520,23 @@ LinuxStat::OS.uptime()
496
520
  ```
497
521
  # File: prettify_bytes.rb | Line: 42
498
522
  # Definition: def convert_binary(n)
499
- LinuxStat::PrettifyBytes.convert_binary(n = 122600299243524)
500
- => "111.50 tebibytes"
523
+ LinuxStat::PrettifyBytes.convert_binary(n = 339049244499630)
524
+ => "308.36 tebibytes"
501
525
 
502
526
  # File: prettify_bytes.rb | Line: 19
503
527
  # Definition: def convert_decimal(n)
504
- LinuxStat::PrettifyBytes.convert_decimal(n = 610088277227728)
505
- => "610.09 terabytes"
528
+ LinuxStat::PrettifyBytes.convert_decimal(n = 963970414034560)
529
+ => "963.97 terabytes"
506
530
 
507
531
  # File: prettify_bytes.rb | Line: 90
508
532
  # Definition: def convert_short_binary(n)
509
- LinuxStat::PrettifyBytes.convert_short_binary(n = 117789985929175)
510
- => "107.13 TiB"
533
+ LinuxStat::PrettifyBytes.convert_short_binary(n = 954637976904599)
534
+ => "868.24 TiB"
511
535
 
512
536
  # File: prettify_bytes.rb | Line: 65
513
537
  # Definition: def convert_short_decimal(n)
514
- LinuxStat::PrettifyBytes.convert_short_decimal(n = 598923420265643)
515
- => "598.92 TB"
538
+ LinuxStat::PrettifyBytes.convert_short_decimal(n = 464855754781732)
539
+ => "464.86 TB"
516
540
 
517
541
  ```
518
542
 
@@ -521,37 +545,37 @@ LinuxStat::PrettifyBytes.convert_short_decimal(n = 598923420265643)
521
545
  # File: process.rb | Line: 19
522
546
  # Definition: def count
523
547
  LinuxStat::Process.count()
524
- => 208
548
+ => 203
525
549
 
526
550
  # File: process.rb | Line: 71
527
551
  # Definition: def idle
528
552
  LinuxStat::Process.idle()
529
- => [3, 4, 6, 9, 12, 23, 30, 37, 39, 49, 102, 103, 104, 106, 107, 108, 109, 110, 117, 119, 120, 122, 132, 135, 141, 153, 154, 170, 172, 174, 175, 178, 183, 184, 185, 186, 187, 188, 231, 263, 270, 331, 337, 5813, 9989, 16385, 17981, 18103, 18138, 18800, 18...
553
+ => [3, 4, 7, 9, 12, 23, 30, 37, 39, 45, 99, 100, 101, 104, 105, 106, 107, 108, 116, 117, 119, 122, 131, 134, 140, 152, 153, 172, 174, 176, 177, 181, 185, 186, 187, 188, 189, 190, 212, 233, 282, 339, 341, 351, 3101, 3102, 3103, 3104, 3105, 3106, 20589, 20...
530
554
 
531
555
  # File: process.rb | Line: 8
532
556
  # Definition: def list
533
557
  LinuxStat::Process.list()
534
- => [1, 2, 3, 4, 6, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 46, 47, 48, 49, 50, 51, 52, 102, 103, 104, 106, 107, 108, 109, 110, 112, 114, 115, 117, 119, 120, 122, 132, 135,...
558
+ => [1, 2, 3, 4, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 99, 100, 101, 104, 105, 106, 107, 108, 111, 113, 114, 116, 117, 119, 122, 131, 134, 140,...
535
559
 
536
560
  # File: process.rb | Line: 25
537
561
  # Definition: def names
538
562
  LinuxStat::Process.names()
539
- => {1=>"systemd", 2=>"kthreadd", 3=>"rcu_gp", 4=>"rcu_par_gp", 6=>"kworker/0:0H-kblockd", 9=>"mm_percpu_wq", 10=>"ksoftirqd/0", 11=>"rcuc/0", 12=>"rcu_preempt", 13=>"rcub/0", 14=>"migration/0", 15=>"idle_inject/0", 16=>"cpuhp/0", 17=>"cpuhp/1", 18=>"idle...
563
+ => {1=>"systemd", 2=>"kthreadd", 3=>"rcu_gp", 4=>"rcu_par_gp", 7=>"kworker/0:0H-kblockd", 9=>"mm_percpu_wq", 10=>"ksoftirqd/0", 11=>"rcuc/0", 12=>"rcu_preempt", 13=>"rcub/0", 14=>"migration/0", 15=>"idle_inject/0", 16=>"cpuhp/0", 17=>"cpuhp/1", 18=>"idle...
540
564
 
541
565
  # File: process.rb | Line: 97
542
566
  # Definition: def running
543
567
  LinuxStat::Process.running()
544
- => [20187, 20447]
568
+ => [28, 23778, 24066]
545
569
 
546
570
  # File: process.rb | Line: 58
547
571
  # Definition: def sleeping
548
572
  LinuxStat::Process.sleeping()
549
- => [1, 2, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 25, 26, 27, 28, 31, 32, 33, 34, 35, 38, 40, 41, 42, 46, 47, 48, 50, 51, 52, 112, 114, 115, 169, 171, 189, 218, 235, 308, 309, 310, 311, 326, 356, 357, 358, 359, 375, 378, 381, 408, 426, 428, 429,...
573
+ => [1, 2, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 25, 26, 27, 28, 31, 32, 33, 34, 35, 38, 40, 41, 42, 43, 44, 46, 47, 48, 111, 113, 114, 171, 173, 191, 221, 239, 309, 311, 314, 315, 316, 338, 340, 366, 367, 368, 369, 383, 386, 389, 404, 407, 411,...
550
574
 
551
575
  # File: process.rb | Line: 37
552
576
  # Definition: def types
553
577
  LinuxStat::Process.types()
554
- => {1=>:sleeping, 2=>:sleeping, 3=>:idle, 4=>:idle, 6=>:idle, 9=>:idle, 10=>:sleeping, 11=>:sleeping, 12=>:idle, 13=>:sleeping, 14=>:sleeping, 15=>:sleeping, 16=>:sleeping, 17=>:sleeping, 18=>:sleeping, 19=>:sleeping, 20=>:sleeping, 21=>:sleeping, 23=>:i...
578
+ => {1=>:sleeping, 2=>:sleeping, 3=>:idle, 4=>:idle, 7=>:idle, 9=>:idle, 10=>:sleeping, 11=>:sleeping, 12=>:idle, 13=>:sleeping, 14=>:sleeping, 15=>:sleeping, 16=>:sleeping, 17=>:sleeping, 18=>:sleeping, 19=>:sleeping, 20=>:sleeping, 21=>:sleeping, 23=>:i...
555
579
 
556
580
  # File: process.rb | Line: 84
557
581
  # Definition: def zombie
@@ -565,7 +589,7 @@ LinuxStat::Process.zombie()
565
589
  # File: process_info.rb | Line: 54
566
590
  # Definition: def cmdline(pid = $$)
567
591
  LinuxStat::ProcessInfo.cmdline(pid)
568
- => "ruby /usr/bin/linuxstat.rb -md"
592
+ => "/usr/bin/ruby /home/sourav/.gem/ruby/2.7.0/bin/linuxstat.rb -md"
569
593
 
570
594
  # File: process_info.rb | Line: 78
571
595
  # Definition: def command_name(pid = $$)
@@ -600,12 +624,12 @@ LinuxStat::ProcessInfo.last_executed_cpu(pid)
600
624
  # File: process_info.rb | Line: 114
601
625
  # Definition: def mem_stat(pid = $$)
602
626
  LinuxStat::ProcessInfo.mem_stat(pid)
603
- => {:memory=>12484.608, :virtual_memory=>84090.88, :resident_memory=>18665.472}
627
+ => {:memory=>27025.408, :virtual_memory=>98074.624, :resident_memory=>33210.368}
604
628
 
605
629
  # File: process_info.rb | Line: 147
606
630
  # Definition: def memory(pid = $$)
607
631
  LinuxStat::ProcessInfo.memory(pid)
608
- => 12484.608
632
+ => 27025.408
609
633
 
610
634
  # File: process_info.rb | Line: 607
611
635
  # Definition: def nice(pid = $$)
@@ -625,22 +649,22 @@ LinuxStat::ProcessInfo.owner(pid)
625
649
  # File: process_info.rb | Line: 197
626
650
  # Definition: def resident_memory(pid = $$)
627
651
  LinuxStat::ProcessInfo.resident_memory(pid)
628
- => 18665.472
652
+ => 33210.368
629
653
 
630
654
  # File: process_info.rb | Line: 563
631
655
  # Definition: def running_time(pid = $$)
632
656
  LinuxStat::ProcessInfo.running_time(pid)
633
- => 0.8
657
+ => 1.05
634
658
 
635
659
  # File: process_info.rb | Line: 544
636
660
  # Definition: def start_time(pid = $$)
637
661
  LinuxStat::ProcessInfo.start_time(pid)
638
- => 2020-12-23 00:57:33 +0530
662
+ => 2020-12-27 04:20:42 +0530
639
663
 
640
664
  # File: process_info.rb | Line: 513
641
665
  # Definition: def start_time_epoch(pid = $$)
642
666
  LinuxStat::ProcessInfo.start_time_epoch(pid)
643
- => 1608665253
667
+ => 1609023042
644
668
 
645
669
  # File: process_info.rb | Line: 592
646
670
  # Definition: def state(pid = $$)
@@ -660,7 +684,7 @@ LinuxStat::ProcessInfo.threads(pid)
660
684
  # File: process_info.rb | Line: 23
661
685
  # Definition: def total_io(pid = $$)
662
686
  LinuxStat::ProcessInfo.total_io(pid)
663
- => {:read_bytes=>4096, :write_bytes=>0}
687
+ => {:read_bytes=>0, :write_bytes=>0}
664
688
 
665
689
  # File: process_info.rb | Line: 446
666
690
  # Definition: def uid(pid = $$)
@@ -670,7 +694,7 @@ LinuxStat::ProcessInfo.uid(pid)
670
694
  # File: process_info.rb | Line: 172
671
695
  # Definition: def virtual_memory(pid = $$)
672
696
  LinuxStat::ProcessInfo.virtual_memory(pid)
673
- => 84090.88
697
+ => 98213.888
674
698
 
675
699
  ```
676
700
 
@@ -684,27 +708,27 @@ LinuxStat::Swap.any?()
684
708
  # File: swap.rb | Line: 68
685
709
  # Definition: def available
686
710
  LinuxStat::Swap.available()
687
- => 4058184
711
+ => 3759868
688
712
 
689
713
  # File: swap.rb | Line: 8
690
714
  # Definition: def list
691
715
  LinuxStat::Swap.list()
692
- => {"/dev/zram0"=>[:partition, 4194300, 136116, -2]}
716
+ => {"/dev/zram0"=>[:partition, 4194300, 434432, -2]}
693
717
 
694
718
  # File: swap.rb | Line: 103
695
719
  # Definition: def percent_available
696
720
  LinuxStat::Swap.percent_available()
697
- => 96.75
721
+ => 89.64
698
722
 
699
723
  # File: swap.rb | Line: 89
700
724
  # Definition: def percent_used
701
725
  LinuxStat::Swap.percent_used()
702
- => 3.25
726
+ => 10.36
703
727
 
704
728
  # File: swap.rb | Line: 32
705
729
  # Definition: def stat
706
730
  LinuxStat::Swap.stat()
707
- => {:total=>4194300, :used=>136116, :available=>4058184, :percent_used=>3.25, :percent_available=>96.75}
731
+ => {:total=>4194300, :used=>434432, :available=>3759868, :percent_used=>10.36, :percent_available=>89.64}
708
732
 
709
733
  # File: swap.rb | Line: 57
710
734
  # Definition: def total
@@ -714,14 +738,14 @@ LinuxStat::Swap.total()
714
738
  # File: swap.rb | Line: 80
715
739
  # Definition: def used
716
740
  LinuxStat::Swap.used()
717
- => 136116
741
+ => 434432
718
742
 
719
743
  ```
720
744
 
721
745
  ### LinuxStat::Sysconf
722
746
  ```
723
747
  LinuxStat::Sysconf.child_max()
724
- => nil
748
+ => 2000000
725
749
 
726
750
  LinuxStat::Sysconf.expr_nest_max()
727
751
  => 32
@@ -757,7 +781,7 @@ LinuxStat::Sysconf.pagesize()
757
781
  => 4096
758
782
 
759
783
  LinuxStat::Sysconf.posix_version()
760
- => 4201
784
+ => 200809
761
785
 
762
786
  LinuxStat::Sysconf.processor_configured()
763
787
  => 4
@@ -776,6 +800,25 @@ LinuxStat::Sysconf.tty_name_max()
776
800
 
777
801
  ```
778
802
 
803
+ ### LinuxStat::USB
804
+ ```
805
+ # File: usb.rb | Line: 135
806
+ # Definition: def count
807
+ LinuxStat::USB.count()
808
+ => 11
809
+
810
+ # File: usb.rb | Line: 135
811
+ # Definition: def count
812
+ LinuxStat::USB.count_devices()
813
+ => 11
814
+
815
+ # File: usb.rb | Line: 47
816
+ # Definition: def devices_stat(hwdata: true)
817
+ LinuxStat::USB.devices_stat(hwdata:)
818
+ => [{:path=>"/sys/bus/usb/devices/1-1.2/", :id=>"04d9:1203", :vendor_id=>"04d9", :product_id=>"1203", :bus_num=>1, :dev_num=>4, :hwdata=>{:vendor=>"Holtek Semiconductor, Inc.", :product=>"Keyboard"}, :authorized=>true, :b_max_power=>"100mA", :b_max_packe...
819
+
820
+ ```
821
+
779
822
  ### LinuxStat::Uname
780
823
  ```
781
824
  LinuxStat::Uname.machine()
@@ -785,13 +828,13 @@ LinuxStat::Uname.nodename()
785
828
  => "archlinux"
786
829
 
787
830
  LinuxStat::Uname.release()
788
- => "5.9.9-xanmod1-1"
831
+ => "5.10.2-xanmod1-cacule-1-cacule"
789
832
 
790
833
  LinuxStat::Uname.sysname()
791
834
  => "Linux"
792
835
 
793
836
  LinuxStat::Uname.version()
794
- => "#1 SMP PREEMPT Fri, 20 Nov 2020 07:44:55 +0000"
837
+ => "#1 SMP PREEMPT Thu, 24 Dec 2020 18:28:16 +0000"
795
838
 
796
839
  ```
797
840