linux_stat 1.2.1 → 1.4.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: db7b5a4cde62bdc8a2c2aec1e6a2cfb97ab3469a237db98f2377ba168db38fd5
4
- data.tar.gz: 534fa6f2e7187dea5462b2a9a829c78a4fc4e56eae772f8d69edb61fef52788e
3
+ metadata.gz: 219b1bdf4ab0f8c62143e6b8c28059966baa28c33323bf65c718614446377513
4
+ data.tar.gz: 3f38dede32f96b80b74311468524e20e07a87184cbaf55ccbc8c899a86a20eb4
5
5
  SHA512:
6
- metadata.gz: 8bc02b02a355b03a100c59dd91bf813129a415ead5afeccaa4ffe7fcc835c2c501aae2431ca130be1ebc6b8e9fbc5950b39b9cd7cc1aa6a00f98086bfb905a03
7
- data.tar.gz: 6a8ebfa70153fec9e77f8a7756e41ce81bd19851dad4f6bb7fe9f267a1af36d38525bae23e206e420458272fe8369f96373ec01dd3ce2c6a950bd9a62cde9428
6
+ metadata.gz: c0a08fd12c22370baf0080845e64ec8d0ea027d575b238ee02bb1b9dc5e193d12f5c9f3d705490a2ef9824e839dffa549d6840c21b434d08bcae58f1e135768d
7
+ data.tar.gz: f47e5f32f8cac9d4aa5dbb5510f85d8acde8d81c849da28a097ab07cd551cefc2e8c567047a16a4741ab49301d9adf8e33557423b60675b6434514bde831e407
data/README.md CHANGED
@@ -12,7 +12,7 @@ It only works for Linux, and detecting the OS is upto the user of this gem.
12
12
 
13
13
  Languages Used:
14
14
 
15
- <img src="https://linuxstatloc.herokuapp.com/badge.svg" width="260px">
15
+ <img src="https://linuxstatloc.herokuapp.com/svg" width="260px">
16
16
 
17
17
  ---
18
18
 
@@ -73,11 +73,15 @@ gem 'linux_stat'
73
73
 
74
74
  And then execute:
75
75
 
76
- $ bundle install
76
+ ```
77
+ $ bundle install
78
+ ```
77
79
 
78
80
  Or install it yourself as:
79
81
 
80
- $ gem install linux_stat
82
+ ```
83
+ $ gem install linux_stat
84
+ ```
81
85
 
82
86
  ## Usage
83
87
  Following are the LinuxStat modules and module functions.
@@ -85,24 +89,25 @@ It's generated by linuxstat.rb command, which is available after the installatio
85
89
 
86
90
  For ease of use, LinuxStat is also assigned to the LS constant.
87
91
 
92
+ ### LinuxStat::BIOS
88
93
  ### LinuxStat::BIOS
89
94
  ```
90
- # File: bios.rb | Line: 56
95
+ # File: bios.rb | Line: 58
91
96
  # Definition: def date
92
97
  LinuxStat::BIOS.date()
93
98
  => "04/10/2017"
94
99
 
95
- # File: bios.rb | Line: 10
100
+ # File: bios.rb | Line: 12
96
101
  # Definition: def model
97
102
  LinuxStat::BIOS.model()
98
103
  => "Inspiron 5567"
99
104
 
100
- # File: bios.rb | Line: 27
105
+ # File: bios.rb | Line: 29
101
106
  # Definition: def vendor
102
107
  LinuxStat::BIOS.vendor()
103
108
  => "Dell Inc."
104
109
 
105
- # File: bios.rb | Line: 42
110
+ # File: bios.rb | Line: 44
106
111
  # Definition: def version
107
112
  LinuxStat::BIOS.version()
108
113
  => "1.1.2"
@@ -111,417 +116,417 @@ LinuxStat::BIOS.version()
111
116
 
112
117
  ### LinuxStat::Battery
113
118
  ```
114
- # File: battery.rb | Line: 105
119
+ # File: battery.rb | Line: 107
115
120
  # Definition: def charge
116
121
  LinuxStat::Battery.charge()
117
122
  => 100.0
118
123
 
119
- # File: battery.rb | Line: 122
124
+ # File: battery.rb | Line: 124
120
125
  # Definition: def charge_full_design_wh
121
126
  LinuxStat::Battery.charge_full_design_wh()
122
127
  => 42.0
123
128
 
124
- # File: battery.rb | Line: 141
129
+ # File: battery.rb | Line: 143
125
130
  # Definition: def charge_full_wh
126
131
  LinuxStat::Battery.charge_full_wh()
127
132
  => 23.79
128
133
 
129
- # File: battery.rb | Line: 78
134
+ # File: battery.rb | Line: 80
130
135
  # Definition: def charging?
131
136
  LinuxStat::Battery.charging?()
132
137
  => true
133
138
 
134
- # File: battery.rb | Line: 184
139
+ # File: battery.rb | Line: 186
135
140
  # Definition: def devices_stat
136
141
  LinuxStat::Battery.devices_stat()
