linux_stat 1.5.1 → 2.1.2

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: 5da13d97b132a58afb5d56337e40f5a234cf129612a14886e931b5d01d2232d3
4
- data.tar.gz: dee75b59d2a8e2ab3f55e19c7e117869149d2c318fbc12e6e8a39c3d9433d418
3
+ metadata.gz: da63a14786b35b2eb286dfe55a0466d58f287b34e22d8b87213fe0e0549e7142
4
+ data.tar.gz: d184a4fb326d78d8cc375cd651b2a490963121bd3c260d3979c774744e7f35b1
5
5
  SHA512:
6
- metadata.gz: 1885696170e580ac960730d82dce2e73ca8b924211b3ee1d74c3cdde362fdaebf6fcc08a7fd49b444729186e65c68b0c15767c9baca050d0853b0460ae1ca989
7
- data.tar.gz: 8ec56355b4774c830282ca5ecb23dc3318ccc8fabd748a20af4bb0535bec6e3f0da9a3d0232ce09f58e1bf43cb9cc5917e970633dc19cc7c4b0cc9ed786df492
6
+ metadata.gz: fbeaa968b47d24698e6d21a141a07ab014673b1d6a34798ed2e1a1b3ab2d9152860b8ee53b057409345592c13ac725648448fb4fe540d3225ac67a832ef6ee09
7
+ data.tar.gz: 84a7153078308c22bcad3681c15b5fbb7e9fee9ae873379e190cae23287fd4adea5bc319c31395ae87e6e8d155fae5c66826c6db6736c9838071c5156e2b56d9
data/README.md CHANGED
@@ -16,11 +16,12 @@ Languages Used:
16
16
 
17
17
  ---
18
18
 
19
- ## Requirements:
19
+ ## Runtime Dependencies:
20
20
 
21
- Any Linux distribution with Kernel 3.14+.
21
+ 1. Kernel: Any Linux distribution with Kernel 3.14+.
22
+ 2. Ruby: Ruby 2.3.0 and above.
22
23
 
23
- ## Dependencies:
24
+ ## Build Dependencies:
24
25
  + You need to have the C compiler installed to be able to compile the C extensions.
25
26
  On Arch Linux:
26
27
  ```
@@ -29,19 +30,14 @@ On Arch Linux:
29
30
 
30
31
  On Debian based systems:
31
32
  ```
32
- # apt install gcc build-essential
33
+ # apt install gcc build-essential ruby-dev
33
34
  ```
34
35
 
35
- + You might also require ruby-dev in Debian based systems which provides support for ruby.h header file:
36
- ```
37
- # apt install ruby-dev
38
- ```
39
-
40
- + Once your are done, and you can compile the C file, you can follow the installation!
36
+ + You can remove the packages once the program is installed.
41
37
 
42
38
  ---
43
39
 
44
- ## Optional Dependencies
40
+ ## Optional Runtime Dependencies
45
41
 
46
42
  You need hwdata to decode vendor and product ids if you use LinuxStat::USB and/or LinuxStat::PCI
47
43
 
@@ -139,7 +135,7 @@ LinuxStat::Battery.charge_full_wh()
139
135
  LinuxStat::Battery.charging?()
140
136
  => true
141
137
 
142
- # File: battery.rb | Line: 186
138
+ # File: battery.rb | Line: 193
143
139
  # Definition: def devices_stat
144
140
  LinuxStat::Battery.devices_stat()
145
141
  => {:AC=>{:type=>"Mains", :online=>1}, :BAT0=>{:model=>"DELL CYMGM77", :manufacturer=>"Samsung SDI", :type=>"Battery", :status=>"Full", :capacity=>100, :voltage_min_design=>11.4, :charge_full_design=>3.684, :charge_full_design_wh=>42.0, :voltage_now=>12....
@@ -187,7 +183,7 @@ LinuxStat::Battery.technology()
187
183
  # File: battery.rb | Line: 162
188
184
  # Definition: def voltage_now
189
185
  LinuxStat::Battery.voltage_now()
190
- => 12.583
186
+ => 12.627
191
187
 
192
188
  ```
193
189
 
@@ -211,7 +207,7 @@ LinuxStat::CPU.count_online()
211
207
  # File: cpu.rb | Line: 199
212
208
  # Definition: def cur_freq
213
209
  LinuxStat::CPU.cur_freq()
