linux_stat 1.6.0 → 2.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2204620ae409ee97e9a3fb737bb2442ce2f60e2f8b1fe4473c31c441a3ae19ac
4
- data.tar.gz: f04b438fc002122865f56597bb39acdfc52fd19f25bf628a4db3a3f4afb09830
3
+ metadata.gz: b1292d974695e1622fd5ca04cd91393b325a8acd4116727498b077b74b530aa6
4
+ data.tar.gz: ba39825500d32ebaafa6d0a6176901c34e9abc98ea747f6035f4731db9ed1818
5
5
  SHA512:
6
- metadata.gz: 3fec213db7635a5763bd6082da8cbe429b0c3bb2f227e242e9cf33da59bb381dc5f008edd1bf63da576c8ad4b39fe8f56f97efb9f4ff3a4ce9f8760253afc97f
7
- data.tar.gz: 6de48af0e03a1a91166d4cc5f438f38cc0662a9d4cbc948d663591abfcf078ddd751f5f9064362448ef76252d38eb85258a4abaa20ac88c07a6dbf28b23b762b
6
+ metadata.gz: 4ae4eed738ade10f5aa8202a6552c9a4e05d2e8ba22c6f2e6f2b8f5f59a38f057befe3f2b5cef4302917ba04477c21a5fedf34538cca32256dea55df408dcee5
7
+ data.tar.gz: 1569d7d670cb488b10fac97f0bfcf9c8e6c9ce3ff997524dc478e5a762e7806bbf84fb06e31f4c7376ef0c2f48e6b08f5f27671abdc5c7d54e041971ca17da64
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
 
@@ -93,7 +89,7 @@ It's generated by linuxstat.rb command, which is available after the installatio
93
89
 
94
90
  For ease of use, LinuxStat is also assigned to the LS constant.
95
91
 
96
- ### LinuxStat::BIOS
92
+ #### LinuxStat::BIOS
97
93
  ```
98
94
  # File: bios.rb | Line: 58
99
95
  # Definition: def date
@@ -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.538
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"=>1980781, "cpu1"=>2000008, "cpu2"=>1760131, "cpu3"=>2000064}
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=>9.52, 1=>16.67, 2=>16.67, 3=>0.0, 4=>0.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
+ => 0.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
+ => 5.0
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=>5.26, 1=>20.0, 2=>0.0, 3=>0.0, 4=>0.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=>8714668, :block_avail_unpriv=>8714668, :inodes=>58612160, :free_inodes=>56817750, :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
+ => 35695280128
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
+ => 35695280128
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=>35695280128, :used=>84285911040}
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=>8714668, :block_avail_unpriv=>8714668, :inodes=>58612160, :free_inodes=>56817750, :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
+ => 84285911040
306
302
 
307
303
  ```
308
304
 
@@ -365,37 +361,37 @@ LinuxStat::Kernel.version()
365
361
  # File: memory.rb | Line: 62
366
362
  # Definition: def available
367
363
  LinuxStat::Memory.available()
368
- => 422660
364
+ => 1155372
369
365
 
370
366
  # File: memory.rb | Line: 52
371
367
  # Definition: def free
372
368
  LinuxStat::Memory.free()
373
- => 237884
369
+ => 261316
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
+ => 30.12
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
+ => 69.88
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=>3836228, :used=>2680856, :available=>1155372, :percent_used=>69.88, :percent_available=>30.12}
389
385
 
390
386
  # File: memory.rb | Line: 42
391
387
  # Definition: def total
392
388
  LinuxStat::Memory.total()
393
- => 3836236
389
+ => 3836228
394
390
 
395
391
  # File: memory.rb | Line: 72
396
392
  # Definition: def used
397
393
  LinuxStat::Memory.used()
398
- => 3413576
394
+ => 2680856
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=>35695280128, :available=>35695280128, :used=>84285911040, :percent_used=>70.25, :percent_free=>29.75, :percent_available=>29.75}
408
404
 
409
405
  # File: mounts.rb | Line: 139
410
406
  # Definition: def devices_stat
@@ -414,17 +410,17 @@ LinuxStat::Mounts.devices_stat()
414
410
  # File: mounts.rb | Line: 13
415
411
  # Definition: def list
416
412
  LinuxStat::Mounts.list()