137
142
  => {: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....
138
143
 
139
- # File: battery.rb | Line: 87
144
+ # File: battery.rb | Line: 89
140
145
  # Definition: def discharging?
141
146
  LinuxStat::Battery.discharging?()
142
147
  => false
143
148
 
144
- # File: battery.rb | Line: 96
149
+ # File: battery.rb | Line: 98
145
150
  # Definition: def full?
146
151
  LinuxStat::Battery.full?()
147
152
  => true
148
153
 
149
- # File: battery.rb | Line: 47
154
+ # File: battery.rb | Line: 49
150
155
  # Definition: def manufacturer
151
156
  LinuxStat::Battery.manufacturer()
152
157
  => "Samsung SDI"
153
158
 
154
- # File: battery.rb | Line: 36
159
+ # File: battery.rb | Line: 38
155
160
  # Definition: def model
156
161
  LinuxStat::Battery.model()
157
162
  => "DELL CYMGM77"
158
163
 
159
- # File: battery.rb | Line: 8
164
+ # File: battery.rb | Line: 10
160
165
  # Definition: def present?
161
166
  LinuxStat::Battery.present?()
162
167
  => true
163
168
 
164
- # File: battery.rb | Line: 16
169
+ # File: battery.rb | Line: 18
165
170
  # Definition: def stat
166
171
  LinuxStat::Battery.stat()
167
172
  => {:model=>"DELL CYMGM77", :manufacturer=>"Samsung SDI", :technology=>"Li-ion", :status=>"Full", :charge=>100.0, :charging=>true, :discharging=>false, :full=>true}
168
173
 
169
- # File: battery.rb | Line: 68
174
+ # File: battery.rb | Line: 70
170
175
  # Definition: def status
171
176
  LinuxStat::Battery.status()
172
177
  => "Full"
173
178
 
174
- # File: battery.rb | Line: 57
179
+ # File: battery.rb | Line: 59
175
180
  # Definition: def technology
176
181
  LinuxStat::Battery.technology()
177
182
  => "Li-ion"
178
183
 
179
- # File: battery.rb | Line: 160
184
+ # File: battery.rb | Line: 162
180
185
  # Definition: def voltage_now
181
186
  LinuxStat::Battery.voltage_now()
182
- => 12.625
187
+ => 12.537
183
188
 
184
189
  ```
185
190
 
186
191
  ### LinuxStat::CPU
187
192
  ```
188
- # File: cpu.rb | Line: 287
193
+ # File: cpu.rb | Line: 289
189
194
  # Definition: def available_governors
190
195
  LinuxStat::CPU.available_governors()
191
196
  => {"cpu0"=>["performance", "powersave"], "cpu1"=>["performance", "powersave"], "cpu2"=>["performance", "powersave"], "cpu3"=>["performance", "powersave"]}
192
197
 
193
- # File: cpu.rb | Line: 86
198
+ # File: cpu.rb | Line: 88
194
199
  # Definition: def count
195
200
  LinuxStat::CPU.count()
196
201
  => 4
197
202
 
198
- # File: cpu.rb | Line: 103
203
+ # File: cpu.rb | Line: 105
199
204
  # Definition: def count_online
200
205
  LinuxStat::CPU.count_online()
201
206
  => 4
202
207
 
203
- # File: cpu.rb | Line: 197
208
+ # File: cpu.rb | Line: 199
204
209
  # Definition: def cur_freq
205
210
  LinuxStat::CPU.cur_freq()
206
- => {"cpu0"=>1999999, "cpu1"=>2000045, "cpu2"=>2000144, "cpu3"=>2000034}
211
+ => {"cpu0"=>1999901, "cpu1"=>1999408, "cpu2"=>2000039, "cpu3"=>2000019}
207
212
 
208
- # File: cpu.rb | Line: 265
213
+ # File: cpu.rb | Line: 267
209
214
  # Definition: def governor
210
215
  LinuxStat::CPU.governor()
211
216
  => {"cpu0"=>"performance", "cpu1"=>"performance", "cpu2"=>"performance", "cpu3"=>"performance"}
212
217
 
213
- # File: cpu.rb | Line: 241
218
+ # File: cpu.rb | Line: 243
214
219
  # Definition: def max_freq
215
220
  LinuxStat::CPU.max_freq()
216
221
  => {"cpu0"=>2000000, "cpu1"=>2000000, "cpu2"=>2000000, "cpu3"=>2000000}
217
222
 
218
- # File: cpu.rb | Line: 219
223
+ # File: cpu.rb | Line: 221
219
224
  # Definition: def min_freq
220
225
  LinuxStat::CPU.min_freq()
221
226
  => {"cpu0"=>2000000, "cpu1"=>2000000, "cpu2"=>2000000, "cpu3"=>2000000}
222
227
 
223
- # File: cpu.rb | Line: 184
228
+ # File: cpu.rb | Line: 186
224
229
  # Definition: def model
225
230
  LinuxStat::CPU.model()
226
231
  => "Intel(R) Core(TM) i3-6006U CPU @ 2.00GHz"
227
232
 
228
- # File: cpu.rb | Line: 163
233
+ # File: cpu.rb | Line: 165
229
234
  # Definition: def offline
230
235
  LinuxStat::CPU.offline()
231
236
  => []
232
237
 
233
- # File: cpu.rb | Line: 132
238
+ # File: cpu.rb | Line: 134
234
239
  # Definition: def online
235
240
  LinuxStat::CPU.online()
236
241
  => [0, 1, 2, 3]
237
242
 
238
- # File: cpu.rb | Line: 23
243
+ # File: cpu.rb | Line: 25
239
244
  # Definition: def stat(sleep = ticks_to_ms_t5)
240
245
  LinuxStat::CPU.stat(sleep)
241
- => {0=>10.0, 1=>0.0, 2=>0.0, 3=>16.67, 4=>0.0}
246
+ => {0=>27.78, 1=>20.0, 2=>25.0, 3=>25.0, 4=>40.0}
242
247
 
243
- # File: cpu.rb | Line: 63
248
+ # File: cpu.rb | Line: 65
244
249
  # Definition: def total_usage(sleep = ticks_to_ms_t5)
245
250
  LinuxStat::CPU.total_usage(sleep)
246
- => 19.05
251
+ => 25.0
247
252
 
248
- # File: cpu.rb | Line: 63
253
+ # File: cpu.rb | Line: 65
249
254
  # Definition: def total_usage(sleep = ticks_to_ms_t5)
250
255
  LinuxStat::CPU.usage(sleep)
251
- => 5.26
256
+ => 25.0
252
257
 
253
- # File: cpu.rb | Line: 23
258
+ # File: cpu.rb | Line: 25
254
259
  # Definition: def stat(sleep = ticks_to_ms_t5)
255
260
  LinuxStat::CPU.usages(sleep)
256
- => {0=>5.26, 1=>0.0, 2=>0.0, 3=>33.33, 4=>20.0}
261
+ => {0=>25.0, 1=>20.0, 2=>33.33, 3=>20.0, 4=>0.0}
257
262
 
258
263
  ```
259
264
 
260
265
  ### LinuxStat::FS
261
266
  ```
262
267
  LinuxStat::FS.stat(arg = "/")
263
- => {:block_size=>4096, :fragment_size=>4096, :blocks=>29292283, :block_free=>10846968, :block_avail_unpriv=>10846968, :inodes=>58612160, :free_inodes=>56825184, :filesystem_id=>2050, :mount_flags=>1024, :max_filename_length=>255}
268
+ => {:block_size=>4096, :fragment_size=>4096, :blocks=>29292283, :block_free=>7268389, :block_avail_unpriv=>7268389, :inodes=>58612160, :free_inodes=>56907397, :filesystem_id=>2050, :mount_flags=>1024, :max_filename_length=>255}
264
269
 
265
270
  ```
266
271
 
267
272
  ### LinuxStat::Filesystem
268
273
  ```
269
- # File: filesystem.rb | Line: 92
274
+ # File: filesystem.rb | Line: 94
270
275
  # Definition: def available(fs = ?..freeze)
271
276
  LinuxStat::Filesystem.available(fs)
272
- => 44429180928
277
+ => 29771321344
273
278
 
274
- # File: filesystem.rb | Line: 58
279
+ # File: filesystem.rb | Line: 60
275
280
  # Definition: def free(fs = ?..freeze)
276
281
  LinuxStat::Filesystem.free(fs)
277
- => 44429180928
282
+ => 29771321344
278
283
 
279
- # File: filesystem.rb | Line: 19
284
+ # File: filesystem.rb | Line: 21
280
285
  # Definition: def stat(fs = ?..freeze)
281
286
  LinuxStat::Filesystem.stat(fs)
282
- => {:total=>119981191168, :free=>44429180928, :used=>75552010240}
287
+ => {:total=>119981191168, :free=>29771321344, :used=>90209869824}
283
288
 
284
- # File: filesystem.rb | Line: 108
289
+ # File: filesystem.rb | Line: 110
285
290
  # Definition: def stat_raw(fs = ?..freeze)
286
291
  LinuxStat::Filesystem.stat_raw(fs)
287
- => {:block_size=>4096, :fragment_size=>4096, :blocks=>29292283, :block_free=>10846968, :block_avail_unpriv=>10846968, :inodes=>58612160, :free_inodes=>56825184, :filesystem_id=>2050, :mount_flags=>1024, :max_filename_length=>255}
292
+ => {:block_size=>4096, :fragment_size=>4096, :blocks=>29292283, :block_free=>7268389, :block_avail_unpriv=>7268389, :inodes=>58612160, :free_inodes=>56907397, :filesystem_id=>2050, :mount_flags=>1024, :max_filename_length=>255}
288
293
 
289
- # File: filesystem.rb | Line: 39
294
+ # File: filesystem.rb | Line: 41
290
295
  # Definition: def total(fs = ?..freeze)
291
296
  LinuxStat::Filesystem.total(fs)
292
297
  => 119981191168
293
298
 
294
- # File: filesystem.rb | Line: 73
299
+ # File: filesystem.rb | Line: 75
295
300
  # Definition: def used(fs = ?..freeze)
296
301
  LinuxStat::Filesystem.used(fs)
297
- => 75552010240
302
+ => 90209869824
298
303
 
299
304
  ```
300
305
 
301
306
  ### LinuxStat::Kernel
302
307
  ```
303
- # File: kernel.rb | Line: 86
308
+ # File: kernel.rb | Line: 88
304
309
  # Definition: def build_date
305
310
  LinuxStat::Kernel.build_date()
306
- => 2020-12-24 18:28:16 +0000
311
+ => 2020-11-20 07:44:55 +0000
307
312
 
308
- # File: kernel.rb | Line: 140
313
+ # File: kernel.rb | Line: 142
309
314
  # Definition: def build_date_string
310
315
  LinuxStat::Kernel.build_date_string()
311
- => "24 Dec 2020 18:28:16 +0000"
316
+ => "20 Nov 2020 07:44:55 +0000"
312
317
 
313
- # File: kernel.rb | Line: 21
318
+ # File: kernel.rb | Line: 23
314
319
  # Definition: def build_user
315
320
  LinuxStat::Kernel.build_user()
316
321
  => "souravgoswami@archlinux"
317
322
 
318
- # File: kernel.rb | Line: 179
323
+ # File: kernel.rb | Line: 181
319
324
  # Definition: def ticks
320
325
  LinuxStat::Kernel.clk_tck()
321
326
  => 100
322
327
 
323
- # File: kernel.rb | Line: 33
328
+ # File: kernel.rb | Line: 35
324
329
  # Definition: def compiler
325
330
  LinuxStat::Kernel.compiler()
326
331
  => [:gcc, "10.2.0"]
327
332
 
328
- # File: kernel.rb | Line: 55
333
+ # File: kernel.rb | Line: 57
329
334
  # Definition: def compiler_version
330
335
  LinuxStat::Kernel.compiler_version()
331
336
  => "10.2.0"
332
337
 
333
- # File: kernel.rb | Line: 10
338
+ # File: kernel.rb | Line: 12
334
339
  # Definition: def version
335
340
  LinuxStat::Kernel.release()
336
- => "5.10.2-xanmod1-cacule-1-cacule"
341
+ => "5.9.9-xanmod1-1"
337
342
 
338
- # File: kernel.rb | Line: 169
343
+ # File: kernel.rb | Line: 171
339
344
  # Definition: def string
340
345
  LinuxStat::Kernel.string()
341
- => "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"
346
+ => "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"
342
347
 
343
- # File: kernel.rb | Line: 179
348
+ # File: kernel.rb | Line: 181
344
349
  # Definition: def ticks
345
350
  LinuxStat::Kernel.ticks()
346
351
  => 100
347
352
 
348
- # File: kernel.rb | Line: 10
353
+ # File: kernel.rb | Line: 12
349
354
  # Definition: def version
350
355
  LinuxStat::Kernel.version()
351
- => "5.10.2-xanmod1-cacule-1-cacule"
356
+ => "5.9.9-xanmod1-1"
352
357
 
353
358
  ```
354
359
 
355
360
  ### LinuxStat::Memory
356
361
  ```
357
- # File: memory.rb | Line: 50
362
+ # File: memory.rb | Line: 52
358
363
  # Definition: def available
359
364
  LinuxStat::Memory.available()
360
- => 375384
365
+ => 337416
361
366
 
362
- # File: memory.rb | Line: 81
367
+ # File: memory.rb | Line: 83
363
368
  # Definition: def percent_available
364
369
  LinuxStat::Memory.percent_available()
365
- => 9.79
370
+ => 8.8
366
371
 
367
- # File: memory.rb | Line: 70
372
+ # File: memory.rb | Line: 72
368
373
  # Definition: def percent_used
369
374
  LinuxStat::Memory.percent_used()
370
- => 90.21
375
+ => 91.2
371
376
 
372
- # File: memory.rb | Line: 11
377
+ # File: memory.rb | Line: 13
373
378
  # Definition: def stat
374
379
  LinuxStat::Memory.stat()
375
- => {:total=>3836036, :used=>3460652, :available=>375384, :percent_used=>90.21, :percent_available=>9.79}
380
+ => {:total=>3836228, :used=>3498812, :available=>337416, :percent_used=>91.2, :percent_available=>8.8}
376
381
 
377
- # File: memory.rb | Line: 40
382
+ # File: memory.rb | Line: 42
378
383
  # Definition: def total
379
384
  LinuxStat::Memory.total()
380
- => 3836036
385
+ => 3836228
381
386
 
382
- # File: memory.rb | Line: 60
387
+ # File: memory.rb | Line: 62
383
388
  # Definition: def used
384
389
  LinuxStat::Memory.used()
385
- => 3460652
390
+ => 3498812
386
391
 
387
392
  ```
388
393
 
389
394
  ### LinuxStat::Mounts
390
395
  ```
391
- # File: mounts.rb | Line: 179
396
+ # File: mounts.rb | Line: 181
392
397
  # Definition: def device_stat(dev = root)
393
398
  LinuxStat::Mounts.device_stat(dev)
394
- => {:mountpoint=>"/", :total=>119981191168, :free=>44429180928, :available=>44429180928, :used=>75552010240, :percent_used=>62.97, :percent_free=>37.03, :percent_available=>37.03}
399
+ => {:mountpoint=>"/", :total=>119981191168, :free=>29771321344, :available=>29771321344, :used=>90209869824, :percent_used=>75.19, :percent_free=>24.81, :percent_available=>24.81}
395
400
 
396
- # File: mounts.rb | Line: 137
401
+ # File: mounts.rb | Line: 139
397
402
  # Definition: def devices_stat
398
403
  LinuxStat::Mounts.devices_stat()
399
404
  => {"proc"=>{:mountpoint=>"/proc", :total=>0, :free=>0, :available=>0, :used=>0, :percent_used=>NaN, :percent_free=>NaN, :percent_available=>NaN}, "sys"=>{:mountpoint=>"/sys", :total=>0, :free=>0, :available=>0, :used=>0, :percent_used=>NaN, :percent_fre...
400
405
 
401
- # File: mounts.rb | Line: 11
406
+ # File: mounts.rb | Line: 13
402
407
  # Definition: def list
403
408
  LinuxStat::Mounts.list()
404
- => ["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=1909248k,nr_inodes=477312,mode=755,inode64 0 0", "run /run tmpfs rw,nosuid,nodev,relatime,mode=755...
409
+ => ["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", "...
405
410
 
406
- # File: mounts.rb | Line: 20
411
+ # File: mounts.rb | Line: 22
407
412
  # Definition: def list_devices
408
413
  LinuxStat::Mounts.list_devices()
409
- => ["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...
414
+ => ["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...
410
415
 
411
- # File: mounts.rb | Line: 109
416
+ # File: mounts.rb | Line: 111
412
417
  # Definition: def list_devices_mount_point
413
418
  LinuxStat::Mounts.list_devices_mount_point()
414
- => {"proc"=>"/proc", "sys"=>"/sys", "dev"=>"/dev", "run"=>"/run", "/dev/sda2"=>"/", "securityfs"=>"/sys/kernel/security", "tmpfs"=>"/run/user/0", "devpts"=>"/dev/pts", "cgroup2"=>"/sys/fs/cgroup/unified", "cgroup"=>"/sys/fs/cgroup/cpuset", "pstore"=>"/sy...
419
+ => {"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"=>"...
415
420
 
416
- # File: mounts.rb | Line: 80
421
+ # File: mounts.rb | Line: 82
417
422
  # Definition: def mount_point(dev = root)
418
423
  LinuxStat::Mounts.mount_point(dev)
419
424
  => "/"
420
425
 
421
- # File: mounts.rb | Line: 29
426
+ # File: mounts.rb | Line: 31
422
427
  # Definition: def root
423
428
  LinuxStat::Mounts.root()
424
429
  => "/dev/sda2"
425
430
 
426
- # File: mounts.rb | Line: 38
431
+ # File: mounts.rb | Line: 40
427
432
  # Definition: def root_fs
428
433
  LinuxStat::Mounts.root_fs()
429
434
  => "xfs"
430
435
 
431
- # File: mounts.rb | Line: 47
436
+ # File: mounts.rb | Line: 49
432
437
  # Definition: def root_mount_options
433
438
  LinuxStat::Mounts.root_mount_options()
434
439
  => "rw,noatime,attr2,inode64,logbufs=8,logbsize=32k,noquota"
435
440
 
436
- # File: mounts.rb | Line: 56
441
+ # File: mounts.rb | Line: 58
437
442
  # Definition: def tmpfs
438
443
  LinuxStat::Mounts.tmpfs()
439
- => {"/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", "/ramdisk"=>"tmpfs /ramdisk tmpfs rw,nosuid,nodev,relatime,size=6291...
444
+ => {"/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...
440
445
 
441
446
  ```
442
447
 
443
448
  ### LinuxStat::Net
444
449
  ```
445
- # File: net.rb | Line: 84
450
+ # File: net.rb | Line: 86
446
451
  # Definition: def usage(interval = 0.1)
447
452
  LinuxStat::Net.current_usage(interval)
448
- => {:received=>279000.0, :transmitted=>5640.0}
453
+ => {:received=>0.0, :transmitted=>0.0}
449
454
 
450
- # File: net.rb | Line: 10
455
+ # File: net.rb | Line: 12
451
456
  # Definition: def ipv4_private
452
457
  LinuxStat::Net.ipv4_private()
453
- => "192.168.0.102"
458
+ => "192.168.43.107"
454
459
 
455
- # File: net.rb | Line: 25
460
+ # File: net.rb | Line: 27
456
461
  # Definition: def total_bytes
457
462
  LinuxStat::Net.total_bytes()
458
- => {:received=>2093813713, :transmitted=>138899807}
463
+ => {:received=>936112008, :transmitted=>141554101}
459
464
 
460
- # File: net.rb | Line: 43
465
+ # File: net.rb | Line: 45
461
466
  # Definition: def total_bytes_received
462
467
  LinuxStat::Net.total_bytes_received()
463
- => 2093813713
468
+ => 936112008
464
469
 
465
- # File: net.rb | Line: 56
470
+ # File: net.rb | Line: 58
466
471
  # Definition: def total_bytes_transmitted
467
472
  LinuxStat::Net.total_bytes_transmitted()
468
- => 138899807
473
+ => 141554101
469
474
 
470
- # File: net.rb | Line: 84
475
+ # File: net.rb | Line: 86
471
476
  # Definition: def usage(interval = 0.1)
472
477
  LinuxStat::Net.usage(interval)
473
- => {:received=>419320.0, :transmitted=>10340.0}
478
+ => {:received=>0.0, :transmitted=>0.0}
474
479
 
475
480
  ```
476
481
 
477
482
  ### LinuxStat::OS
478
483
  ```
479
- # File: os.rb | Line: 127
484
+ # File: os.rb | Line: 129
480
485
  # Definition: def bits
481
486
  LinuxStat::OS.bits()
482
487
  => 64
483
488
 
484
- # File: os.rb | Line: 82
489
+ # File: os.rb | Line: 84
485
490
  # Definition: def version
486
491
  LinuxStat::OS.distrib_version()
487
492
  => "rolling"
488
493
 
489
- # File: os.rb | Line: 44
494
+ # File: os.rb | Line: 46
490
495
  # Definition: def distribution
491
496
  LinuxStat::OS.distribution()
492
497
  => "Arch Linux"
493
498
 
494
- # File: os.rb | Line: 115
499
+ # File: os.rb | Line: 117
495
500
  # Definition: def hostname
496
501
  LinuxStat::OS.hostname()
497
502
  => "archlinux"
498
503
 
499
- # File: os.rb | Line: 33
504
+ # File: os.rb | Line: 35
500
505
  # Definition: def lsb_release
501
506
  LinuxStat::OS.lsb_release()
502
507
  => {:LSB_VERSION=>"1.4", :DISTRIB_ID=>"Arch", :DISTRIB_RELEASE=>"rolling", :DISTRIB_DESCRIPTION=>"Arch Linux"}
503
508
 
504
- # File: os.rb | Line: 98
509
+ # File: os.rb | Line: 100
505
510
  # Definition: def machine
506
511
  LinuxStat::OS.machine()
507
512
  => "x86_64"
508
513
 
509
- # File: os.rb | Line: 106
514
+ # File: os.rb | Line: 108
510
515
  # Definition: def nodename
511
516
  LinuxStat::OS.nodename()
512
517
  => "archlinux"
513
518
 
514
- # File: os.rb | Line: 17
519
+ # File: os.rb | Line: 19
515
520
  # Definition: def os_release
516
521
  LinuxStat::OS.os_release()
517
522
  => {: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/"...
518
523
 
519
- # File: os.rb | Line: 142
524
+ # File: os.rb | Line: 144
520
525
  # Definition: def uptime
521
526
  LinuxStat::OS.uptime()
522
- => {:hour=>14, :minute=>24, :second=>12.06}
527
+ => {:hour=>14, :minute=>8, :second=>42.08}
523
528
 
524
- # File: os.rb | Line: 82
529
+ # File: os.rb | Line: 84
525
530
  # Definition: def version
526
531
  LinuxStat::OS.version()
527
532
  => "rolling"
@@ -530,37 +535,37 @@ LinuxStat::OS.version()
530
535
 
531
536
  ### LinuxStat::PCI
532
537
  ```
533
- # File: pci.rb | Line: 211
538
+ # File: pci.rb | Line: 216
534
539
  # Definition: def count
535
540
  LinuxStat::PCI.count()
536
541
  => 13
537
542
 
538
- # File: pci.rb | Line: 211
543
+ # File: pci.rb | Line: 216
539
544
  # Definition: def count
540
545
  LinuxStat::PCI.count_devices()
541
546
  => 13
542
547
 
543
- # File: pci.rb | Line: 52
548
+ # File: pci.rb | Line: 54
544
549
  # Definition: def devices_info(hwdata: true)
545
550
  LinuxStat::PCI.devices_info(hwdata:)
546
551
  => [{: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...
547
552
 
548
- # File: pci.rb | Line: 128
553
+ # File: pci.rb | Line: 130
549
554
  # Definition: def devices_stat(hwdata: true)
550
555
  LinuxStat::PCI.devices_stat(hwdata:)
551
556
  => [{: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...
552
557
 
553
- # File: pci.rb | Line: 259
558
+ # File: pci.rb | Line: 264
554
559
  # Definition: def hwdata_file
555
560
  LinuxStat::PCI.hwdata_file()
556
561
  => "/usr/share/hwdata/pci.ids"
557
562
 
558
- # File: pci.rb | Line: 248
563
+ # File: pci.rb | Line: 253
559
564
  # Definition: def hwdata_file_set?
560
565
  LinuxStat::PCI.hwdata_file_set?()
561
566
  => true
562
567
 
563
- # File: pci.rb | Line: 275
568
+ # File: pci.rb | Line: 280
564
569
  # Definition: def initialize_hwdata
565
570
  LinuxStat::PCI.initialize_hwdata()
566
571
  => false
@@ -569,66 +574,76 @@ LinuxStat::PCI.initialize_hwdata()
569
574
 
570
575
  ### LinuxStat::PrettifyBytes
571
576
  ```
572
- # File: prettify_bytes.rb | Line: 42
573
- # Definition: def convert_binary(n)
574
- LinuxStat::PrettifyBytes.convert_binary(n = 320846048510750)
575
- => "291.81 tebibytes"
577
+ # File: prettify_bytes.rb | Line: 49
578
+ # Definition: def convert_binary(n, precision: 2)
579
+ LinuxStat::PrettifyBytes.convert_binary(n = 327222499582327, precision:)
580
+ => "297.61 tebibytes"
576
581
 
577
- # File: prettify_bytes.rb | Line: 19
578
- # Definition: def convert_decimal(n)
579
- LinuxStat::PrettifyBytes.convert_decimal(n = 996984130887475)
580
- => "996.98 terabytes"
582
+ # File: prettify_bytes.rb | Line: 26
583
+ # Definition: def convert_decimal(n, precision: 2)
584
+ LinuxStat::PrettifyBytes.convert_decimal(n = 812496332434396, precision:)
585
+ => "812.50 terabytes"
581
586
 
582
- # File: prettify_bytes.rb | Line: 90
583
- # Definition: def convert_short_binary(n)
584
- LinuxStat::PrettifyBytes.convert_short_binary(n = 396350966829319)
585
- => "360.48 TiB"
587
+ # File: prettify_bytes.rb | Line: 97
588
+ # Definition: def convert_short_binary(n, precision: 2)
589
+ LinuxStat::PrettifyBytes.convert_short_binary(n = 447429857254915, precision:)
590
+ => "406.94 TiB"
586
591
 
587
- # File: prettify_bytes.rb | Line: 65
588
- # Definition: def convert_short_decimal(n)
589
- LinuxStat::PrettifyBytes.convert_short_decimal(n = 558910893490277)
590
- => "558.91 TB"
592
+ # File: prettify_bytes.rb | Line: 72
593
+ # Definition: def convert_short_decimal(n, precision: 2)
594
+ LinuxStat::PrettifyBytes.convert_short_decimal(n = 157028156498063, precision:)
595
+ => "157.03 TB"
591
596
 
592
597
  ```
593
598
 
594
599
  ### LinuxStat::Process
595
600
  ```
596
- # File: process.rb | Line: 19
601
+ # File: process.rb | Line: 57
602
+ # Definition: def cmdlines
603
+ LinuxStat::Process.cmdlines()
604
+ => {1=>"/sbin/init", 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=>""...
605
+
606
+ # File: process.rb | Line: 29
597
607
  # Definition: def count
598
608
  LinuxStat::Process.count()
599
- => 210
609
+ => 209
600
610
 
601
- # File: process.rb | Line: 71
611
+ # File: process.rb | Line: 124
602
612
  # Definition: def idle
603
613
  LinuxStat::Process.idle()
604
- => [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, 164, 166, 169, 170, 173, 175, 180, 181, 182, 183, 184, 185, 186, 188, 231, 275, 315, 323, 333, 3142, 3143, 3144, 3145, 3146, 3147, 20004, 29...
614
+ => [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, 164, 166, 168, 169, 172, 174, 179, 180, 181, 182, 183, 184, 185, 186, 230, 234, 283, 418, 426, 428, 5731, 5732, 5733, 5734, 5735, 5736, 517...
605
615
 
606
- # File: process.rb | Line: 8
616
+ # File: process.rb | Line: 11
607
617
  # Definition: def list
608
618
  LinuxStat::Process.list()
609
- => [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, 109, 113, 114, 116, 117, 119, 122, 131, 134, 140,...
619
+ => [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, 111, 114, 115, 117, 118, 119, 121, 131, 134,...
610
620
 
611
- # File: process.rb | Line: 25
621
+ # File: process.rb | Line: 36
612
622
  # Definition: def names
613
623
  LinuxStat::Process.names()
614
- => {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...
624
+ => {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...
615
625
 
616
- # File: process.rb | Line: 97
626
+ # File: process.rb | Line: 150
617
627
  # Definition: def running
618
628
  LinuxStat::Process.running()
619
- => [34967]
629
+ => [474, 628, 643, 55770]
620
630
 
621
- # File: process.rb | Line: 58
631
+ # File: process.rb | Line: 111
622
632
  # Definition: def sleeping
623
633
  LinuxStat::Process.sleeping()
624
- => [1, 2, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 24, 25, 26, 27, 28, 31, 32, 33, 34, 35, 38, 40, 41, 42, 43, 44, 46, 47, 48, 109, 113, 114, 163, 165, 189, 218, 232, 271, 302, 314, 316, 319, 321, 322, 324, 325, 326, 327, 345, 348, 351, 376, 403, 405, 406...
634
+ => [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, 111, 114, 115, 163, 165, 187, 216, 233, 235, 349, 350, 352, 353, 363, 425, 427, 451, 452, 453, 454, 468, 470, 474, 485,...
635
+
636
+ # File: process.rb | Line: 163
637
+ # Definition: def stopped
638
+ LinuxStat::Process.stopped()
639
+ => []
625
640
 
626
- # File: process.rb | Line: 37
641
+ # File: process.rb | Line: 78
627
642
  # Definition: def types
628
643
  LinuxStat::Process.types()
629
- => {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...
644
+ => {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...
630
645
 
631
- # File: process.rb | Line: 84
646
+ # File: process.rb | Line: 137
632
647
  # Definition: def zombie
633
648
  LinuxStat::Process.zombie()
634
649
  => []
@@ -637,166 +652,171 @@ LinuxStat::Process.zombie()
637
652
 
638
653
  ### LinuxStat::ProcessInfo
639
654
  ```
640
- # File: process_info.rb | Line: 54
655
+ # File: process_info.rb | Line: 61
641
656
  # Definition: def cmdline(pid = $$)
642
657
  LinuxStat::ProcessInfo.cmdline(pid)
643
- => "/usr/bin/ruby /home/sourav/.gem/ruby/2.7.0/bin/linuxstat.rb --markdown"
658
+ => "/usr/bin/ruby /home/sourav/.gem/ruby/2.7.0/bin/linuxstat.rb -md"
644
659
 
645
- # File: process_info.rb | Line: 78
660
+ # File: process_info.rb | Line: 87
646
661
  # Definition: def command_name(pid = $$)
647
662
  LinuxStat::ProcessInfo.command_name(pid)
648
663
  => "ruby"
649
664
 
650
- # File: process_info.rb | Line: 640
665
+ # File: process_info.rb | Line: 708
651
666
  # Definition: def nproc(pid = $$)
652
667
  LinuxStat::ProcessInfo.count_cpu(pid)
653
668
  => 4
654
669
 
655
- # File: process_info.rb | Line: 247
670
+ # File: process_info.rb | Line: 284
656
671
  # Definition: def cpu_stat(pid: $$, sleep: ticks_to_ms_t5)
657
672
  LinuxStat::ProcessInfo.cpu_stat(pid:, sleep:)
658
- => {:cpu_usage=>0.0, :threads=>1, :last_executed_cpu=>3}
673
+ => {:cpu_usage=>0.0, :threads=>1, :last_executed_cpu=>2}
659
674
 
660
- # File: process_info.rb | Line: 307
675
+ # File: process_info.rb | Line: 350
661
676
  # Definition: def cpu_usage(pid: $$, sleep: ticks_to_ms_t5)
662
677
  LinuxStat::ProcessInfo.cpu_usage(pid:, sleep:)
663
- => 0.0
678
+ => 5.0
664
679
 
665
- # File: process_info.rb | Line: 470
680
+ # File: process_info.rb | Line: 525
666
681
  # Definition: def gid(pid = $$)
667
682
  LinuxStat::ProcessInfo.gid(pid)
668
683
  => {:real=>1000, :effective=>1000, :saved_set=>1000, :filesystem_uid=>1000}
669
684
 
670
- # File: process_info.rb | Line: 433
685
+ # File: process_info.rb | Line: 487
671
686
  # Definition: def last_executed_cpu(pid = $$)
672
687
  LinuxStat::ProcessInfo.last_executed_cpu(pid)
673
- => 3
688
+ => 2
674
689
 
675
- # File: process_info.rb | Line: 114
690
+ # File: process_info.rb | Line: 151
676
691
  # Definition: def mem_stat(pid = $$)
677
692
  LinuxStat::ProcessInfo.mem_stat(pid)
678
- => {:memory=>26836.992, :virtual_memory=>97992.704, :resident_memory=>32841.728}
693
+ => {:memory=>24842.24, :virtual_memory=>96309.248, :resident_memory=>30720.0}
679
694
 
680
- # File: process_info.rb | Line: 147
695
+ # File: process_info.rb | Line: 184
681
696
  # Definition: def memory(pid = $$)
682
697
  LinuxStat::ProcessInfo.memory(pid)
683
- => 26836.992
698
+ => 24842.24
684
699
 
685
- # File: process_info.rb | Line: 607
700
+ # File: process_info.rb | Line: 672
686
701
  # Definition: def nice(pid = $$)
687
702
  LinuxStat::ProcessInfo.nice(pid)
688
703
  => 0
689
704
 
690
- # File: process_info.rb | Line: 640
705
+ # File: process_info.rb | Line: 708
691
706
  # Definition: def nproc(pid = $$)
692
707
  LinuxStat::ProcessInfo.nproc(pid)
693
708
  => 4
694
709
 
695
- # File: process_info.rb | Line: 491
710
+ # File: process_info.rb | Line: 546
696
711
  # Definition: def owner(pid = $$)
697
712
  LinuxStat::ProcessInfo.owner(pid)
698
713
  => "sourav"
699
714
 
700
- # File: process_info.rb | Line: 197
715
+ # File: process_info.rb | Line: 112
716
+ # Definition: def process_name(pid = $$)
717
+ LinuxStat::ProcessInfo.process_name(pid)
718
+ => "linuxstat.rb"
719
+
720
+ # File: process_info.rb | Line: 234
701
721
  # Definition: def resident_memory(pid = $$)
702
722
  LinuxStat::ProcessInfo.resident_memory(pid)
703
- => 32841.728
723
+ => 30720.0
704
724
 
705
- # File: process_info.rb | Line: 563
725
+ # File: process_info.rb | Line: 621
706
726
  # Definition: def running_time(pid = $$)
707
727
  LinuxStat::ProcessInfo.running_time(pid)
708
- => 1.04
728
+ => 1.19
709
729
 
710
- # File: process_info.rb | Line: 544
730
+ # File: process_info.rb | Line: 602
711
731
  # Definition: def start_time(pid = $$)
712
732
  LinuxStat::ProcessInfo.start_time(pid)
713
- => 2020-12-29 01:58:56 +0530
733
+ => 2021-01-20 00:10:50 +0530
714
734
 
715
- # File: process_info.rb | Line: 513
735
+ # File: process_info.rb | Line: 568
716
736
  # Definition: def start_time_epoch(pid = $$)
717
737
  LinuxStat::ProcessInfo.start_time_epoch(pid)
718
- => 1609187336
738
+ => 1611081650
719
739
 
720
- # File: process_info.rb | Line: 592
740
+ # File: process_info.rb | Line: 653
721
741
  # Definition: def state(pid = $$)
722
742
  LinuxStat::ProcessInfo.state(pid)
723
743
  => "R"
724
744
 
725
- # File: process_info.rb | Line: 359
745
+ # File: process_info.rb | Line: 407
726
746
  # Definition: def thread_usage(pid: $$, sleep: ticks_to_ms_t5)
727
747
  LinuxStat::ProcessInfo.thread_usage(pid:, sleep:)
728
748
  => 0.0
729
749
 
730
- # File: process_info.rb | Line: 408
750
+ # File: process_info.rb | Line: 462
731
751
  # Definition: def threads(pid = $$)
732
752
  LinuxStat::ProcessInfo.threads(pid)
733
753
  => 1
734
754
 
735
- # File: process_info.rb | Line: 23
755
+ # File: process_info.rb | Line: 30
736
756
  # Definition: def total_io(pid = $$)
737
757
  LinuxStat::ProcessInfo.total_io(pid)
738
- => {:read_bytes=>1249280, :write_bytes=>0}
758
+ => {:read_bytes=>1286144, :write_bytes=>0}
739
759
 
740
- # File: process_info.rb | Line: 446
760
+ # File: process_info.rb | Line: 501
741
761
  # Definition: def uid(pid = $$)
742
762
  LinuxStat::ProcessInfo.uid(pid)
743
763
  => {:real=>1000, :effective=>1000, :saved_set=>1000, :filesystem_uid=>1000}
744
764
 
745
- # File: process_info.rb | Line: 172
765
+ # File: process_info.rb | Line: 209
746
766
  # Definition: def virtual_memory(pid = $$)
747
767
  LinuxStat::ProcessInfo.virtual_memory(pid)
748
- => 97992.704
768
+ => 96309.248
749
769
 
750
770
  ```
751
771
 
752
772
  ### LinuxStat::Swap
753
773
  ```
754
- # File: swap.rb | Line: 22
774
+ # File: swap.rb | Line: 24
755
775
  # Definition: def any?
756
776
  LinuxStat::Swap.any?()
757
777
  => true
758
778
 
759
- # File: swap.rb | Line: 68
779
+ # File: swap.rb | Line: 70
760
780
  # Definition: def available
761
781
  LinuxStat::Swap.available()
762
- => 2293908
782
+ => 3546108
763
783
 
764
- # File: swap.rb | Line: 8
784
+ # File: swap.rb | Line: 10
765
785
  # Definition: def list
766
786
  LinuxStat::Swap.list()
767
- => {"/dev/zram0"=>[:partition, 4194300, 1900392, -2]}
787
+ => {"/dev/zram0"=>[:partition, 4194300, 648192, -2]}
768
788
 
769
- # File: swap.rb | Line: 103
789
+ # File: swap.rb | Line: 105
770
790
  # Definition: def percent_available
771
791
  LinuxStat::Swap.percent_available()
772
- => 54.69
792
+ => 84.55
773
793
 
774
- # File: swap.rb | Line: 89
794
+ # File: swap.rb | Line: 91
775
795
  # Definition: def percent_used
776
796
  LinuxStat::Swap.percent_used()
777
- => 45.31
797
+ => 15.45
778
798
 
779
- # File: swap.rb | Line: 32
799
+ # File: swap.rb | Line: 34
780
800
  # Definition: def stat
781
801
  LinuxStat::Swap.stat()
782
- => {:total=>4194300, :used=>1900392, :available=>2293908, :percent_used=>45.31, :percent_available=>54.69}
802
+ => {:total=>4194300, :used=>648192, :available=>3546108, :percent_used=>15.45, :percent_available=>84.55}
783
803
 
784
- # File: swap.rb | Line: 57
804
+ # File: swap.rb | Line: 59
785
805
  # Definition: def total
786
806
  LinuxStat::Swap.total()
787
807
  => 4194300
788
808
 
789
- # File: swap.rb | Line: 80
809
+ # File: swap.rb | Line: 82
790
810
  # Definition: def used
791
811
  LinuxStat::Swap.used()
792
- => 1900392
812
+ => 648192
793
813
 
794
814
  ```
795
815
 
796
816
  ### LinuxStat::Sysconf
797
817
  ```
798
818
  LinuxStat::Sysconf.child_max()
799
- => 14915
819
+ => 14788
800
820
 
801
821
  LinuxStat::Sysconf.expr_nest_max()
802
822
  => 32
@@ -854,34 +874,58 @@ LinuxStat::Sysconf.tty_name_max()
854
874
 
855
875
  ```
856
876
 
877
+ ### LinuxStat::Thermal
878
+ ```
879
+ # File: thermal.rb | Line: 59
880
+ # Definition: def count_fans
881
+ LinuxStat::Thermal.count_fans()
882
+ => 1
883
+
884
+ # File: thermal.rb | Line: 49
885
+ # Definition: def count_sensors
886
+ LinuxStat::Thermal.count_sensors()
887
+ => 8
888
+
889
+ # File: thermal.rb | Line: 41
890
+ # Definition: def fans
891
+ LinuxStat::Thermal.fans()
892
+ => [{:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"Processor Fan", :rpm=>2718}]
893
+
894
+ # File: thermal.rb | Line: 23
895
+ # Definition: def temperatures
896
+ LinuxStat::Thermal.temperatures()
897
+ => [{:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"SODIMM", :temperature=>33.0}, {:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"CPU", :temperature=>42.0}, {:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"Ambi...
898
+
899
+ ```
900
+
857
901
  ### LinuxStat::USB
858
902
  ```
859
- # File: usb.rb | Line: 135
903
+ # File: usb.rb | Line: 139
860
904
  # Definition: def count
861
905
  LinuxStat::USB.count()
862
906
  => 10
863
907
 
864
- # File: usb.rb | Line: 135
908
+ # File: usb.rb | Line: 139
865
909
  # Definition: def count
866
910
  LinuxStat::USB.count_devices()
867
911
  => 10
868
912
 
869
- # File: usb.rb | Line: 47
913
+ # File: usb.rb | Line: 49
870
914
  # Definition: def devices_stat(hwdata: true)
871
915
  LinuxStat::USB.devices_stat(hwdata:)
872
916
  => [{: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...
873
917
 
874
- # File: usb.rb | Line: 175
918
+ # File: usb.rb | Line: 179
875
919
  # Definition: def hwdata_file
876
920
  LinuxStat::USB.hwdata_file()
877
921
  => "/usr/share/hwdata/usb.ids"
878
922
 
879
- # File: usb.rb | Line: 164
923
+ # File: usb.rb | Line: 168
880
924
  # Definition: def hwdata_file_set?
881
925
  LinuxStat::USB.hwdata_file_set?()
882
926
  => true
883
927
 
884
- # File: usb.rb | Line: 191
928
+ # File: usb.rb | Line: 195
885
929
  # Definition: def initialize_hwdata
886
930
  LinuxStat::USB.initialize_hwdata()
887
931
  => false
@@ -897,104 +941,104 @@ LinuxStat::Uname.nodename()
897
941
  => "archlinux"
898
942
 
899
943
  LinuxStat::Uname.release()
900
- => "5.10.2-xanmod1-cacule-1-cacule"
944
+ => "5.9.9-xanmod1-1"
901
945
 
902
946
  LinuxStat::Uname.sysname()
903
947
  => "Linux"
904
948
 
905
949
  LinuxStat::Uname.version()
906
- => "#1 SMP PREEMPT Thu, 24 Dec 2020 18:28:16 +0000"
950
+ => "#1 SMP PREEMPT Fri, 20 Nov 2020 07:44:55 +0000"
907
951
 
908
952
  ```
909
953
 
910
954
  ### LinuxStat::User
911
955
  ```
912
- # File: user.rb | Line: 98
956
+ # File: user.rb | Line: 101
913
957
  # Definition: def get_user
914
958
  LinuxStat::User.get_current_user()
915
959
  => "sourav"
916
960
 
917
- # File: user.rb | Line: 137
961
+ # File: user.rb | Line: 140
918
962
  # Definition: def get_euid
919
963
  LinuxStat::User.get_euid()
920
964
  => 1000
921
965
 
922
- # File: user.rb | Line: 129
966
+ # File: user.rb | Line: 132
923
967
  # Definition: def get_gid
924
968
  LinuxStat::User.get_gid()
925
969
  => 1000
926
970
 
927
- # File: user.rb | Line: 152
971
+ # File: user.rb | Line: 155
928
972
  # Definition: def get_login
929
973
  LinuxStat::User.get_login()
930
974
  => "sourav"
931
975
 
932
- # File: user.rb | Line: 121
976
+ # File: user.rb | Line: 124
933
977
  # Definition: def get_uid
934
978
  LinuxStat::User.get_uid()
935
979
  => 1000
936
980
 
937
- # File: user.rb | Line: 98
981
+ # File: user.rb | Line: 101
938
982
  # Definition: def get_user
939
983
  LinuxStat::User.get_user()
940
984
  => "sourav"
941
985
 
942
- # File: user.rb | Line: 215
986
+ # File: user.rb | Line: 218
943
987
  # Definition: def gid_by_username(username = get_user)
944
988
  LinuxStat::User.gid_by_username(username)
945
989
  => 1000
946
990
 
947
- # File: user.rb | Line: 56
991
+ # File: user.rb | Line: 58
948
992
  # Definition: def gids
949
993
  LinuxStat::User.gids()
950
994
  => {:root=>0, :bin=>1, :daemon=>2, :mail=>12, :ftp=>11, :http=>33, :nobody=>65534, :dbus=>81, :"systemd-journal-remote"=>982, :"systemd-network"=>981, :"systemd-resolve"=>980, :"systemd-timesync"=>979, :"systemd-coredump"=>978, :uuidd=>68, :avahi=>977, :...
951
995
 
952
- # File: user.rb | Line: 314
996
+ # File: user.rb | Line: 317
953
997
  # Definition: def home_by_gid(id = get_gid)
954
998
  LinuxStat::User.home_by_gid(id)
955
999
  => "/home/sourav"
956
1000
 
957
- # File: user.rb | Line: 266
1001
+ # File: user.rb | Line: 269
958
1002
  # Definition: def home_by_username(user = get_user)
959
1003
  LinuxStat::User.home_by_username(user)
960
1004
  => "/home/sourav"
961
1005
 
962
- # File: user.rb | Line: 72
1006
+ # File: user.rb | Line: 75
963
1007
  # Definition: def home_directories
964
1008
  LinuxStat::User.home_directories()
965
1009
  => {:root=>"/root", :bin=>"/", :daemon=>"/", :mail=>"/var/spool/mail", :ftp=>"/srv/ftp", :http=>"/srv/http", :nobody=>"/", :dbus=>"/", :"systemd-journal-remote"=>"/", :"systemd-network"=>"/", :"systemd-resolve"=>"/", :"systemd-timesync"=>"/", :"systemd-c...
966
1010
 
967
- # File: user.rb | Line: 293
1011
+ # File: user.rb | Line: 296
968
1012
  # Definition: def homes_by_uid(id = get_uid)
969
1013
  LinuxStat::User.homes_by_uid(id)
970
1014
  => ["/home/sourav"]
971
1015
 
972
- # File: user.rb | Line: 23
1016
+ # File: user.rb | Line: 25
973
1017
  # Definition: def ids
974
1018
  LinuxStat::User.ids()
975
1019
  => {:root=>{:uid=>0, :gid=>0}, :bin=>{:uid=>1, :gid=>1}, :daemon=>{:uid=>2, :gid=>2}, :mail=>{:uid=>8, :gid=>12}, :ftp=>{:uid=>14, :gid=>11}, :http=>{:uid=>33, :gid=>33}, :nobody=>{:uid=>65534, :gid=>65534}, :dbus=>{:uid=>81, :gid=>81}, :"systemd-journal...
976
1020
 
977
- # File: user.rb | Line: 11
1021
+ # File: user.rb | Line: 13
978
1022
  # Definition: def list
979
1023
  LinuxStat::User.list()
980
1024
  => ["root", "bin", "daemon", "mail", "ftp", "http", "nobody", "dbus", "systemd-journal-remote", "systemd-network", "systemd-resolve", "systemd-timesync", "systemd-coredump", "uuidd", "avahi", "colord", "git", "lxdm", "polkitd", "rtkit", "usbmux", "sourav...
981
1025
 
982
- # File: user.rb | Line: 244
1026
+ # File: user.rb | Line: 247
983
1027
  # Definition: def uid_by_username(username = get_user)
984
1028
  LinuxStat::User.uid_by_username(username)
985
1029
  => 1000
986
1030
 
987
- # File: user.rb | Line: 40
1031
+ # File: user.rb | Line: 42
988
1032
  # Definition: def uids
989
1033
  LinuxStat::User.uids()
990
1034
  => {:root=>0, :bin=>1, :daemon=>2, :mail=>8, :ftp=>14, :http=>33, :nobody=>65534, :dbus=>81, :"systemd-journal-remote"=>982, :"systemd-network"=>981, :"systemd-resolve"=>980, :"systemd-timesync"=>979, :"systemd-coredump"=>978, :uuidd=>68, :avahi=>977, :c...
991
1035
 
992
- # File: user.rb | Line: 187
1036
+ # File: user.rb | Line: 190
993
1037
  # Definition: def username_by_gid(gid = get_gid)
994
1038
  LinuxStat::User.username_by_gid(gid)
995
1039
  => "sourav"
996
1040
 
997
- # File: user.rb | Line: 169
1041
+ # File: user.rb | Line: 172
998
1042
  # Definition: def usernames_by_uid(uid = get_uid)
999
1043
  LinuxStat::User.usernames_by_uid(uid)
1000
1044
  => ["sourav"]