214
- => {"cpu0"=>2000010, "cpu1"=>1999584, "cpu2"=>2000137, "cpu3"=>2000033}
210
+ => {"cpu0"=>2000001, "cpu1"=>2000003, "cpu2"=>2000010, "cpu3"=>1999999}
215
211
 
216
212
  # File: cpu.rb | Line: 267
217
213
  # Definition: def governor
@@ -246,29 +242,29 @@ LinuxStat::CPU.online()
246
242
  # File: cpu.rb | Line: 25
247
243
  # Definition: def stat(sleep = ticks_to_ms_t5)
248
244
  LinuxStat::CPU.stat(sleep)
249
- => {0=>5.26, 1=>16.67, 2=>16.67, 3=>0.0, 4=>20.0}
245
+ => {0=>38.89, 1=>20.0, 2=>33.33, 3=>25.0, 4=>100.0}
250
246
 
251
247
  # File: cpu.rb | Line: 65
252
248
  # Definition: def total_usage(sleep = ticks_to_ms_t5)
253
249
  LinuxStat::CPU.total_usage(sleep)
254
- => 14.29
250
+ => 45.0
255
251
 
256
252
  # File: cpu.rb | Line: 65
257
253
  # Definition: def total_usage(sleep = ticks_to_ms_t5)
258
254
  LinuxStat::CPU.usage(sleep)
259
- => 10.0
255
+ => 47.37
260
256
 
261
257
  # File: cpu.rb | Line: 25
262
258
  # Definition: def stat(sleep = ticks_to_ms_t5)
263
259
  LinuxStat::CPU.usages(sleep)
264
- => {0=>5.26, 1=>0.0, 2=>0.0, 3=>20.0, 4=>0.0}
260
+ => {0=>44.44, 1=>20.0, 2=>20.0, 3=>20.0, 4=>100.0}
265
261
 
266
262
  ```
267
263
 
268
264
  ### LinuxStat::FS
269
265
  ```
270
266
  LinuxStat::FS.stat(arg = "/")
271
- => {:block_size=>4096, :fragment_size=>4096, :blocks=>29292283, :block_free=>6091459, :block_avail_unpriv=>6091459, :inodes=>50505784, :free_inodes=>48759601, :filesystem_id=>2050, :mount_flags=>1024, :max_filename_length=>255}
267
+ => {:block_size=>4096, :fragment_size=>4096, :blocks=>29292283, :block_free=>7715553, :block_avail_unpriv=>7715553, :inodes=>58612160, :free_inodes=>56766199, :filesystem_id=>2050, :mount_flags=>1024, :max_filename_length=>255}
272
268
 
273
269
  ```
274
270
 
@@ -277,22 +273,22 @@ LinuxStat::FS.stat(arg = "/")
277
273
  # File: filesystem.rb | Line: 94
278
274
  # Definition: def available(fs = ?..freeze)
279
275
  LinuxStat::Filesystem.available(fs)
280
- => 24950616064
276
+ => 31602905088
281
277
 
282
278
  # File: filesystem.rb | Line: 60
283
279
  # Definition: def free(fs = ?..freeze)
284
280
  LinuxStat::Filesystem.free(fs)
285
- => 24950616064
281
+ => 31602905088
286
282
 
287
283
  # File: filesystem.rb | Line: 21
288
284
  # Definition: def stat(fs = ?..freeze)
289
285
  LinuxStat::Filesystem.stat(fs)
290
- => {:total=>119981191168, :free=>24950616064, :used=>95030575104}
286
+ => {:total=>119981191168, :free=>31602905088, :used=>88378286080}
291
287
 
292
288
  # File: filesystem.rb | Line: 110
293
289
  # Definition: def stat_raw(fs = ?..freeze)
294
290
  LinuxStat::Filesystem.stat_raw(fs)
295
- => {:block_size=>4096, :fragment_size=>4096, :blocks=>29292283, :block_free=>6091459, :block_avail_unpriv=>6091459, :inodes=>50505784, :free_inodes=>48759601, :filesystem_id=>2050, :mount_flags=>1024, :max_filename_length=>255}
291
+ => {:block_size=>4096, :fragment_size=>4096, :blocks=>29292283, :block_free=>7715553, :block_avail_unpriv=>7715553, :inodes=>58612160, :free_inodes=>56766199, :filesystem_id=>2050, :mount_flags=>1024, :max_filename_length=>255}
296
292
 
297
293
  # File: filesystem.rb | Line: 41
298
294
  # Definition: def total(fs = ?..freeze)
@@ -302,7 +298,7 @@ LinuxStat::Filesystem.total(fs)
302
298
  # File: filesystem.rb | Line: 75
303
299
  # Definition: def used(fs = ?..freeze)
304
300
  LinuxStat::Filesystem.used(fs)
305
- => 95030575104
301
+ => 88378286080
306
302
 
307
303
  ```