417
- => ["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=1892892k,nr_inodes=473223,mode=755 0 0", "run /run tmpfs rw,nosuid,nodev,relatime,mode=755 0 0", "...
413
+ => ["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=1892888k,nr_inodes=473222,mode=755 0 0", "run /run tmpfs rw,nosuid,nodev,relatime,mode=755 0 0", "...
418
414
 
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/perf_event", "pstore...
428
424
 
429
425
  # File: mounts.rb | Line: 82
430
426
  # Definition: def mount_point(dev = root)
@@ -458,7 +454,7 @@ LinuxStat::Mounts.tmpfs()
458
454
  # File: net.rb | Line: 86
459
455
  # Definition: def usage(interval = 0.1)
460
456
  LinuxStat::Net.current_usage(interval)
461
- => {:received=>0.0, :transmitted=>0.0}
457
+ => {:received=>2805500.0, :transmitted=>127290.0}
462
458
 
463
459
  # File: net.rb | Line: 12
464
460
  # Definition: def ipv4_private
@@ -468,22 +464,22 @@ LinuxStat::Net.ipv4_private()
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=>1312151997, :transmitted=>81641336}
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
+ => 1312151997
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
+ => 81641336
482
478
 
483
479
  # File: net.rb | Line: 86
484
480
  # Definition: def usage(interval = 0.1)
485
481
  LinuxStat::Net.usage(interval)
486
- => {:received=>0.0, :transmitted=>0.0}
482
+ => {:received=>2971440.0, :transmitted=>80020.0}
487
483
 
488
484
  ```
489
485
 
@@ -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=>2.78173828125, 5=>2.96923828125, 15=>2.40185546875}
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=>5, :minute=>33, :second=>59.77}
541
537
 
542
- # File: os.rb | Line: 168
538
+ # File: os.rb | Line: 174
539
+ # Definition: def uptime_f
540
+ LinuxStat::OS.uptime_f()
541
+ => 20039.77
542
+
543
+ # File: os.rb | Line: 185
543
544
  # Definition: def uptime_i
544
545
  LinuxStat::OS.uptime_i()
545
- => 40626
546
+ => 20040
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 = 388183402613652, precision:)
599
+ => "353.05 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 = 937555692903085, precision:)
604
+ => "937.56 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 = 542625870963586, precision:)
609
+ => "493.52 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 = 861937756585891, precision:)
614
+ => "861.94 TB"
615
+
616
+ ```
617
+
618
+ ### LinuxStat::ProcFS
619
+ ```
620
+ LinuxStat::ProcFS.last_pid()
621
+ => 12587
622
+
623
+ LinuxStat::ProcFS.uptime_f()
624
+ => 20039.98
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
+ => 190
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, 135, 140, 165, 167, 170, 171, 175, 180, 181, 182, 183, 184, 185, 186, 188, 225, 232, 234, 270, 415, 419, 422, 10749, 11032, 11078, 11124, 11128,...
644
+
645
+ # File: process.rb | Line: 160
646
+ # Definition: def last_pid
647
+ LinuxStat::Process.last_pid()
648
+ => 12587
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
658
  => {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...
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
+ => [12583]
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, 164, 166, 189, 217, 233, 235, 307, 310, 311, 312, 313, 418, 420, 421, 424, 426, 429, 444, 447, 450, 481,...
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,27 @@ 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: 340
694
710
  # Definition: def cpu_usage(pid: $$, sleep: ticks_to_ms_t5)
695
711
  LinuxStat::ProcessInfo.cpu_usage(pid:, sleep:)
696
712
  => 0.0
697
713
 
698
- # File: process_info.rb | Line: 525
714
+ # File: process_info.rb | Line: 496
699
715
  # Definition: def gid(pid = $$)
700
716
  LinuxStat::ProcessInfo.gid(pid)
701
717
  => {:real=>1000, :effective=>1000, :saved_set=>1000, :filesystem_uid=>1000}
702
718
 
703
- # File: process_info.rb | Line: 487
719
+ # File: process_info.rb | Line: 462
704
720
  # Definition: def last_executed_cpu(pid = $$)
705
721
  LinuxStat::ProcessInfo.last_executed_cpu(pid)
706
722
  => 1
@@ -708,24 +724,24 @@ LinuxStat::ProcessInfo.last_executed_cpu(pid)
708
724
  # File: process_info.rb | Line: 151
709
725
  # Definition: def mem_stat(pid = $$)
710
726
  LinuxStat::ProcessInfo.mem_stat(pid)
711
- => {:memory=>24842.24, :virtual_memory=>96256.0, :resident_memory=>30859.264}
727
+ => {:memory=>24576000, :virtual_memory=>96206848, :resident_memory=>30736384, :shared_memory=>6160384}
712
728
 
713
- # File: process_info.rb | Line: 184
729
+ # File: process_info.rb | Line: 171
714
730
  # Definition: def memory(pid = $$)
715
731
  LinuxStat::ProcessInfo.memory(pid)
716
- => 24842.24
732
+ => 24576.0
717
733
 
718
- # File: process_info.rb | Line: 672
734
+ # File: process_info.rb | Line: 624
719
735
  # Definition: def nice(pid = $$)
720
736
  LinuxStat::ProcessInfo.nice(pid)
721
737
  => 0
722
738
 
723
- # File: process_info.rb | Line: 708
739
+ # File: process_info.rb | Line: 654
724
740
  # Definition: def nproc(pid = $$)
725
741
  LinuxStat::ProcessInfo.nproc(pid)
726
742
  => 4
727
743
 
728
- # File: process_info.rb | Line: 546
744
+ # File: process_info.rb | Line: 517
729
745
  # Definition: def owner(pid = $$)
730
746
  LinuxStat::ProcessInfo.owner(pid)
731
747
  => "sourav"
@@ -735,37 +751,42 @@ LinuxStat::ProcessInfo.owner(pid)
735
751
  LinuxStat::ProcessInfo.process_name(pid)
736
752
  => "linuxstat.rb"
737
753
 
738
- # File: process_info.rb | Line: 234
754
+ # File: process_info.rb | Line: 213
739
755
  # Definition: def resident_memory(pid = $$)
740
756
  LinuxStat::ProcessInfo.resident_memory(pid)
741
- => 30859.264
757
+ => 30736.384
742
758
 
743
- # File: process_info.rb | Line: 621
759
+ # File: process_info.rb | Line: 586
744
760
  # Definition: def running_time(pid = $$)
745
761
  LinuxStat::ProcessInfo.running_time(pid)
746
- => 1.08
762
+ => 1.02
747
763
 
748
- # File: process_info.rb | Line: 602
764
+ # File: process_info.rb | Line: 234
765
+ # Definition: def shared_memory(pid = $$)
766
+ LinuxStat::ProcessInfo.shared_memory(pid)
767
+ => 6160.384
768
+
769
+ # File: process_info.rb | Line: 567
749
770
  # Definition: def start_time(pid = $$)
750
771
  LinuxStat::ProcessInfo.start_time(pid)
751
- => 2021-01-22 21:42:20 +0530
772
+ => 2021-02-01 16:58:34 +0530
752
773
 
753
- # File: process_info.rb | Line: 568
774
+ # File: process_info.rb | Line: 539
754
775
  # Definition: def start_time_epoch(pid = $$)
755
776
  LinuxStat::ProcessInfo.start_time_epoch(pid)
756
- => 1611331940
777
+ => 1612178914
757
778
 
758
- # File: process_info.rb | Line: 653
779
+ # File: process_info.rb | Line: 611
759
780
  # Definition: def state(pid = $$)
760
781
  LinuxStat::ProcessInfo.state(pid)
761
782
  => "R"
762
783
 
763
- # File: process_info.rb | Line: 407
784
+ # File: process_info.rb | Line: 392
764
785
  # Definition: def thread_usage(pid: $$, sleep: ticks_to_ms_t5)
765
786
  LinuxStat::ProcessInfo.thread_usage(pid:, sleep:)
766
787
  => 0.0
767
788
 
768
- # File: process_info.rb | Line: 462
789
+ # File: process_info.rb | Line: 441
769
790
  # Definition: def threads(pid = $$)
770
791
  LinuxStat::ProcessInfo.threads(pid)
771
792
  => 1
@@ -773,17 +794,17 @@ LinuxStat::ProcessInfo.threads(pid)
773
794
  # File: process_info.rb | Line: 30
774
795
  # Definition: def total_io(pid = $$)
775
796
  LinuxStat::ProcessInfo.total_io(pid)
776
- => {:read_bytes=>1302528, :write_bytes=>0}
797
+ => {:read_bytes=>1245184, :write_bytes=>0}
777
798
 
778
- # File: process_info.rb | Line: 501
799
+ # File: process_info.rb | Line: 472
779
800
  # Definition: def uid(pid = $$)
780
801
  LinuxStat::ProcessInfo.uid(pid)
781
802
  => {:real=>1000, :effective=>1000, :saved_set=>1000, :filesystem_uid=>1000}
782
803
 
783
- # File: process_info.rb | Line: 209
804
+ # File: process_info.rb | Line: 192
784
805
  # Definition: def virtual_memory(pid = $$)
785
806
  LinuxStat::ProcessInfo.virtual_memory(pid)
786
- => 96256.0
807
+ => 96206.848
787
808
 
788
809
  ```
789
810
 
@@ -797,32 +818,32 @@ LinuxStat::Swap.any?()
797
818
  # File: swap.rb | Line: 81
798
819
  # Definition: def available
799
820
  LinuxStat::Swap.available()
800
- => 2437940
821
+ => 3856636
801
822
 
802
823
  # File: swap.rb | Line: 70
803
824
  # Definition: def free
804
825
  LinuxStat::Swap.free()
805
- => 2437940
826
+ => 3856636
806
827
 
807
828
  # File: swap.rb | Line: 10
808
829
  # Definition: def list
809
830
  LinuxStat::Swap.list()
810
- => {"/dev/zram0"=>[:partition, 4194300, 1756360, -2]}
831
+ => {"/dev/zram0"=>[:partition, 4194300, 337664, -2]}
811
832
 
812
833
  # File: swap.rb | Line: 116
813
834
  # Definition: def percent_available
814
835
  LinuxStat::Swap.percent_available()
815
- => 58.13
836
+ => 91.95
816
837
 
817
838
  # File: swap.rb | Line: 102
818
839
  # Definition: def percent_used
819
840
  LinuxStat::Swap.percent_used()
820
- => 41.87
841
+ => 8.05
821
842
 
822
843
  # File: swap.rb | Line: 34
823
844
  # Definition: def stat
824
845
  LinuxStat::Swap.stat()
825
- => {:total=>4194300, :used=>1756360, :available=>2437940, :percent_used=>41.87, :percent_available=>58.13}
846
+ => {:total=>4194300, :used=>337664, :available=>3856636, :percent_used=>8.05, :percent_available=>91.95}
826
847
 
827
848
  # File: swap.rb | Line: 59
828
849
  # Definition: def total
@@ -832,7 +853,7 @@ LinuxStat::Swap.total()
832
853
  # File: swap.rb | Line: 93
833
854
  # Definition: def used
834
855
  LinuxStat::Swap.used()
835
- => 1756360
856
+ => 337664
836
857
 
837
858
  ```
838
859
 
@@ -906,28 +927,31 @@ LinuxStat::Sysinfo.freehigh()
906
927
  => 0
907
928
 
908
929
  LinuxStat::Sysinfo.freeram()
909
- => 223875072
930
+ => 251408384
910
931
 
911
932
  LinuxStat::Sysinfo.freeswap()
912
- => 2496450560
933
+ => 3949195264
913
934
 
914
935
  LinuxStat::Sysinfo.loads()
915
- => [0.56884765625, 0.69482421875, 0.9892578125]
936
+ => [2.78173828125, 2.96923828125, 2.40185546875]
916
937
 
917
938
  LinuxStat::Sysinfo.sharedram()
918
- => 834801664
939
+ => 606461952
940
+
941
+ LinuxStat::Sysinfo.stat()
942
+ => {:totalram=>3928297472, :freeram=>251408384, :sharedram=>606461952, :bufferram=>4096, :totalswap=>4294963200, :freeswap=>3949195264, :totalhigh=>0, :freehigh=>0, :uptime=>20041, :loads=>[2.78173828125, 2.96923828125, 2.40185546875]}
919
943
 
920
944
  LinuxStat::Sysinfo.totalhigh()
921
945
  => 0
922
946
 
923
947
  LinuxStat::Sysinfo.totalram()
924
- => 3928305664
948
+ => 3928297472
925
949
 
926
950
  LinuxStat::Sysinfo.totalswap()
927
951
  => 4294963200
928
952
 
929
953
  LinuxStat::Sysinfo.uptime()
930
- => 40627
954
+ => 20041
931
955
 
932
956
  ```
933
957
 
@@ -946,12 +970,12 @@ LinuxStat::Thermal.count_sensors()
946
970
  # File: thermal.rb | Line: 41
947
971
  # Definition: def fans
948
972
  LinuxStat::Thermal.fans()
949
- => [{:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"Processor Fan", :rpm=>0}]
973
+ => [{:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"Processor Fan", :rpm=>2785}]
950
974
 
951
975
  # File: thermal.rb | Line: 23
952
976
  # Definition: def temperatures
953
977
  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...
978
+ => [{:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"SODIMM", :temperature=>34.0}, {:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"CPU", :temperature=>43.0}, {:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"Ambi...
955
979
 
956
980
  ```
957
981
 
@@ -970,7 +994,7 @@ LinuxStat::USB.count_devices()
970
994
  # File: usb.rb | Line: 49
971
995
  # Definition: def devices_stat(hwdata: true)
972
996
  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...
997
+ => [{:path=>"/sys/bus/usb/devices/1-1.2/", :id=>"04d9:1203", :vendor_id=>"04d9", :product_id=>"1203", :bus_num=>1, :dev_num=>7, :hwdata=>{:vendor=>"Holtek Semiconductor, Inc.", :product=>"Keyboard"}, :authorized=>true, :b_max_power=>"100mA", :b_max_packe...
974
998
 
975
999
  # File: usb.rb | Line: 179
976
1000
  # Definition: def hwdata_file