linux_stat 1.6.0 → 2.2.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 +4 -4
- data/README.md +160 -126
- data/bin/console +7 -1
- data/exe/linuxstat.rb +6 -0
- data/ext/procfs/extconf.rb +11 -0
- data/ext/procfs/loadavg_pid.h +11 -0
- data/ext/procfs/procfs.c +43 -0
- data/ext/procfs/stat.h +119 -0
- data/ext/procfs/statm.h +109 -0
- data/ext/procfs/uptime.h +12 -0
- data/lib/linux_stat.rb +4 -1
- data/lib/linux_stat/battery.rb +8 -1
- data/lib/linux_stat/net.rb +5 -5
- data/lib/linux_stat/os.rb +16 -15
- data/lib/linux_stat/process.rb +17 -27
- data/lib/linux_stat/process_info.rb +124 -158
- data/lib/linux_stat/swap.rb +23 -7
- data/lib/linux_stat/version.rb +1 -1
- metadata +11 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aa2ee379e74b817dd795ceec02ddcdf67d49c2f0b2d37524906111c74ea40ccb
|
|
4
|
+
data.tar.gz: 540c6e1a9eef8b3596afe963b6387b107e8450ec879b7d96bd95ae271cced14a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a1501322abefbddf6261133be26decb9a117a568fd73c2f76825e425ea0d256aee0fc8d1c4b805edd05d062631453ff73339bea280a250906419aa6cae6e6d32
|
|
7
|
+
data.tar.gz: 592ce707540e60071feb3ac0ce9fedd3bf026c234921cf074acb2640e96ea3c8d90906287960253b5700b373b465e4ac344c0389e1e5651970336b2251033c93
|
data/README.md
CHANGED
|
@@ -16,11 +16,12 @@ Languages Used:
|
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
##
|
|
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
|
|
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:
|
|
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.
|
|
186
|
+
=> 12.531
|
|
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"=>
|
|
210
|
+
=> {"cpu0"=>1969861, "cpu1"=>2000059, "cpu2"=>2000024, "cpu3"=>1949778}
|
|
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=>
|
|
245
|
+
=> {0=>9.52, 1=>16.67, 2=>20.0, 3=>0.0, 4=>16.67}
|
|
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
|
-
=>
|
|
250
|
+
=> 5.56
|
|
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
|
-
=>
|
|
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=>
|
|
260
|
+
=> {0=>10.0, 1=>0.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=>
|
|
267
|
+
=> {:block_size=>4096, :fragment_size=>4096, :blocks=>29292283, :block_free=>7498564, :block_avail_unpriv=>7498564, :inodes=>58612160, :free_inodes=>56765394, :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
|
-
=>
|
|
276
|
+
=> 30714118144
|
|
281
277
|
|
|
282
278
|
# File: filesystem.rb | Line: 60
|
|
283
279
|
# Definition: def free(fs = ?..freeze)
|
|
284
280
|
LinuxStat::Filesystem.free(fs)
|
|
285
|
-
=>
|
|
281
|
+
=> 30714118144
|
|
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=>
|
|
286
|
+
=> {:total=>119981191168, :free=>30714118144, :used=>89267073024}
|
|
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=>
|
|
291
|
+
=> {:block_size=>4096, :fragment_size=>4096, :blocks=>29292283, :block_free=>7498564, :block_avail_unpriv=>7498564, :inodes=>58612160, :free_inodes=>56765394, :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
|
-
=>
|
|
301
|
+
=> 89267073024
|
|
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
|
-
=>
|
|
364
|
+
=> 595616
|
|
369
365
|
|
|
370
366
|
# File: memory.rb | Line: 52
|
|
371
367
|
# Definition: def free
|
|
372
368
|
LinuxStat::Memory.free()
|
|
373
|
-
=>
|
|
369
|
+
=> 256356
|
|
374
370
|
|
|
375
371
|
# File: memory.rb | Line: 93
|
|
376
372
|
# Definition: def percent_available
|
|
377
373
|
LinuxStat::Memory.percent_available()
|
|
378
|
-
=>
|
|
374
|
+
=> 15.53
|
|
379
375
|
|
|
380
376
|
# File: memory.rb | Line: 82
|
|
381
377
|
# Definition: def percent_used
|
|
382
378
|
LinuxStat::Memory.percent_used()
|
|
383
|
-
=>
|
|
379
|
+
=> 84.47
|
|
384
380
|
|
|
385
381
|
# File: memory.rb | Line: 13
|
|
386
382
|
# Definition: def stat
|
|
387
383
|
LinuxStat::Memory.stat()
|
|
388
|
-
=> {:total=>
|
|
384
|
+
=> {:total=>3836228, :used=>3240612, :available=>595616, :percent_used=>84.47, :percent_available=>15.53}
|
|
389
385
|
|
|
390
386
|
# File: memory.rb | Line: 42
|
|
391
387
|
# Definition: def total
|
|
392
388
|
LinuxStat::Memory.total()
|
|
393
|
-
=>
|
|
389
|
+
=> 3836228
|
|
394
390
|
|
|
395
391
|
# File: memory.rb | Line: 72
|
|
396
392
|
# Definition: def used
|
|
397
393
|
LinuxStat::Memory.used()
|
|
398
|
-
=>
|
|
394
|
+
=> 3240620
|
|
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=>
|
|
403
|
+
=> {:mountpoint=>"/", :total=>119981191168, :free=>30714118144, :available=>30714118144, :used=>89267073024, :percent_used=>74.4, :percent_free=>25.6, :percent_available=>25.6}
|
|
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=
|
|
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", "
|
|
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", "deb...
|
|
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/
|
|
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/rdma", "pstore"=>"/s...
|
|
428
424
|
|
|
429
425
|
# File: mounts.rb | Line: 82
|
|
430
426
|
# Definition: def mount_point(dev = root)
|
|
@@ -449,7 +445,7 @@ LinuxStat::Mounts.root_mount_options()
|
|
|
449
445
|
# File: mounts.rb | Line: 58
|
|
450
446
|
# Definition: def tmpfs
|
|
451
447
|
LinuxStat::Mounts.tmpfs()
|
|
452
|
-
=> {"/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", "/
|
|
448
|
+
=> {"/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", "/ramdisk"=>"tmpfs /ramdisk tmpfs rw,nosuid,nodev,relatime,size=6291456k 0 0", "/tmp...
|
|
453
449
|
|
|
454
450
|
```
|
|
455
451
|
|
|
@@ -468,83 +464,88 @@ 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=>
|
|
467
|
+
=> {:received=>2371748196, :transmitted=>220748232}
|
|
472
468
|
|
|
473
469
|
# File: net.rb | Line: 45
|
|
474
470
|
# Definition: def total_bytes_received
|
|
475
471
|
LinuxStat::Net.total_bytes_received()
|
|
476
|
-
=>
|
|
472
|
+
=> 2371748196
|
|
477
473
|
|
|
478
474
|
# File: net.rb | Line: 58
|
|
479
475
|
# Definition: def total_bytes_transmitted
|
|
480
476
|
LinuxStat::Net.total_bytes_transmitted()
|
|
481
|
-
=>
|
|
477
|
+
=> 220748232
|
|
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=>
|
|
482
|
+
=> {:received=>820.0, :transmitted=>0.0}
|
|
487
483
|
|
|
488
484
|
```
|
|
489
485
|
|
|
490
486
|
### LinuxStat::OS
|
|
491
487
|
```
|
|
492
|
-
# File: os.rb | Line:
|
|
488
|
+
# File: os.rb | Line: 133
|
|
493
489
|
# Definition: def bits
|
|
494
490
|
LinuxStat::OS.bits()
|
|
495
491
|
=> 64
|
|
496
492
|
|
|
497
|
-
# File: os.rb | Line:
|
|
493
|
+
# File: os.rb | Line: 88
|
|
498
494
|
# Definition: def version
|
|
499
495
|
LinuxStat::OS.distrib_version()
|
|
500
496
|
=> "rolling"
|
|
501
497
|
|
|
502
|
-
# File: os.rb | Line:
|
|
498
|
+
# File: os.rb | Line: 50
|
|
503
499
|
# Definition: def distribution
|
|
504
500
|
LinuxStat::OS.distribution()
|
|
505
501
|
=> "Arch Linux"
|
|
506
502
|
|
|
507
|
-
# File: os.rb | Line:
|
|
503
|
+
# File: os.rb | Line: 121
|
|
508
504
|
# Definition: def hostname
|
|
509
505
|
LinuxStat::OS.hostname()
|
|
510
506
|
=> "archlinux"
|
|
511
507
|
|
|
512
|
-
# File: os.rb | Line:
|
|
508
|
+
# File: os.rb | Line: 208
|
|
513
509
|
# Definition: def loadavg
|
|
514
510
|
LinuxStat::OS.loadavg()
|
|
515
|
-
=> {1=>
|
|
511
|
+
=> {1=>2.873046875, 5=>1.9189453125, 15=>1.396484375}
|
|
516
512
|
|
|
517
|
-
# File: os.rb | Line:
|
|
513
|
+
# File: os.rb | Line: 39
|
|
518
514
|
# Definition: def lsb_release
|
|
519
515
|
LinuxStat::OS.lsb_release()
|
|
520
516
|
=> {:LSB_VERSION=>"1.4", :DISTRIB_ID=>"Arch", :DISTRIB_RELEASE=>"rolling", :DISTRIB_DESCRIPTION=>"Arch Linux"}
|
|
521
517
|
|
|
522
|
-
# File: os.rb | Line:
|
|
518
|
+
# File: os.rb | Line: 104
|
|
523
519
|
# Definition: def machine
|
|
524
520
|
LinuxStat::OS.machine()
|
|
525
521
|
=> "x86_64"
|
|
526
522
|
|
|
527
|
-
# File: os.rb | Line:
|
|
523
|
+
# File: os.rb | Line: 112
|
|
528
524
|
# Definition: def nodename
|
|
529
525
|
LinuxStat::OS.nodename()
|
|
530
526
|
=> "archlinux"
|
|
531
527
|
|
|
532
|
-
# File: os.rb | Line:
|
|
528
|
+
# File: os.rb | Line: 23
|
|
533
529
|
# Definition: def os_release
|
|
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:
|
|
533
|
+
# File: os.rb | Line: 150
|
|
538
534
|
# Definition: def uptime
|
|
539
535
|
LinuxStat::OS.uptime()
|
|
540
|
-
=> {:hour=>
|
|
536
|
+
=> {:hour=>16, :minute=>16, :second=>1, :jiffy=>430}
|
|
537
|
+
|
|
538
|
+
# File: os.rb | Line: 180
|
|
539
|
+
# Definition: def uptime_f
|
|
540
|
+
LinuxStat::OS.uptime_f()
|
|
541
|
+
=> 58561.43
|
|
541
542
|
|
|
542
|
-
# File: os.rb | Line:
|
|
543
|
+
# File: os.rb | Line: 191
|
|
543
544
|
# Definition: def uptime_i
|
|
544
545
|
LinuxStat::OS.uptime_i()
|
|
545
|
-
=>
|
|
546
|
+
=> 58562
|
|
546
547
|
|
|
547
|
-
# File: os.rb | Line:
|
|
548
|
+
# File: os.rb | Line: 88
|
|
548
549
|
# Definition: def version
|
|
549
550
|
LinuxStat::OS.version()
|
|
550
551
|
=> "rolling"
|
|
@@ -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 =
|
|
598
|
-
=> "
|
|
598
|
+
LinuxStat::PrettifyBytes.convert_binary(n = 55206562261629, precision:)
|
|
599
|
+
=> "50.21 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 =
|
|
603
|
-
=> "
|
|
603
|
+
LinuxStat::PrettifyBytes.convert_decimal(n = 341141363483637, precision:)
|
|
604
|
+
=> "341.14 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 =
|
|
608
|
-
=> "
|
|
608
|
+
LinuxStat::PrettifyBytes.convert_short_binary(n = 175331196815015, precision:)
|
|
609
|
+
=> "159.46 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 =
|
|
613
|
-
=> "
|
|
613
|
+
LinuxStat::PrettifyBytes.convert_short_decimal(n = 789625492086030, precision:)
|
|
614
|
+
=> "789.63 TB"
|
|
615
|
+
|
|
616
|
+
```
|
|
617
|
+
|
|
618
|
+
### LinuxStat::ProcFS
|
|
619
|
+
```
|
|
620
|
+
LinuxStat::ProcFS.last_pid()
|
|
621
|
+
=> 52438
|
|
622
|
+
|
|
623
|
+
LinuxStat::ProcFS.uptime_f()
|
|
624
|
+
=> 58561.65
|
|
614
625
|
|
|
615
626
|
```
|
|
616
627
|
|
|
@@ -619,39 +630,44 @@ LinuxStat::PrettifyBytes.convert_short_decimal(n = 489879177525276, precision:)
|
|
|
619
630
|
# File: process.rb | Line: 57
|
|
620
631
|
# Definition: def cmdlines
|
|
621
632
|
LinuxStat::Process.cmdlines()
|
|
622
|
-
=> {1=>"/
|
|
633
|
+
=> {1=>"/usr/lib/systemd/systemd --system --deserialize 63", 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=>""...
|
|
623
634
|
|
|
624
635
|
# File: process.rb | Line: 29
|
|
625
636
|
# Definition: def count
|
|
626
637
|
LinuxStat::Process.count()
|
|
627
|
-
=>
|
|
638
|
+
=> 212
|
|
628
639
|
|
|
629
|
-
# File: process.rb | Line:
|
|
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,
|
|
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, 165, 168, 170, 171, 175, 180, 181, 182, 183, 184, 185, 186, 187, 189, 231, 234, 275, 447, 502, 21751, 23896, 41972, 41973, 41974, 41975, 41...
|
|
644
|
+
|
|
645
|
+
# File: process.rb | Line: 160
|
|
646
|
+
# Definition: def last_pid
|
|
647
|
+
LinuxStat::Process.last_pid()
|
|
648
|
+
=> 52438
|
|
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,
|
|
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:
|
|
660
|
+
# File: process.rb | Line: 138
|
|
645
661
|
# Definition: def running
|
|
646
662
|
LinuxStat::Process.running()
|
|
647
|
-
=> [
|
|
663
|
+
=> [52438]
|
|
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,
|
|
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, 167, 188, 218, 233, 235, 308, 311, 362, 364, 365, 378, 379, 380, 381, 395, 398, 401, 465, 520, 522,...
|
|
653
669
|
|
|
654
|
-
# File: process.rb | Line:
|
|
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:
|
|
680
|
+
# File: process.rb | Line: 129
|
|
665
681
|
# Definition: def zombie
|
|
666
682
|
LinuxStat::Process.zombie()
|
|
667
683
|
=> []
|
|
@@ -673,59 +689,69 @@ LinuxStat::Process.zombie()
|
|
|
673
689
|
# File: process_info.rb | Line: 61
|
|
674
690
|
# Definition: def cmdline(pid = $$)
|
|
675
691
|
LinuxStat::ProcessInfo.cmdline(pid)
|
|
676
|
-
=> "/usr/bin/ruby /home/sourav/.gem/ruby/2.7.0/bin/linuxstat.rb
|
|
692
|
+
=> "/usr/bin/ruby /home/sourav/.gem/ruby/2.7.0/bin/linuxstat.rb --markdown"
|
|
677
693
|
|
|
678
694
|
# File: process_info.rb | Line: 87
|
|
679
695
|
# Definition: def command_name(pid = $$)
|
|
680
696
|
LinuxStat::ProcessInfo.command_name(pid)
|
|
681
697
|
=> "ruby"
|
|
682
698
|
|
|
683
|
-
# File: process_info.rb | Line:
|
|
699
|
+
# File: process_info.rb | Line: 608
|
|
684
700
|
# Definition: def nproc(pid = $$)
|
|
685
701
|
LinuxStat::ProcessInfo.count_cpu(pid)
|
|
686
702
|
=> 4
|
|
687
703
|
|
|
688
|
-
# File: process_info.rb | Line:
|
|
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=>
|
|
707
|
+
=> {:cpu_usage=>0.0, :threads=>0, :last_executed_cpu=>0}
|
|
708
|
+
|
|
709
|
+
# File: process_info.rb | Line: 619
|
|
710
|
+
# Definition: def cpu_time(pid = $$)
|
|
711
|
+
LinuxStat::ProcessInfo.cpu_time(pid)
|
|
712
|
+
=> 0.4399999976158142
|
|
713
|
+
|
|
714
|
+
# File: process_info.rb | Line: 634
|
|
715
|
+
# Definition: def cpu_times(pid = $$)
|
|
716
|
+
LinuxStat::ProcessInfo.cpu_times(pid)
|
|
717
|
+
=> {:hour=>0, :minute=>0, :second=>0, :jiffy=>439}
|
|
692
718
|
|
|
693
|
-
# File: process_info.rb | Line:
|
|
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:
|
|
724
|
+
# File: process_info.rb | Line: 450
|
|
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:
|
|
729
|
+
# File: process_info.rb | Line: 416
|
|
704
730
|
# Definition: def last_executed_cpu(pid = $$)
|
|
705
731
|
LinuxStat::ProcessInfo.last_executed_cpu(pid)
|
|
706
|
-
=>
|
|
732
|
+
=> 3
|
|
707
733
|
|
|
708
734
|
# File: process_info.rb | Line: 151
|
|
709
735
|
# Definition: def mem_stat(pid = $$)
|
|
710
736
|
LinuxStat::ProcessInfo.mem_stat(pid)
|
|
711
|
-
=> {:memory=>
|
|
737
|
+
=> {:memory=>24735744, :virtual_memory=>96317440, :resident_memory=>30707712, :shared_memory=>5971968}
|
|
712
738
|
|
|
713
|
-
# File: process_info.rb | Line:
|
|
739
|
+
# File: process_info.rb | Line: 171
|
|
714
740
|
# Definition: def memory(pid = $$)
|
|
715
741
|
LinuxStat::ProcessInfo.memory(pid)
|
|
716
|
-
=>
|
|
742
|
+
=> 24735.744
|
|
717
743
|
|
|
718
|
-
# File: process_info.rb | Line:
|
|
744
|
+
# File: process_info.rb | Line: 578
|
|
719
745
|
# Definition: def nice(pid = $$)
|
|
720
746
|
LinuxStat::ProcessInfo.nice(pid)
|
|
721
747
|
=> 0
|
|
722
748
|
|
|
723
|
-
# File: process_info.rb | Line:
|
|
749
|
+
# File: process_info.rb | Line: 608
|
|
724
750
|
# Definition: def nproc(pid = $$)
|
|
725
751
|
LinuxStat::ProcessInfo.nproc(pid)
|
|
726
752
|
=> 4
|
|
727
753
|
|
|
728
|
-
# File: process_info.rb | Line:
|
|
754
|
+
# File: process_info.rb | Line: 471
|
|
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:
|
|
764
|
+
# File: process_info.rb | Line: 213
|
|
739
765
|
# Definition: def resident_memory(pid = $$)
|
|
740
766
|
LinuxStat::ProcessInfo.resident_memory(pid)
|
|
741
|
-
=>
|
|
767
|
+
=> 30707.712
|
|
742
768
|
|
|
743
|
-
# File: process_info.rb | Line:
|
|
769
|
+
# File: process_info.rb | Line: 540
|
|
744
770
|
# Definition: def running_time(pid = $$)
|
|
745
771
|
LinuxStat::ProcessInfo.running_time(pid)
|
|
746
|
-
=> 1.
|
|
772
|
+
=> 1.03
|
|
747
773
|
|
|
748
|
-
# File: process_info.rb | Line:
|
|
774
|
+
# File: process_info.rb | Line: 234
|
|
775
|
+
# Definition: def shared_memory(pid = $$)
|
|
776
|
+
LinuxStat::ProcessInfo.shared_memory(pid)
|
|
777
|
+
=> 5971.968
|
|
778
|
+
|
|
779
|
+
# File: process_info.rb | Line: 521
|
|
749
780
|
# Definition: def start_time(pid = $$)
|
|
750
781
|
LinuxStat::ProcessInfo.start_time(pid)
|
|
751
|
-
=> 2021-
|
|
782
|
+
=> 2021-02-07 03:30:35 +0530
|
|
752
783
|
|
|
753
|
-
# File: process_info.rb | Line:
|
|
784
|
+
# File: process_info.rb | Line: 493
|
|
754
785
|
# Definition: def start_time_epoch(pid = $$)
|
|
755
786
|
LinuxStat::ProcessInfo.start_time_epoch(pid)
|
|
756
|
-
=>
|
|
787
|
+
=> 1612648835
|
|
757
788
|
|
|
758
|
-
# File: process_info.rb | Line:
|
|
789
|
+
# File: process_info.rb | Line: 565
|
|
759
790
|
# Definition: def state(pid = $$)
|
|
760
791
|
LinuxStat::ProcessInfo.state(pid)
|
|
761
792
|
=> "R"
|
|
762
793
|
|
|
763
|
-
# File: process_info.rb | Line:
|
|
794
|
+
# File: process_info.rb | Line: 370
|
|
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:
|
|
799
|
+
# File: process_info.rb | Line: 395
|
|
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=>
|
|
807
|
+
=> {:read_bytes=>1286144, :write_bytes=>0}
|
|
777
808
|
|
|
778
|
-
# File: process_info.rb | Line:
|
|
809
|
+
# File: process_info.rb | Line: 426
|
|
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:
|
|
814
|
+
# File: process_info.rb | Line: 192
|
|
784
815
|
# Definition: def virtual_memory(pid = $$)
|
|
785
816
|
LinuxStat::ProcessInfo.virtual_memory(pid)
|
|
786
|
-
=>
|
|
817
|
+
=> 96317.44
|
|
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:
|
|
828
|
+
# File: swap.rb | Line: 84
|
|
798
829
|
# Definition: def available
|
|
799
830
|
LinuxStat::Swap.available()
|
|
800
|
-
=>
|
|
831
|
+
=> 2328956
|
|
801
832
|
|
|
802
|
-
# File: swap.rb | Line:
|
|
833
|
+
# File: swap.rb | Line: 73
|
|
803
834
|
# Definition: def free
|
|
804
835
|
LinuxStat::Swap.free()
|
|
805
|
-
=>
|
|
836
|
+
=> 2328956
|
|
806
837
|
|
|
807
838
|
# File: swap.rb | Line: 10
|
|
808
839
|
# Definition: def list
|
|
809
840
|
LinuxStat::Swap.list()
|
|
810
|
-
=> {"/dev/zram0"=>[:partition, 4194300,
|
|
841
|
+
=> {"/dev/zram0"=>[:partition, 4194300, 1865344, -2]}
|
|
811
842
|
|
|
812
|
-
# File: swap.rb | Line:
|
|
843
|
+
# File: swap.rb | Line: 127
|
|
813
844
|
# Definition: def percent_available
|
|
814
845
|
LinuxStat::Swap.percent_available()
|
|
815
|
-
=>
|
|
846
|
+
=> 55.53
|
|
816
847
|
|
|
817
|
-
# File: swap.rb | Line:
|
|
848
|
+
# File: swap.rb | Line: 107
|
|
818
849
|
# Definition: def percent_used
|
|
819
850
|
LinuxStat::Swap.percent_used()
|
|
820
|
-
=>
|
|
851
|
+
=> 44.47
|
|
821
852
|
|
|
822
853
|
# File: swap.rb | Line: 34
|
|
823
854
|
# Definition: def stat
|
|
824
855
|
LinuxStat::Swap.stat()
|
|
825
|
-
=> {:total=>4194300, :used=>
|
|
856
|
+
=> {:total=>4194300, :used=>1865344, :available=>2328956, :percent_used=>44.47, :percent_available=>55.53}
|
|
826
857
|
|
|
827
|
-
# File: swap.rb | Line:
|
|
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:
|
|
863
|
+
# File: swap.rb | Line: 98
|
|
833
864
|
# Definition: def used
|
|
834
865
|
LinuxStat::Swap.used()
|
|
835
|
-
=>
|
|
866
|
+
=> 1865344
|
|
836
867
|
|
|
837
868
|
```
|
|
838
869
|
|
|
@@ -906,28 +937,31 @@ LinuxStat::Sysinfo.freehigh()
|
|
|
906
937
|
=> 0
|
|
907
938
|
|
|
908
939
|
LinuxStat::Sysinfo.freeram()
|
|
909
|
-
=>
|
|
940
|
+
=> 258519040
|
|
910
941
|
|
|
911
942
|
LinuxStat::Sysinfo.freeswap()
|
|
912
|
-
=>
|
|
943
|
+
=> 2384850944
|
|
913
944
|
|
|
914
945
|
LinuxStat::Sysinfo.loads()
|
|
915
|
-
=> [
|
|
946
|
+
=> [2.873046875, 1.9189453125, 1.396484375]
|
|
916
947
|
|
|
917
948
|
LinuxStat::Sysinfo.sharedram()
|
|
918
|
-
=>
|
|
949
|
+
=> 644231168
|
|
950
|
+
|
|
951
|
+
LinuxStat::Sysinfo.stat()
|
|
952
|
+
=> {:totalram=>3928297472, :freeram=>258519040, :sharedram=>644231168, :bufferram=>4096, :totalswap=>4294963200, :freeswap=>2384850944, :totalhigh=>0, :freehigh=>0, :uptime=>58562, :loads=>[2.873046875, 1.9189453125, 1.396484375]}
|
|
919
953
|
|
|
920
954
|
LinuxStat::Sysinfo.totalhigh()
|
|
921
955
|
=> 0
|
|
922
956
|
|
|
923
957
|
LinuxStat::Sysinfo.totalram()
|
|
924
|
-
=>
|
|
958
|
+
=> 3928297472
|
|
925
959
|
|
|
926
960
|
LinuxStat::Sysinfo.totalswap()
|
|
927
961
|
=> 4294963200
|
|
928
962
|
|
|
929
963
|
LinuxStat::Sysinfo.uptime()
|
|
930
|
-
=>
|
|
964
|
+
=> 58562
|
|
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=>
|
|
983
|
+
=> [{:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"Processor Fan", :rpm=>2795}]
|
|
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=>
|
|
988
|
+
=> [{:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"SODIMM", :temperature=>33.0}, {:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"CPU", :temperature=>41.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
|
-
=>
|
|
997
|
+
=> 11
|
|
964
998
|
|
|
965
999
|
# File: usb.rb | Line: 139
|
|
966
1000
|
# Definition: def count
|
|
967
1001
|
LinuxStat::USB.count_devices()
|
|
968
|
-
=>
|
|
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=>
|
|
1007
|
+
=> [{:path=>"/sys/bus/usb/devices/1-1.2/", :id=>"04d9:1203", :vendor_id=>"04d9", :product_id=>"1203", :bus_num=>1, :dev_num=>12, :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
|