308
304
 
@@ -365,27 +361,27 @@ LinuxStat::Kernel.version()
365
361
  # File: memory.rb | Line: 62
366
362
  # Definition: def available
367
363
  LinuxStat::Memory.available()
368
- => 422660
364
+ => 310424
369
365
 
370
366
  # File: memory.rb | Line: 52
371
367
  # Definition: def free
372
368
  LinuxStat::Memory.free()
373
- => 237884
369
+ => 278680
374
370
 
375
371
  # File: memory.rb | Line: 93
376
372
  # Definition: def percent_available
377
373
  LinuxStat::Memory.percent_available()
378
- => 11.02
374
+ => 8.09
379
375
 
380
376
  # File: memory.rb | Line: 82
381
377
  # Definition: def percent_used
382
378
  LinuxStat::Memory.percent_used()
383
- => 88.98
379
+ => 91.91
384
380
 
385
381
  # File: memory.rb | Line: 13
386
382
  # Definition: def stat
387
383
  LinuxStat::Memory.stat()
388
- => {:total=>3836236, :used=>3413576, :available=>422660, :percent_used=>88.98, :percent_available=>11.02}
384
+ => {:total=>3836236, :used=>3525820, :available=>310416, :percent_used=>91.91, :percent_available=>8.09}
389
385
 
390
386
  # File: memory.rb | Line: 42
391
387
  # Definition: def total
@@ -395,7 +391,7 @@ LinuxStat::Memory.total()
395
391
  # File: memory.rb | Line: 72
396
392
  # Definition: def used
397
393
  LinuxStat::Memory.used()
398
- => 3413576
394
+ => 3525820
399
395
 
400
396
  ```
401
397
 
@@ -404,7 +400,7 @@ LinuxStat::Memory.used()
404
400
  # File: mounts.rb | Line: 181
405
401
  # Definition: def device_stat(dev = root)
406
402
  LinuxStat::Mounts.device_stat(dev)
407
- => {:mountpoint=>"/", :total=>119981191168, :free=>24950616064, :available=>24950616064, :used=>95030575104, :percent_used=>79.2, :percent_free=>20.8, :percent_available=>20.8}
403
+ => {:mountpoint=>"/", :total=>119981191168, :free=>31602905088, :available=>31602905088, :used=>88378286080, :percent_used=>73.66, :percent_free=>26.34, :percent_available=>26.34}
408
404
 
409
405
  # File: mounts.rb | Line: 139
410
406
  # Definition: def devices_stat
@@ -419,12 +415,12 @@ LinuxStat::Mounts.list()
419
415
  # File: mounts.rb | Line: 22
420
416
  # Definition: def list_devices
421
417
  LinuxStat::Mounts.list_devices()
422
- => ["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...
418
+ => ["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...
423
419
 
424
420
  # File: mounts.rb | Line: 111
425
421
  # Definition: def list_devices_mount_point
426
422
  LinuxStat::Mounts.list_devices_mount_point()
427
- => {"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...
423
+ => {"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/cpuset", "pstore"=>"...
428
424
 
429
425
  # File: mounts.rb | Line: 82
430
426
  # Definition: def mount_point(dev = root)
@@ -463,22 +459,22 @@ LinuxStat::Net.current_usage(interval)
463
459
  # File: net.rb | Line: 12
464
460
  # Definition: def ipv4_private
465
461
  LinuxStat::Net.ipv4_private()
466
- => "192.168.0.103"
462
+ => "192.168.43.107"
467
463
 
468
464
  # File: net.rb | Line: 27
469
465
  # Definition: def total_bytes
470
466
  LinuxStat::Net.total_bytes()
471
- => {:received=>719043592, :transmitted=>70236574}
467
+ => {:received=>850558466, :transmitted=>187230758}
472
468
 
473
469
  # File: net.rb | Line: 45
474
470
  # Definition: def total_bytes_received
475
471
  LinuxStat::Net.total_bytes_received()
476
- => 719043592
472
+ => 850558466
477
473
 
478
474
  # File: net.rb | Line: 58
479
475
  # Definition: def total_bytes_transmitted
480
476
  LinuxStat::Net.total_bytes_transmitted()
481
- => 70236574
477
+ => 187230758
482
478
 
483
479
  # File: net.rb | Line: 86
484
480
  # Definition: def usage(interval = 0.1)
@@ -509,10 +505,10 @@ LinuxStat::OS.distribution()
509
505
  LinuxStat::OS.hostname()
510
506
  => "archlinux"
511
507
 
512
- # File: os.rb | Line: 185
508
+ # File: os.rb | Line: 202
513
509
  # Definition: def loadavg
514
510
  LinuxStat::OS.loadavg()
515
- => {1=>0.56884765625, 5=>0.69482421875, 15=>0.9892578125}
511
+ => {1=>4.5693359375, 5=>3.85400390625, 15=>3.53515625}
516
512
 
517
513
  # File: os.rb | Line: 35
518
514
  # Definition: def lsb_release
@@ -534,15 +530,20 @@ LinuxStat::OS.nodename()
534
530
  LinuxStat::OS.os_release()
535
531
  => {: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/"...
536
532
 
537
- # File: os.rb | Line: 144
533
+ # File: os.rb | Line: 146
538
534
  # Definition: def uptime
539
535
  LinuxStat::OS.uptime()
540
- => {:hour=>11, :minute=>17, :second=>5.68}
536
+ => {:hour=>16, :minute=>52, :second=>3.39}
537
+
538
+ # File: os.rb | Line: 174
539
+ # Definition: def uptime_f
540
+ LinuxStat::OS.uptime_f()
541
+ => 60723.39
541
542
 
542
- # File: os.rb | Line: 168
543
+ # File: os.rb | Line: 185
543
544
  # Definition: def uptime_i
544
545
  LinuxStat::OS.uptime_i()
545
- => 40626
546
+ => 60724
546
547
 
547
548
  # File: os.rb | Line: 84
548
549
  # Definition: def version
@@ -594,23 +595,33 @@ LinuxStat::PCI.initialize_hwdata()
594
595
  ```
595
596
  # File: prettify_bytes.rb | Line: 49
596
597
  # Definition: def convert_binary(n, precision: 2)
597
- LinuxStat::PrettifyBytes.convert_binary(n = 137669164863821, precision:)
598
- => "125.21 tebibytes"
598
+ LinuxStat::PrettifyBytes.convert_binary(n = 630454817180687, precision:)
599
+ => "573.40 tebibytes"
599
600
 
600
601
  # File: prettify_bytes.rb | Line: 26
601
602
  # Definition: def convert_decimal(n, precision: 2)
602
- LinuxStat::PrettifyBytes.convert_decimal(n = 854792232966738, precision:)
603
- => "854.79 terabytes"
603
+ LinuxStat::PrettifyBytes.convert_decimal(n = 42077508120898, precision:)
604
+ => "42.08 terabytes"
604
605
 
605
606
  # File: prettify_bytes.rb | Line: 97
606
607
  # Definition: def convert_short_binary(n, precision: 2)
607
- LinuxStat::PrettifyBytes.convert_short_binary(n = 502144293693829, precision:)
608
- => "456.70 TiB"
608
+ LinuxStat::PrettifyBytes.convert_short_binary(n = 363689812033137, precision:)
609
+ => "330.77 TiB"
609
610
 
610
611
  # File: prettify_bytes.rb | Line: 72
611
612
  # Definition: def convert_short_decimal(n, precision: 2)
612
- LinuxStat::PrettifyBytes.convert_short_decimal(n = 489879177525276, precision:)
613
- => "489.88 TB"
613
+ LinuxStat::PrettifyBytes.convert_short_decimal(n = 119056846159316, precision:)
614
+ => "119.06 TB"
615
+
616
+ ```
617
+
618
+ ### LinuxStat::ProcFS
619
+ ```
620
+ LinuxStat::ProcFS.last_pid()
621
+ => 34902
622
+
623
+ LinuxStat::ProcFS.uptime_f()
624
+ => 60723.68
614
625
 
615
626
  ```
616
627
 
@@ -624,34 +635,39 @@ LinuxStat::Process.cmdlines()
624
635
  # File: process.rb | Line: 29
625
636
  # Definition: def count
626
637
  LinuxStat::Process.count()
627
- => 209
638
+ => 216
628
639
 
629
- # File: process.rb | Line: 124
640
+ # File: process.rb | Line: 120
630
641
  # Definition: def idle
631
642
  LinuxStat::Process.idle()
632
- => [3, 4, 6, 9, 12, 23, 30, 37, 39, 49, 102, 103, 104, 106, 107, 108, 109, 110, 117, 118, 120, 122, 131, 134, 140, 164, 166, 170, 171, 174, 176, 181, 182, 183, 184, 185, 186, 187, 189, 231, 234, 302, 417, 425, 13585, 20484, 20485, 20486, 20487, 20488, 20...
643
+ => [3, 4, 6, 9, 12, 23, 30, 37, 39, 49, 102, 103, 104, 106, 107, 108, 109, 110, 117, 118, 119, 121, 131, 134, 140, 177, 179, 182, 183, 186, 192, 193, 194, 195, 196, 197, 198, 199, 243, 245, 294, 461, 493, 517, 9197, 16346, 16347, 16348, 16349, 16350, 163...
644
+
645
+ # File: process.rb | Line: 160
646
+ # Definition: def last_pid
647
+ LinuxStat::Process.last_pid()
648
+ => 34902
633
649
 
634
650
  # File: process.rb | Line: 11
635
651
  # Definition: def list
636
652
  LinuxStat::Process.list()
637
- => [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, 118, 120, 122, 131, 134,...
653
+ => [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, 118, 119, 121, 131, 134,...
638
654
 
639
655
  # File: process.rb | Line: 36
640
656
  # Definition: def names
641
657
  LinuxStat::Process.names()
642
- => {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...
658
+ => {1=>"systemd", 2=>"kthreadd", 3=>"rcu_gp", 4=>"rcu_par_gp", 6=>"kworker/0:0H", 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_inject/...
643
659
 
644
- # File: process.rb | Line: 150
660
+ # File: process.rb | Line: 138
645
661
  # Definition: def running
646
662
  LinuxStat::Process.running()
647
- => [37551]
663
+ => [16203, 27259, 34902]
648
664
 
649
665
  # File: process.rb | Line: 111
650
666
  # Definition: def sleeping
651
667
  LinuxStat::Process.sleeping()
652
- => [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, 163, 165, 190, 218, 233, 235, 342, 380, 382, 384, 385, 428, 429, 430, 432, 443, 447, 454, 483, 501, 504,...
668
+ => [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, 176, 178, 200, 228, 244, 246, 322, 325, 326, 327, 328, 389, 390, 391, 392, 409, 411, 415, 479, 535, 537,...
653
669
 
654
- # File: process.rb | Line: 163
670
+ # File: process.rb | Line: 147
655
671
  # Definition: def stopped
656
672
  LinuxStat::Process.stopped()
657
673
  => []
@@ -661,7 +677,7 @@ LinuxStat::Process.stopped()
661
677
  LinuxStat::Process.types()
662
678
  => {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...
663
679
 
664
- # File: process.rb | Line: 137
680
+ # File: process.rb | Line: 129
665
681
  # Definition: def zombie
666
682
  LinuxStat::Process.zombie()
667
683
  => []
@@ -680,27 +696,37 @@ LinuxStat::ProcessInfo.cmdline(pid)
680
696
  LinuxStat::ProcessInfo.command_name(pid)
681
697
  => "ruby"
682
698
 
683
- # File: process_info.rb | Line: 708
699
+ # File: process_info.rb | Line: 654
684
700
  # Definition: def nproc(pid = $$)
685
701
  LinuxStat::ProcessInfo.count_cpu(pid)
686
702
  => 4
687
703
 
688
- # File: process_info.rb | Line: 284
704
+ # File: process_info.rb | Line: 280
689
705
  # Definition: def cpu_stat(pid: $$, sleep: ticks_to_ms_t5)
690
706
  LinuxStat::ProcessInfo.cpu_stat(pid:, sleep:)
691
- => {:cpu_usage=>0.0, :threads=>1, :last_executed_cpu=>1}
707
+ => {:cpu_usage=>0.0, :threads=>0, :last_executed_cpu=>0}
692
708
 
693
- # File: process_info.rb | Line: 350
709
+ # File: process_info.rb | Line: 664
710
+ # Definition: def cpu_time(pid = $$)
711
+ LinuxStat::ProcessInfo.cpu_time(pid)
712
+ => 0
713
+
714
+ # File: process_info.rb | Line: 677
715
+ # Definition: def cpu_times(pid = $$)
716
+ LinuxStat::ProcessInfo.cpu_times(pid)
717
+ => {:hour=>0, :minute=>0, :second=>0}
718
+
719
+ # File: process_info.rb | Line: 340
694
720
  # Definition: def cpu_usage(pid: $$, sleep: ticks_to_ms_t5)
695
721
  LinuxStat::ProcessInfo.cpu_usage(pid:, sleep:)
696
722
  => 0.0
697
723
 
698
- # File: process_info.rb | Line: 525
724
+ # File: process_info.rb | Line: 496
699
725
  # Definition: def gid(pid = $$)
700
726
  LinuxStat::ProcessInfo.gid(pid)
701
727
  => {:real=>1000, :effective=>1000, :saved_set=>1000, :filesystem_uid=>1000}
702
728
 
703
- # File: process_info.rb | Line: 487
729
+ # File: process_info.rb | Line: 462
704
730
  # Definition: def last_executed_cpu(pid = $$)
705
731
  LinuxStat::ProcessInfo.last_executed_cpu(pid)
706
732
  => 1
@@ -708,24 +734,24 @@ LinuxStat::ProcessInfo.last_executed_cpu(pid)
708
734
  # File: process_info.rb | Line: 151
709
735
  # Definition: def mem_stat(pid = $$)
710
736
  LinuxStat::ProcessInfo.mem_stat(pid)
711
- => {:memory=>24842.24, :virtual_memory=>96256.0, :resident_memory=>30859.264}
737
+ => {:memory=>24821760, :virtual_memory=>96198656, :resident_memory=>30973952, :shared_memory=>6152192}
712
738
 
713
- # File: process_info.rb | Line: 184
739
+ # File: process_info.rb | Line: 171
714
740
  # Definition: def memory(pid = $$)
715
741
  LinuxStat::ProcessInfo.memory(pid)
716
- => 24842.24
742
+ => 24821.76
717
743
 
718
- # File: process_info.rb | Line: 672
744
+ # File: process_info.rb | Line: 624
719
745
  # Definition: def nice(pid = $$)
720
746
  LinuxStat::ProcessInfo.nice(pid)
721
747
  => 0
722
748
 
723
- # File: process_info.rb | Line: 708
749
+ # File: process_info.rb | Line: 654
724
750
  # Definition: def nproc(pid = $$)
725
751
  LinuxStat::ProcessInfo.nproc(pid)
726
752
  => 4
727
753
 
728
- # File: process_info.rb | Line: 546
754
+ # File: process_info.rb | Line: 517
729
755
  # Definition: def owner(pid = $$)
730
756
  LinuxStat::ProcessInfo.owner(pid)
731
757
  => "sourav"
@@ -735,37 +761,42 @@ LinuxStat::ProcessInfo.owner(pid)
735
761
  LinuxStat::ProcessInfo.process_name(pid)
736
762
  => "linuxstat.rb"
737
763
 
738
- # File: process_info.rb | Line: 234
764
+ # File: process_info.rb | Line: 213
739
765
  # Definition: def resident_memory(pid = $$)
740
766
  LinuxStat::ProcessInfo.resident_memory(pid)
741
- => 30859.264
767
+ => 30973.952
742
768
 
743
- # File: process_info.rb | Line: 621
769
+ # File: process_info.rb | Line: 586
744
770
  # Definition: def running_time(pid = $$)
745
771
  LinuxStat::ProcessInfo.running_time(pid)
746
- => 1.08
772
+ => 1.19
747
773
 
748
- # File: process_info.rb | Line: 602
774
+ # File: process_info.rb | Line: 234
775
+ # Definition: def shared_memory(pid = $$)
776
+ LinuxStat::ProcessInfo.shared_memory(pid)
777
+ => 6152.192
778
+
779
+ # File: process_info.rb | Line: 567
749
780
  # Definition: def start_time(pid = $$)
750
781
  LinuxStat::ProcessInfo.start_time(pid)
751
- => 2021-01-22 21:42:20 +0530
782
+ => 2021-02-06 04:32:07 +0530
752
783
 
753
- # File: process_info.rb | Line: 568
784
+ # File: process_info.rb | Line: 539
754
785
  # Definition: def start_time_epoch(pid = $$)
755
786
  LinuxStat::ProcessInfo.start_time_epoch(pid)
756
- => 1611331940
787
+ => 1612566127
757
788
 
758
- # File: process_info.rb | Line: 653
789
+ # File: process_info.rb | Line: 611
759
790
  # Definition: def state(pid = $$)
760
791
  LinuxStat::ProcessInfo.state(pid)
761
792
  => "R"
762
793
 
763
- # File: process_info.rb | Line: 407
794
+ # File: process_info.rb | Line: 392
764
795
  # Definition: def thread_usage(pid: $$, sleep: ticks_to_ms_t5)
765
796
  LinuxStat::ProcessInfo.thread_usage(pid:, sleep:)
766
797
  => 0.0
767
798
 
768
- # File: process_info.rb | Line: 462
799
+ # File: process_info.rb | Line: 441
769
800
  # Definition: def threads(pid = $$)
770
801
  LinuxStat::ProcessInfo.threads(pid)
771
802
  => 1
@@ -773,17 +804,17 @@ LinuxStat::ProcessInfo.threads(pid)
773
804
  # File: process_info.rb | Line: 30
774
805
  # Definition: def total_io(pid = $$)
775
806
  LinuxStat::ProcessInfo.total_io(pid)
776
- => {:read_bytes=>1302528, :write_bytes=>0}
807
+ => {:read_bytes=>0, :write_bytes=>0}
777
808
 
778
- # File: process_info.rb | Line: 501
809
+ # File: process_info.rb | Line: 472
779
810
  # Definition: def uid(pid = $$)
780
811
  LinuxStat::ProcessInfo.uid(pid)
781
812
  => {:real=>1000, :effective=>1000, :saved_set=>1000, :filesystem_uid=>1000}
782
813
 
783
- # File: process_info.rb | Line: 209
814
+ # File: process_info.rb | Line: 192
784
815
  # Definition: def virtual_memory(pid = $$)
785
816
  LinuxStat::ProcessInfo.virtual_memory(pid)
786
- => 96256.0
817
+ => 96198.656
787
818
 
788
819
  ```
789
820
 
@@ -794,45 +825,45 @@ LinuxStat::ProcessInfo.virtual_memory(pid)
794
825
  LinuxStat::Swap.any?()
795
826
  => true
796
827
 
797
- # File: swap.rb | Line: 81
828
+ # File: swap.rb | Line: 84
798
829
  # Definition: def available
799
830
  LinuxStat::Swap.available()
800
- => 2437940
831
+ => 2800844
801
832
 
802
- # File: swap.rb | Line: 70
833
+ # File: swap.rb | Line: 73
803
834
  # Definition: def free
804
835
  LinuxStat::Swap.free()
805
- => 2437940
836
+ => 2800844
806
837
 
807
838
  # File: swap.rb | Line: 10
808
839
  # Definition: def list
809
840
  LinuxStat::Swap.list()
810
- => {"/dev/zram0"=>[:partition, 4194300, 1756360, -2]}
841
+ => {"/dev/zram0"=>[:partition, 4194300, 1393456, -2]}
811
842
 
812
- # File: swap.rb | Line: 116
843
+ # File: swap.rb | Line: 127
813
844
  # Definition: def percent_available
814
845
  LinuxStat::Swap.percent_available()
815
- => 58.13
846
+ => 66.78
816
847
 
817
- # File: swap.rb | Line: 102
848
+ # File: swap.rb | Line: 107
818
849
  # Definition: def percent_used
819
850
  LinuxStat::Swap.percent_used()
820
- => 41.87
851
+ => 33.22
821
852
 
822
853
  # File: swap.rb | Line: 34
823
854
  # Definition: def stat
824
855
  LinuxStat::Swap.stat()
825
- => {:total=>4194300, :used=>1756360, :available=>2437940, :percent_used=>41.87, :percent_available=>58.13}
856
+ => {:total=>4194300, :used=>1393456, :available=>2800844, :percent_used=>33.22, :percent_available=>66.78}
826
857
 
827
- # File: swap.rb | Line: 59
858
+ # File: swap.rb | Line: 62
828
859
  # Definition: def total
829
860
  LinuxStat::Swap.total()
830
861
  => 4194300
831
862
 
832
- # File: swap.rb | Line: 93
863
+ # File: swap.rb | Line: 98
833
864
  # Definition: def used
834
865
  LinuxStat::Swap.used()
835
- => 1756360
866
+ => 1393456
836
867
 
837
868
  ```
838
869
 
@@ -906,16 +937,19 @@ LinuxStat::Sysinfo.freehigh()
906
937
  => 0
907
938
 
908
939
  LinuxStat::Sysinfo.freeram()
909
- => 223875072
940
+ => 281231360
910
941
 
911
942
  LinuxStat::Sysinfo.freeswap()
912
- => 2496450560
943
+ => 2868064256
913
944
 
914
945
  LinuxStat::Sysinfo.loads()
915
- => [0.56884765625, 0.69482421875, 0.9892578125]
946
+ => [4.5693359375, 3.85400390625, 3.53515625]
916
947
 
917
948
  LinuxStat::Sysinfo.sharedram()
918
- => 834801664
949
+ => 694075392
950
+
951
+ LinuxStat::Sysinfo.stat()
952
+ => {:totalram=>3928305664, :freeram=>281231360, :sharedram=>694075392, :bufferram=>4096, :totalswap=>4294963200, :freeswap=>2868064256, :totalhigh=>0, :freehigh=>0, :uptime=>60724, :loads=>[4.5693359375, 3.85400390625, 3.53515625]}
919
953
 
920
954
  LinuxStat::Sysinfo.totalhigh()
921
955
  => 0
@@ -927,7 +961,7 @@ LinuxStat::Sysinfo.totalswap()
927
961
  => 4294963200
928
962
 
929
963
  LinuxStat::Sysinfo.uptime()
930
- => 40627
964
+ => 60724
931
965
 
932
966
  ```
933
967
 
@@ -946,12 +980,12 @@ LinuxStat::Thermal.count_sensors()
946
980
  # File: thermal.rb | Line: 41
947
981
  # Definition: def fans
948
982
  LinuxStat::Thermal.fans()
949
- => [{:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"Processor Fan", :rpm=>0}]
983
+ => [{:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"Processor Fan", :rpm=>2686}]
950
984
 
951
985
  # File: thermal.rb | Line: 23
952
986
  # Definition: def temperatures
953
987
  LinuxStat::Thermal.temperatures()
954
- => [{:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"SODIMM", :temperature=>36.0}, {:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"CPU", :temperature=>46.0}, {:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"Ambi...
988
+ => [{:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"SODIMM", :temperature=>36.0}, {:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"CPU", :temperature=>50.0}, {:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"Ambi...
955
989
 
956
990
  ```
957
991
 
@@ -960,17 +994,17 @@ LinuxStat::Thermal.temperatures()
960
994
  # File: usb.rb | Line: 139
961
995
  # Definition: def count
962
996
  LinuxStat::USB.count()
963
- => 10
997
+ => 11
964
998
 
965
999
  # File: usb.rb | Line: 139
966
1000
  # Definition: def count
967
1001
  LinuxStat::USB.count_devices()
968
- => 10
1002
+ => 11
969
1003
 
970
1004
  # File: usb.rb | Line: 49
971
1005
  # Definition: def devices_stat(hwdata: true)
972
1006
  LinuxStat::USB.devices_stat(hwdata:)
973
- => [{:path=>"/sys/bus/usb/devices/1-1.2/", :id=>"04d9:1203", :vendor_id=>"04d9", :product_id=>"1203", :bus_num=>1, :dev_num=>11, :hwdata=>{:vendor=>"Holtek Semiconductor, Inc.", :product=>"Keyboard"}, :authorized=>true, :b_max_power=>"100mA", :b_max_pack...
1007
+ => [{:path=>"/sys/bus/usb/devices/1-1.2/", :id=>"04d9:1203", :vendor_id=>"04d9", :product_id=>"1203", :bus_num=>1, :dev_num=>20, :hwdata=>{:vendor=>"Holtek Semiconductor, Inc.", :product=>"Keyboard"}, :authorized=>true, :b_max_power=>"100mA", :b_max_pack...
974
1008
 
975
1009
  # File: usb.rb | Line: 179
976
1010
  # Definition: def hwdata_file