linux_stat 1.2.2 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d883007405e198d66cdf5f9cd03dc630b6e02d3d0c3a54ff33322a9562fcaa4e
4
- data.tar.gz: c353965cff2a9c0de891cd8ba6d4f0272520b3b40cf48525f802867142855fb7
3
+ metadata.gz: 5da13d97b132a58afb5d56337e40f5a234cf129612a14886e931b5d01d2232d3
4
+ data.tar.gz: dee75b59d2a8e2ab3f55e19c7e117869149d2c318fbc12e6e8a39c3d9433d418
5
5
  SHA512:
6
- metadata.gz: affabda2ed39158a40d12710810d5f604bab1c621e55accdc363d3392fd2e651ee860b0abb0dff1d0317e6bd85e045b68a963ea939b04f765fc276517ac039cb
7
- data.tar.gz: 286647ecf50f14f62d37efbd9d2c81cbbf2a79b7b0365fc6c1f96bb3064f0cf3bd2d89fae45e6fcb63442cf563063f6340e295720525bb4f02860b4022856715
6
+ metadata.gz: 1885696170e580ac960730d82dce2e73ca8b924211b3ee1d74c3cdde362fdaebf6fcc08a7fd49b444729186e65c68b0c15767c9baca050d0853b0460ae1ca989
7
+ data.tar.gz: 8ec56355b4774c830282ca5ecb23dc3318ccc8fabd748a20af4bb0535bec6e3f0da9a3d0232ce09f58e1bf43cb9cc5917e970633dc19cc7c4b0cc9ed786df492
data/README.md CHANGED
@@ -12,10 +12,14 @@ 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
 
19
+ ## Requirements:
20
+
21
+ Any Linux distribution with Kernel 3.14+.
22
+
19
23
  ## Dependencies:
20
24
  + You need to have the C compiler installed to be able to compile the C extensions.
21
25
  On Arch Linux:
@@ -73,11 +77,15 @@ gem 'linux_stat'
73
77
 
74
78
  And then execute:
75
79
 
76
- $ bundle install
80
+ ```
81
+ $ bundle install
82
+ ```
77
83
 
78
84
  Or install it yourself as:
79
85
 
80
- $ gem install linux_stat
86
+ ```
87
+ $ gem install linux_stat
88
+ ```
81
89
 
82
90
  ## Usage
83
91
  Following are the LinuxStat modules and module functions.
@@ -87,22 +95,22 @@ For ease of use, LinuxStat is also assigned to the LS constant.
87
95
 
88
96
  ### LinuxStat::BIOS
89
97
  ```
90
- # File: bios.rb | Line: 56
98
+ # File: bios.rb | Line: 58
91
99
  # Definition: def date
92
100
  LinuxStat::BIOS.date()
93
101
  => "04/10/2017"
94
102
 
95
- # File: bios.rb | Line: 10
103
+ # File: bios.rb | Line: 12
96
104
  # Definition: def model
97
105
  LinuxStat::BIOS.model()
98
106
  => "Inspiron 5567"
99
107
 
100
- # File: bios.rb | Line: 27
108
+ # File: bios.rb | Line: 29
101
109
  # Definition: def vendor
102
110
  LinuxStat::BIOS.vendor()
103
111
  => "Dell Inc."
104
112
 
105
- # File: bios.rb | Line: 42
113
+ # File: bios.rb | Line: 44
106
114
  # Definition: def version
107
115
  LinuxStat::BIOS.version()
108
116
  => "1.1.2"
@@ -111,417 +119,432 @@ LinuxStat::BIOS.version()
111
119
 
112
120
  ### LinuxStat::Battery
113
121
  ```
114
- # File: battery.rb | Line: 105
122
+ # File: battery.rb | Line: 107
115
123
  # Definition: def charge
116
124
  LinuxStat::Battery.charge()
117
125
  => 100.0
118
126
 
119
- # File: battery.rb | Line: 122
127
+ # File: battery.rb | Line: 124
120
128
  # Definition: def charge_full_design_wh
121
129
  LinuxStat::Battery.charge_full_design_wh()
122
130
  => 42.0
123
131
 
124
- # File: battery.rb | Line: 141
132
+ # File: battery.rb | Line: 143
125
133
  # Definition: def charge_full_wh
126
134
  LinuxStat::Battery.charge_full_wh()
127
135
  => 23.79
128
136
 
129
- # File: battery.rb | Line: 78
137
+ # File: battery.rb | Line: 80
130
138
  # Definition: def charging?
131
139
  LinuxStat::Battery.charging?()
132
140
  => true
133
141
 
134
- # File: battery.rb | Line: 184
142
+ # File: battery.rb | Line: 186
135
143
  # Definition: def devices_stat
136
144
  LinuxStat::Battery.devices_stat()
137
145
  => {: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
146
 
139
- # File: battery.rb | Line: 87
147
+ # File: battery.rb | Line: 89
140
148
  # Definition: def discharging?
141
149
  LinuxStat::Battery.discharging?()
142
150
  => false
143
151
 
144
- # File: battery.rb | Line: 96
152
+ # File: battery.rb | Line: 98
145
153
  # Definition: def full?
146
154
  LinuxStat::Battery.full?()
147
155
  => true
148
156
 
149
- # File: battery.rb | Line: 47
157
+ # File: battery.rb | Line: 49
150
158
  # Definition: def manufacturer
151
159
  LinuxStat::Battery.manufacturer()
152
160
  => "Samsung SDI"
153
161
 
154
- # File: battery.rb | Line: 36
162
+ # File: battery.rb | Line: 38
155
163
  # Definition: def model
156
164
  LinuxStat::Battery.model()
157
165
  => "DELL CYMGM77"
158
166
 
159
- # File: battery.rb | Line: 8
167
+ # File: battery.rb | Line: 10
160
168
  # Definition: def present?
161
169
  LinuxStat::Battery.present?()
162
170
  => true
163
171
 
164
- # File: battery.rb | Line: 16
172
+ # File: battery.rb | Line: 18
165
173
  # Definition: def stat
166
174
  LinuxStat::Battery.stat()
167
175
  => {:model=>"DELL CYMGM77", :manufacturer=>"Samsung SDI", :technology=>"Li-ion", :status=>"Full", :charge=>100.0, :charging=>true, :discharging=>false, :full=>true}
168
176
 
169
- # File: battery.rb | Line: 68
177
+ # File: battery.rb | Line: 70
170
178
  # Definition: def status
171
179
  LinuxStat::Battery.status()
172
180
  => "Full"
173
181
 
174
- # File: battery.rb | Line: 57
182
+ # File: battery.rb | Line: 59
175
183
  # Definition: def technology
176
184
  LinuxStat::Battery.technology()
177
185
  => "Li-ion"
178
186
 
179
- # File: battery.rb | Line: 160
187
+ # File: battery.rb | Line: 162
180
188
  # Definition: def voltage_now
181
189
  LinuxStat::Battery.voltage_now()
182
- => 12.625
190
+ => 12.583
183
191
 
184
192
  ```
185
193
 
186
194
  ### LinuxStat::CPU
187
195
  ```
188
- # File: cpu.rb | Line: 287
196
+ # File: cpu.rb | Line: 289
189
197
  # Definition: def available_governors
190
198
  LinuxStat::CPU.available_governors()
191
199
  => {"cpu0"=>["performance", "powersave"], "cpu1"=>["performance", "powersave"], "cpu2"=>["performance", "powersave"], "cpu3"=>["performance", "powersave"]}
192
200
 
193
- # File: cpu.rb | Line: 86
201
+ # File: cpu.rb | Line: 88
194
202
  # Definition: def count
195
203
  LinuxStat::CPU.count()
196
204
  => 4
197
205
 
198
- # File: cpu.rb | Line: 103
206
+ # File: cpu.rb | Line: 105
199
207
  # Definition: def count_online
200
208
  LinuxStat::CPU.count_online()
201
209
  => 4
202
210
 
203
- # File: cpu.rb | Line: 197
211
+ # File: cpu.rb | Line: 199
204
212
  # Definition: def cur_freq
205
213
  LinuxStat::CPU.cur_freq()
206
- => {"cpu0"=>1999999, "cpu1"=>2000045, "cpu2"=>2000144, "cpu3"=>2000034}
214
+ => {"cpu0"=>2000010, "cpu1"=>1999584, "cpu2"=>2000137, "cpu3"=>2000033}
207
215
 
208
- # File: cpu.rb | Line: 265
216
+ # File: cpu.rb | Line: 267
209
217
  # Definition: def governor
210
218
  LinuxStat::CPU.governor()
211
219
  => {"cpu0"=>"performance", "cpu1"=>"performance", "cpu2"=>"performance", "cpu3"=>"performance"}
212
220
 
213
- # File: cpu.rb | Line: 241
221
+ # File: cpu.rb | Line: 243
214
222
  # Definition: def max_freq
215
223
  LinuxStat::CPU.max_freq()
216
224
  => {"cpu0"=>2000000, "cpu1"=>2000000, "cpu2"=>2000000, "cpu3"=>2000000}
217
225
 
218
- # File: cpu.rb | Line: 219
226
+ # File: cpu.rb | Line: 221
219
227
  # Definition: def min_freq
220
228
  LinuxStat::CPU.min_freq()
221
229
  => {"cpu0"=>2000000, "cpu1"=>2000000, "cpu2"=>2000000, "cpu3"=>2000000}
222
230
 
223
- # File: cpu.rb | Line: 184
231
+ # File: cpu.rb | Line: 186
224
232
  # Definition: def model
225
233
  LinuxStat::CPU.model()
226
234
  => "Intel(R) Core(TM) i3-6006U CPU @ 2.00GHz"
227
235
 
228
- # File: cpu.rb | Line: 163
236
+ # File: cpu.rb | Line: 165
229
237
  # Definition: def offline
230
238
  LinuxStat::CPU.offline()
231
239
  => []
232
240
 
233
- # File: cpu.rb | Line: 132
241
+ # File: cpu.rb | Line: 134
234
242
  # Definition: def online
235
243
  LinuxStat::CPU.online()
236
244
  => [0, 1, 2, 3]
237
245
 
238
- # File: cpu.rb | Line: 23
246
+ # File: cpu.rb | Line: 25
239
247
  # Definition: def stat(sleep = ticks_to_ms_t5)
240
248
  LinuxStat::CPU.stat(sleep)
241
- => {0=>10.0, 1=>0.0, 2=>0.0, 3=>16.67, 4=>0.0}
249
+ => {0=>5.26, 1=>16.67, 2=>16.67, 3=>0.0, 4=>20.0}
242
250
 
243
- # File: cpu.rb | Line: 63
251
+ # File: cpu.rb | Line: 65
244
252
  # Definition: def total_usage(sleep = ticks_to_ms_t5)
245
253
  LinuxStat::CPU.total_usage(sleep)
246
- => 19.05
254
+ => 14.29
247
255
 
248
- # File: cpu.rb | Line: 63
256
+ # File: cpu.rb | Line: 65
249
257
  # Definition: def total_usage(sleep = ticks_to_ms_t5)
250
258
  LinuxStat::CPU.usage(sleep)
251
- => 5.26
259
+ => 10.0
252
260
 
253
- # File: cpu.rb | Line: 23
261
+ # File: cpu.rb | Line: 25
254
262
  # Definition: def stat(sleep = ticks_to_ms_t5)
255
263
  LinuxStat::CPU.usages(sleep)
256
- => {0=>5.26, 1=>0.0, 2=>0.0, 3=>33.33, 4=>20.0}
264
+ => {0=>5.26, 1=>0.0, 2=>0.0, 3=>20.0, 4=>0.0}
257
265
 
258
266
  ```
259
267
 
260
268
  ### LinuxStat::FS
261
269
  ```
262
270
  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}
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}
264
272
 
265
273
  ```
266
274
 
267
275
  ### LinuxStat::Filesystem
268
276
  ```
269
- # File: filesystem.rb | Line: 92
277
+ # File: filesystem.rb | Line: 94
270
278
  # Definition: def available(fs = ?..freeze)
271
279
  LinuxStat::Filesystem.available(fs)
272
- => 44429180928
280
+ => 24950616064
273
281
 
274
- # File: filesystem.rb | Line: 58
282
+ # File: filesystem.rb | Line: 60
275
283
  # Definition: def free(fs = ?..freeze)
276
284
  LinuxStat::Filesystem.free(fs)
277
- => 44429180928
285
+ => 24950616064
278
286
 
279
- # File: filesystem.rb | Line: 19
287
+ # File: filesystem.rb | Line: 21
280
288
  # Definition: def stat(fs = ?..freeze)
281
289
  LinuxStat::Filesystem.stat(fs)
282
- => {:total=>119981191168, :free=>44429180928, :used=>75552010240}
290
+ => {:total=>119981191168, :free=>24950616064, :used=>95030575104}
283
291
 
284
- # File: filesystem.rb | Line: 108
292
+ # File: filesystem.rb | Line: 110
285
293
  # Definition: def stat_raw(fs = ?..freeze)
286
294
  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}
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}
288
296
 
289
- # File: filesystem.rb | Line: 39
297
+ # File: filesystem.rb | Line: 41
290
298
  # Definition: def total(fs = ?..freeze)
291
299
  LinuxStat::Filesystem.total(fs)
292
300
  => 119981191168
293
301
 
294
- # File: filesystem.rb | Line: 73
302
+ # File: filesystem.rb | Line: 75
295
303
  # Definition: def used(fs = ?..freeze)
296
304
  LinuxStat::Filesystem.used(fs)
297
- => 75552010240
305
+ => 95030575104
298
306
 
299
307
  ```
300
308
 
301
309
  ### LinuxStat::Kernel
302
310
  ```
303
- # File: kernel.rb | Line: 86
311
+ # File: kernel.rb | Line: 88
304
312
  # Definition: def build_date
305
313
  LinuxStat::Kernel.build_date()
306
- => 2020-12-24 18:28:16 +0000
314
+ => 2020-11-20 07:44:55 +0000
307
315
 
308
- # File: kernel.rb | Line: 140
316
+ # File: kernel.rb | Line: 142
309
317
  # Definition: def build_date_string
310
318
  LinuxStat::Kernel.build_date_string()
311
- => "24 Dec 2020 18:28:16 +0000"
319
+ => "20 Nov 2020 07:44:55 +0000"
312
320
 
313
- # File: kernel.rb | Line: 21
321
+ # File: kernel.rb | Line: 23
314
322
  # Definition: def build_user
315
323
  LinuxStat::Kernel.build_user()
316
324
  => "souravgoswami@archlinux"
317
325
 
318
- # File: kernel.rb | Line: 179
326
+ # File: kernel.rb | Line: 181
319
327
  # Definition: def ticks
320
328
  LinuxStat::Kernel.clk_tck()
321
329
  => 100
322
330
 
323
- # File: kernel.rb | Line: 33
331
+ # File: kernel.rb | Line: 35
324
332
  # Definition: def compiler
325
333
  LinuxStat::Kernel.compiler()
326
334
  => [:gcc, "10.2.0"]
327
335
 
328
- # File: kernel.rb | Line: 55
336
+ # File: kernel.rb | Line: 57
329
337
  # Definition: def compiler_version
330
338
  LinuxStat::Kernel.compiler_version()
331
339
  => "10.2.0"
332
340
 
333
- # File: kernel.rb | Line: 10
341
+ # File: kernel.rb | Line: 12
334
342
  # Definition: def version
335
343
  LinuxStat::Kernel.release()
336
- => "5.10.2-xanmod1-cacule-1-cacule"
344
+ => "5.9.9-xanmod1-1"
337
345
 
338
- # File: kernel.rb | Line: 169
346
+ # File: kernel.rb | Line: 171
339
347
  # Definition: def string
340
348
  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"
349
+ => "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
350
 
343
- # File: kernel.rb | Line: 179
351
+ # File: kernel.rb | Line: 181
344
352
  # Definition: def ticks
345
353
  LinuxStat::Kernel.ticks()
346
354
  => 100
347
355
 
348
- # File: kernel.rb | Line: 10
356
+ # File: kernel.rb | Line: 12
349
357
  # Definition: def version
350
358
  LinuxStat::Kernel.version()
351
- => "5.10.2-xanmod1-cacule-1-cacule"
359
+ => "5.9.9-xanmod1-1"
352
360
 
353
361
  ```
354
362
 
355
363
  ### LinuxStat::Memory
356
364
  ```
357
- # File: memory.rb | Line: 50
365
+ # File: memory.rb | Line: 62
358
366
  # Definition: def available
359
367
  LinuxStat::Memory.available()
360
- => 375384
368
+ => 422660
369
+
370
+ # File: memory.rb | Line: 52
371
+ # Definition: def free
372
+ LinuxStat::Memory.free()
373
+ => 237884
361
374
 
362
- # File: memory.rb | Line: 81
375
+ # File: memory.rb | Line: 93
363
376
  # Definition: def percent_available
364
377
  LinuxStat::Memory.percent_available()
365
- => 9.79
378
+ => 11.02
366
379
 
367
- # File: memory.rb | Line: 70
380
+ # File: memory.rb | Line: 82
368
381
  # Definition: def percent_used
369
382
  LinuxStat::Memory.percent_used()
370
- => 90.21
383
+ => 88.98
371
384
 
372
- # File: memory.rb | Line: 11
385
+ # File: memory.rb | Line: 13
373
386
  # Definition: def stat
374
387
  LinuxStat::Memory.stat()
375
- => {:total=>3836036, :used=>3460652, :available=>375384, :percent_used=>90.21, :percent_available=>9.79}
388
+ => {:total=>3836236, :used=>3413576, :available=>422660, :percent_used=>88.98, :percent_available=>11.02}
376
389
 
377
- # File: memory.rb | Line: 40
390
+ # File: memory.rb | Line: 42
378
391
  # Definition: def total
379
392
  LinuxStat::Memory.total()
380
- => 3836036
393
+ => 3836236
381
394
 
382
- # File: memory.rb | Line: 60
395
+ # File: memory.rb | Line: 72
383
396
  # Definition: def used
384
397
  LinuxStat::Memory.used()
385
- => 3460652
398
+ => 3413576
386
399
 
387
400
  ```
388
401
 
389
402
  ### LinuxStat::Mounts
390
403
  ```
391
- # File: mounts.rb | Line: 179
404
+ # File: mounts.rb | Line: 181
392
405
  # Definition: def device_stat(dev = root)
393
406
  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}
407
+ => {:mountpoint=>"/", :total=>119981191168, :free=>24950616064, :available=>24950616064, :used=>95030575104, :percent_used=>79.2, :percent_free=>20.8, :percent_available=>20.8}
395
408
 
396
- # File: mounts.rb | Line: 137
409
+ # File: mounts.rb | Line: 139
397
410
  # Definition: def devices_stat
398
411
  LinuxStat::Mounts.devices_stat()
399
412
  => {"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
413
 
401
- # File: mounts.rb | Line: 11
414
+ # File: mounts.rb | Line: 13
402
415
  # Definition: def list
403
416
  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...
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", "...
405
418
 
406
- # File: mounts.rb | Line: 20
419
+ # File: mounts.rb | Line: 22
407
420
  # Definition: def list_devices
408
421
  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...
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...
410
423
 
411
- # File: mounts.rb | Line: 109
424
+ # File: mounts.rb | Line: 111
412
425
  # Definition: def list_devices_mount_point
413
426
  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...
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...
415
428
 
416
- # File: mounts.rb | Line: 80
429
+ # File: mounts.rb | Line: 82
417
430
  # Definition: def mount_point(dev = root)
418
431
  LinuxStat::Mounts.mount_point(dev)
419
432
  => "/"
420
433
 
421
- # File: mounts.rb | Line: 29
434
+ # File: mounts.rb | Line: 31
422
435
  # Definition: def root
423
436
  LinuxStat::Mounts.root()
424
437
  => "/dev/sda2"
425
438
 
426
- # File: mounts.rb | Line: 38
439
+ # File: mounts.rb | Line: 40
427
440
  # Definition: def root_fs
428
441
  LinuxStat::Mounts.root_fs()
429
442
  => "xfs"
430
443
 
431
- # File: mounts.rb | Line: 47
444
+ # File: mounts.rb | Line: 49
432
445
  # Definition: def root_mount_options
433
446
  LinuxStat::Mounts.root_mount_options()
434
447
  => "rw,noatime,attr2,inode64,logbufs=8,logbsize=32k,noquota"
435
448
 
436
- # File: mounts.rb | Line: 56
449
+ # File: mounts.rb | Line: 58
437
450
  # Definition: def tmpfs
438
451
  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...
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", "/cache"=>"tmpfs /cache tmpfs rw,nosuid,nodev,relatime,size=2097152k 0 0", "/ramdisk...
440
453
 
441
454
  ```
442
455
 
443
456
  ### LinuxStat::Net
444
457
  ```
445
- # File: net.rb | Line: 84
458
+ # File: net.rb | Line: 86
446
459
  # Definition: def usage(interval = 0.1)
447
460
  LinuxStat::Net.current_usage(interval)
448
- => {:received=>279000.0, :transmitted=>5640.0}
461
+ => {:received=>0.0, :transmitted=>0.0}
449
462
 
450
- # File: net.rb | Line: 10
463
+ # File: net.rb | Line: 12
451
464
  # Definition: def ipv4_private
452
465
  LinuxStat::Net.ipv4_private()
453
- => "192.168.0.102"
466
+ => "192.168.0.103"
454
467
 
455
- # File: net.rb | Line: 25
468
+ # File: net.rb | Line: 27
456
469
  # Definition: def total_bytes
457
470
  LinuxStat::Net.total_bytes()
458
- => {:received=>2093813713, :transmitted=>138899807}
471
+ => {:received=>719043592, :transmitted=>70236574}
459
472
 
460
- # File: net.rb | Line: 43
473
+ # File: net.rb | Line: 45
461
474
  # Definition: def total_bytes_received
462
475
  LinuxStat::Net.total_bytes_received()
463
- => 2093813713
476
+ => 719043592
464
477
 
465
- # File: net.rb | Line: 56
478
+ # File: net.rb | Line: 58
466
479
  # Definition: def total_bytes_transmitted
467
480
  LinuxStat::Net.total_bytes_transmitted()
468
- => 138899807
481
+ => 70236574
469
482
 
470
- # File: net.rb | Line: 84
483
+ # File: net.rb | Line: 86
471
484
  # Definition: def usage(interval = 0.1)
472
485
  LinuxStat::Net.usage(interval)
473
- => {:received=>419320.0, :transmitted=>10340.0}
486
+ => {:received=>0.0, :transmitted=>0.0}
474
487
 
475
488
  ```
476
489
 
477
490
  ### LinuxStat::OS
478
491
  ```
479
- # File: os.rb | Line: 127
492
+ # File: os.rb | Line: 129
480
493
  # Definition: def bits
481
494
  LinuxStat::OS.bits()
482
495
  => 64
483
496
 
484
- # File: os.rb | Line: 82
497
+ # File: os.rb | Line: 84
485
498
  # Definition: def version
486
499
  LinuxStat::OS.distrib_version()
487
500
  => "rolling"
488
501
 
489
- # File: os.rb | Line: 44
502
+ # File: os.rb | Line: 46
490
503
  # Definition: def distribution
491
504
  LinuxStat::OS.distribution()
492
505
  => "Arch Linux"
493
506
 
494
- # File: os.rb | Line: 115
507
+ # File: os.rb | Line: 117
495
508
  # Definition: def hostname
496
509
  LinuxStat::OS.hostname()
497
510
  => "archlinux"
498
511
 
499
- # File: os.rb | Line: 33
512
+ # File: os.rb | Line: 185
513
+ # Definition: def loadavg
514
+ LinuxStat::OS.loadavg()
515
+ => {1=>0.56884765625, 5=>0.69482421875, 15=>0.9892578125}
516
+
517
+ # File: os.rb | Line: 35
500
518
  # Definition: def lsb_release
501
519
  LinuxStat::OS.lsb_release()
502
520
  => {:LSB_VERSION=>"1.4", :DISTRIB_ID=>"Arch", :DISTRIB_RELEASE=>"rolling", :DISTRIB_DESCRIPTION=>"Arch Linux"}
503
521
 
504
- # File: os.rb | Line: 98
522
+ # File: os.rb | Line: 100
505
523
  # Definition: def machine
506
524
  LinuxStat::OS.machine()
507
525
  => "x86_64"
508
526
 
509
- # File: os.rb | Line: 106
527
+ # File: os.rb | Line: 108
510
528
  # Definition: def nodename
511
529
  LinuxStat::OS.nodename()
512
530
  => "archlinux"
513
531
 
514
- # File: os.rb | Line: 17
532
+ # File: os.rb | Line: 19
515
533
  # Definition: def os_release
516
534
  LinuxStat::OS.os_release()
517
535
  => {: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
536
 
519
- # File: os.rb | Line: 142
537
+ # File: os.rb | Line: 144
520
538
  # Definition: def uptime
521
539
  LinuxStat::OS.uptime()
522
- => {:hour=>14, :minute=>24, :second=>12.06}
540
+ => {:hour=>11, :minute=>17, :second=>5.68}
523
541
 
524
- # File: os.rb | Line: 82
542
+ # File: os.rb | Line: 168
543
+ # Definition: def uptime_i
544
+ LinuxStat::OS.uptime_i()
545
+ => 40626
546
+
547
+ # File: os.rb | Line: 84
525
548
  # Definition: def version
526
549
  LinuxStat::OS.version()
527
550
  => "rolling"
@@ -530,37 +553,37 @@ LinuxStat::OS.version()
530
553
 
531
554
  ### LinuxStat::PCI
532
555
  ```
533
- # File: pci.rb | Line: 211
556
+ # File: pci.rb | Line: 216
534
557
  # Definition: def count
535
558
  LinuxStat::PCI.count()
536
559
  => 13
537
560
 
538
- # File: pci.rb | Line: 211
561
+ # File: pci.rb | Line: 216
539
562
  # Definition: def count
540
563
  LinuxStat::PCI.count_devices()
541
564
  => 13
542
565
 
543
- # File: pci.rb | Line: 52
566
+ # File: pci.rb | Line: 54
544
567
  # Definition: def devices_info(hwdata: true)
545
568
  LinuxStat::PCI.devices_info(hwdata:)
546
569
  => [{: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
570
 
548
- # File: pci.rb | Line: 128
571
+ # File: pci.rb | Line: 130
549
572
  # Definition: def devices_stat(hwdata: true)
550
573
  LinuxStat::PCI.devices_stat(hwdata:)
551
574
  => [{: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
575
 
553
- # File: pci.rb | Line: 259
576
+ # File: pci.rb | Line: 264
554
577
  # Definition: def hwdata_file
555
578
  LinuxStat::PCI.hwdata_file()
556
579
  => "/usr/share/hwdata/pci.ids"
557
580
 
558
- # File: pci.rb | Line: 248
581
+ # File: pci.rb | Line: 253
559
582
  # Definition: def hwdata_file_set?
560
583
  LinuxStat::PCI.hwdata_file_set?()
561
584
  => true
562
585
 
563
- # File: pci.rb | Line: 275
586
+ # File: pci.rb | Line: 280
564
587
  # Definition: def initialize_hwdata
565
588
  LinuxStat::PCI.initialize_hwdata()
566
589
  => false
@@ -569,66 +592,76 @@ LinuxStat::PCI.initialize_hwdata()
569
592
 
570
593
  ### LinuxStat::PrettifyBytes
571
594
  ```
572
- # File: prettify_bytes.rb | Line: 42
573
- # Definition: def convert_binary(n)
574
- LinuxStat::PrettifyBytes.convert_binary(n = 320846048510750)
575
- => "291.81 tebibytes"
595
+ # File: prettify_bytes.rb | Line: 49
596
+ # Definition: def convert_binary(n, precision: 2)
597
+ LinuxStat::PrettifyBytes.convert_binary(n = 137669164863821, precision:)
598
+ => "125.21 tebibytes"
576
599
 
577
- # File: prettify_bytes.rb | Line: 19
578
- # Definition: def convert_decimal(n)
579
- LinuxStat::PrettifyBytes.convert_decimal(n = 996984130887475)
580
- => "996.98 terabytes"
600
+ # File: prettify_bytes.rb | Line: 26
601
+ # Definition: def convert_decimal(n, precision: 2)
602
+ LinuxStat::PrettifyBytes.convert_decimal(n = 854792232966738, precision:)
603
+ => "854.79 terabytes"
581
604
 
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"
605
+ # File: prettify_bytes.rb | Line: 97
606
+ # Definition: def convert_short_binary(n, precision: 2)
607
+ LinuxStat::PrettifyBytes.convert_short_binary(n = 502144293693829, precision:)
608
+ => "456.70 TiB"
586
609
 
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"
610
+ # File: prettify_bytes.rb | Line: 72
611
+ # Definition: def convert_short_decimal(n, precision: 2)
612
+ LinuxStat::PrettifyBytes.convert_short_decimal(n = 489879177525276, precision:)
613
+ => "489.88 TB"
591
614
 
592
615
  ```
593
616
 
594
617
  ### LinuxStat::Process
595
618
  ```
596
- # File: process.rb | Line: 19
619
+ # File: process.rb | Line: 57
620
+ # Definition: def cmdlines
621
+ LinuxStat::Process.cmdlines()
622
+ => {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=>""...
623
+
624
+ # File: process.rb | Line: 29
597
625
  # Definition: def count
598
626
  LinuxStat::Process.count()
599
- => 210
627
+ => 209
600
628
 
601
- # File: process.rb | Line: 71
629
+ # File: process.rb | Line: 124
602
630
  # Definition: def idle
603
631
  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...
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...
605
633
 
606
- # File: process.rb | Line: 8
634
+ # File: process.rb | Line: 11
607
635
  # Definition: def list
608
636
  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,...
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,...
610
638
 
611
- # File: process.rb | Line: 25
639
+ # File: process.rb | Line: 36
612
640
  # Definition: def names
613
641
  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...
642
+ => {1=>"systemd", 2=>"kthreadd", 3=>"rcu_gp", 4=>"rcu_par_gp", 6=>"kworker/0:0H-kblockd", 9=>"mm_percpu_wq", 10=>"ksoftirqd/0", 11=>"rcuc/0", 12=>"rcu_preempt", 13=>"rcub/0", 14=>"migration/0", 15=>"idle_inject/0", 16=>"cpuhp/0", 17=>"cpuhp/1", 18=>"idle...
615
643
 
616
- # File: process.rb | Line: 97
644
+ # File: process.rb | Line: 150
617
645
  # Definition: def running
618
646
  LinuxStat::Process.running()
619
- => [34967]
647
+ => [37551]
620
648
 
621
- # File: process.rb | Line: 58
649
+ # File: process.rb | Line: 111
622
650
  # Definition: def sleeping
623
651
  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...
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,...
625
653
 
626
- # File: process.rb | Line: 37
654
+ # File: process.rb | Line: 163
655
+ # Definition: def stopped
656
+ LinuxStat::Process.stopped()
657
+ => []
658
+
659
+ # File: process.rb | Line: 78
627
660
  # Definition: def types
628
661
  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...
662
+ => {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
663
 
631
- # File: process.rb | Line: 84
664
+ # File: process.rb | Line: 137
632
665
  # Definition: def zombie
633
666
  LinuxStat::Process.zombie()
634
667
  => []
@@ -637,166 +670,176 @@ LinuxStat::Process.zombie()
637
670
 
638
671
  ### LinuxStat::ProcessInfo
639
672
  ```
640
- # File: process_info.rb | Line: 54
673
+ # File: process_info.rb | Line: 61
641
674
  # Definition: def cmdline(pid = $$)
642
675
  LinuxStat::ProcessInfo.cmdline(pid)
643
- => "/usr/bin/ruby /home/sourav/.gem/ruby/2.7.0/bin/linuxstat.rb --markdown"
676
+ => "/usr/bin/ruby /home/sourav/.gem/ruby/2.7.0/bin/linuxstat.rb -md"
644
677
 
645
- # File: process_info.rb | Line: 78
678
+ # File: process_info.rb | Line: 87
646
679
  # Definition: def command_name(pid = $$)
647
680
  LinuxStat::ProcessInfo.command_name(pid)
648
681
  => "ruby"
649
682
 
650
- # File: process_info.rb | Line: 640
683
+ # File: process_info.rb | Line: 708
651
684
  # Definition: def nproc(pid = $$)
652
685
  LinuxStat::ProcessInfo.count_cpu(pid)
653
686
  => 4
654
687
 
655
- # File: process_info.rb | Line: 247
688
+ # File: process_info.rb | Line: 284
656
689
  # Definition: def cpu_stat(pid: $$, sleep: ticks_to_ms_t5)
657
690
  LinuxStat::ProcessInfo.cpu_stat(pid:, sleep:)
658
- => {:cpu_usage=>0.0, :threads=>1, :last_executed_cpu=>3}
691
+ => {:cpu_usage=>0.0, :threads=>1, :last_executed_cpu=>1}
659
692
 
660
- # File: process_info.rb | Line: 307
693
+ # File: process_info.rb | Line: 350
661
694
  # Definition: def cpu_usage(pid: $$, sleep: ticks_to_ms_t5)
662
695
  LinuxStat::ProcessInfo.cpu_usage(pid:, sleep:)
663
696
  => 0.0
664
697
 
665
- # File: process_info.rb | Line: 470
698
+ # File: process_info.rb | Line: 525
666
699
  # Definition: def gid(pid = $$)
667
700
  LinuxStat::ProcessInfo.gid(pid)
668
701
  => {:real=>1000, :effective=>1000, :saved_set=>1000, :filesystem_uid=>1000}
669
702
 
670
- # File: process_info.rb | Line: 433
703
+ # File: process_info.rb | Line: 487
671
704
  # Definition: def last_executed_cpu(pid = $$)
672
705
  LinuxStat::ProcessInfo.last_executed_cpu(pid)
673
- => 3
706
+ => 1
674
707
 
675
- # File: process_info.rb | Line: 114
708
+ # File: process_info.rb | Line: 151
676
709
  # Definition: def mem_stat(pid = $$)
677
710
  LinuxStat::ProcessInfo.mem_stat(pid)
678
- => {:memory=>26836.992, :virtual_memory=>97992.704, :resident_memory=>32841.728}
711
+ => {:memory=>24842.24, :virtual_memory=>96256.0, :resident_memory=>30859.264}
679
712
 
680
- # File: process_info.rb | Line: 147
713
+ # File: process_info.rb | Line: 184
681
714
  # Definition: def memory(pid = $$)
682
715
  LinuxStat::ProcessInfo.memory(pid)
683
- => 26836.992
716
+ => 24842.24
684
717
 
685
- # File: process_info.rb | Line: 607
718
+ # File: process_info.rb | Line: 672
686
719
  # Definition: def nice(pid = $$)
687
720
  LinuxStat::ProcessInfo.nice(pid)
688
721
  => 0
689
722
 
690
- # File: process_info.rb | Line: 640
723
+ # File: process_info.rb | Line: 708
691
724
  # Definition: def nproc(pid = $$)
692
725
  LinuxStat::ProcessInfo.nproc(pid)
693
726
  => 4
694
727
 
695
- # File: process_info.rb | Line: 491
728
+ # File: process_info.rb | Line: 546
696
729
  # Definition: def owner(pid = $$)
697
730
  LinuxStat::ProcessInfo.owner(pid)
698
731
  => "sourav"
699
732
 
700
- # File: process_info.rb | Line: 197
733
+ # File: process_info.rb | Line: 112
734
+ # Definition: def process_name(pid = $$)
735
+ LinuxStat::ProcessInfo.process_name(pid)
736
+ => "linuxstat.rb"
737
+
738
+ # File: process_info.rb | Line: 234
701
739
  # Definition: def resident_memory(pid = $$)
702
740
  LinuxStat::ProcessInfo.resident_memory(pid)
703
- => 32841.728
741
+ => 30859.264
704
742
 
705
- # File: process_info.rb | Line: 563
743
+ # File: process_info.rb | Line: 621
706
744
  # Definition: def running_time(pid = $$)
707
745
  LinuxStat::ProcessInfo.running_time(pid)
708
- => 1.04
746
+ => 1.08
709
747
 
710
- # File: process_info.rb | Line: 544
748
+ # File: process_info.rb | Line: 602
711
749
  # Definition: def start_time(pid = $$)
712
750
  LinuxStat::ProcessInfo.start_time(pid)
713
- => 2020-12-29 01:58:56 +0530
751
+ => 2021-01-22 21:42:20 +0530
714
752
 
715
- # File: process_info.rb | Line: 513
753
+ # File: process_info.rb | Line: 568
716
754
  # Definition: def start_time_epoch(pid = $$)
717
755
  LinuxStat::ProcessInfo.start_time_epoch(pid)
718
- => 1609187336
756
+ => 1611331940
719
757
 
720
- # File: process_info.rb | Line: 592
758
+ # File: process_info.rb | Line: 653
721
759
  # Definition: def state(pid = $$)
722
760
  LinuxStat::ProcessInfo.state(pid)
723
761
  => "R"
724
762
 
725
- # File: process_info.rb | Line: 359
763
+ # File: process_info.rb | Line: 407
726
764
  # Definition: def thread_usage(pid: $$, sleep: ticks_to_ms_t5)
727
765
  LinuxStat::ProcessInfo.thread_usage(pid:, sleep:)
728
766
  => 0.0
729
767
 
730
- # File: process_info.rb | Line: 408
768
+ # File: process_info.rb | Line: 462
731
769
  # Definition: def threads(pid = $$)
732
770
  LinuxStat::ProcessInfo.threads(pid)
733
771
  => 1
734
772
 
735
- # File: process_info.rb | Line: 23
773
+ # File: process_info.rb | Line: 30
736
774
  # Definition: def total_io(pid = $$)
737
775
  LinuxStat::ProcessInfo.total_io(pid)
738
- => {:read_bytes=>1249280, :write_bytes=>0}
776
+ => {:read_bytes=>1302528, :write_bytes=>0}
739
777
 
740
- # File: process_info.rb | Line: 446
778
+ # File: process_info.rb | Line: 501
741
779
  # Definition: def uid(pid = $$)
742
780
  LinuxStat::ProcessInfo.uid(pid)
743
781
  => {:real=>1000, :effective=>1000, :saved_set=>1000, :filesystem_uid=>1000}
744
782
 
745
- # File: process_info.rb | Line: 172
783
+ # File: process_info.rb | Line: 209
746
784
  # Definition: def virtual_memory(pid = $$)
747
785
  LinuxStat::ProcessInfo.virtual_memory(pid)
748
- => 97992.704
786
+ => 96256.0
749
787
 
750
788
  ```
751
789
 
752
790
  ### LinuxStat::Swap
753
791
  ```
754
- # File: swap.rb | Line: 22
792
+ # File: swap.rb | Line: 24
755
793
  # Definition: def any?
756
794
  LinuxStat::Swap.any?()
757
795
  => true
758
796
 
759
- # File: swap.rb | Line: 68
797
+ # File: swap.rb | Line: 81
760
798
  # Definition: def available
761
799
  LinuxStat::Swap.available()
762
- => 2293908
800
+ => 2437940
801
+
802
+ # File: swap.rb | Line: 70
803
+ # Definition: def free
804
+ LinuxStat::Swap.free()
805
+ => 2437940
763
806
 
764
- # File: swap.rb | Line: 8
807
+ # File: swap.rb | Line: 10
765
808
  # Definition: def list
766
809
  LinuxStat::Swap.list()
767
- => {"/dev/zram0"=>[:partition, 4194300, 1900392, -2]}
810
+ => {"/dev/zram0"=>[:partition, 4194300, 1756360, -2]}
768
811
 
769
- # File: swap.rb | Line: 103
812
+ # File: swap.rb | Line: 116
770
813
  # Definition: def percent_available
771
814
  LinuxStat::Swap.percent_available()
772
- => 54.69
815
+ => 58.13
773
816
 
774
- # File: swap.rb | Line: 89
817
+ # File: swap.rb | Line: 102
775
818
  # Definition: def percent_used
776
819
  LinuxStat::Swap.percent_used()
777
- => 45.31
820
+ => 41.87
778
821
 
779
- # File: swap.rb | Line: 32
822
+ # File: swap.rb | Line: 34
780
823
  # Definition: def stat
781
824
  LinuxStat::Swap.stat()
782
- => {:total=>4194300, :used=>1900392, :available=>2293908, :percent_used=>45.31, :percent_available=>54.69}
825
+ => {:total=>4194300, :used=>1756360, :available=>2437940, :percent_used=>41.87, :percent_available=>58.13}
783
826
 
784
- # File: swap.rb | Line: 57
827
+ # File: swap.rb | Line: 59
785
828
  # Definition: def total
786
829
  LinuxStat::Swap.total()
787
830
  => 4194300
788
831
 
789
- # File: swap.rb | Line: 80
832
+ # File: swap.rb | Line: 93
790
833
  # Definition: def used
791
834
  LinuxStat::Swap.used()
792
- => 1900392
835
+ => 1756360
793
836
 
794
837
  ```
795
838
 
796
839
  ### LinuxStat::Sysconf
797
840
  ```
798
841
  LinuxStat::Sysconf.child_max()
799
- => 14915
842
+ => 14788
800
843
 
801
844
  LinuxStat::Sysconf.expr_nest_max()
802
845
  => 32
@@ -854,34 +897,92 @@ LinuxStat::Sysconf.tty_name_max()
854
897
 
855
898
  ```
856
899
 
900
+ ### LinuxStat::Sysinfo
901
+ ```
902
+ LinuxStat::Sysinfo.bufferram()
903
+ => 4096
904
+
905
+ LinuxStat::Sysinfo.freehigh()
906
+ => 0
907
+
908
+ LinuxStat::Sysinfo.freeram()
909
+ => 223875072
910
+
911
+ LinuxStat::Sysinfo.freeswap()
912
+ => 2496450560
913
+
914
+ LinuxStat::Sysinfo.loads()
915
+ => [0.56884765625, 0.69482421875, 0.9892578125]
916
+
917
+ LinuxStat::Sysinfo.sharedram()
918
+ => 834801664
919
+
920
+ LinuxStat::Sysinfo.totalhigh()
921
+ => 0
922
+
923
+ LinuxStat::Sysinfo.totalram()
924
+ => 3928305664
925
+
926
+ LinuxStat::Sysinfo.totalswap()
927
+ => 4294963200
928
+
929
+ LinuxStat::Sysinfo.uptime()
930
+ => 40627
931
+
932
+ ```
933
+
934
+ ### LinuxStat::Thermal
935
+ ```
936
+ # File: thermal.rb | Line: 59
937
+ # Definition: def count_fans
938
+ LinuxStat::Thermal.count_fans()
939
+ => 1
940
+
941
+ # File: thermal.rb | Line: 49
942
+ # Definition: def count_sensors
943
+ LinuxStat::Thermal.count_sensors()
944
+ => 8
945
+
946
+ # File: thermal.rb | Line: 41
947
+ # Definition: def fans
948
+ LinuxStat::Thermal.fans()
949
+ => [{:path=>"/sys/class/hwmon/hwmon4", :name=>"dell_smm", :label=>"Processor Fan", :rpm=>0}]
950
+
951
+ # File: thermal.rb | Line: 23
952
+ # Definition: def temperatures
953
+ 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...
955
+
956
+ ```
957
+
857
958
  ### LinuxStat::USB
858
959
  ```
859
- # File: usb.rb | Line: 135
960
+ # File: usb.rb | Line: 139
860
961
  # Definition: def count
861
962
  LinuxStat::USB.count()
862
963
  => 10
863
964
 
864
- # File: usb.rb | Line: 135
965
+ # File: usb.rb | Line: 139
865
966
  # Definition: def count
866
967
  LinuxStat::USB.count_devices()
867
968
  => 10
868
969
 
869
- # File: usb.rb | Line: 47
970
+ # File: usb.rb | Line: 49
870
971
  # Definition: def devices_stat(hwdata: true)
871
972
  LinuxStat::USB.devices_stat(hwdata:)
872
- => [{: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...
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...
873
974
 
874
- # File: usb.rb | Line: 175
975
+ # File: usb.rb | Line: 179
875
976
  # Definition: def hwdata_file
876
977
  LinuxStat::USB.hwdata_file()
877
978
  => "/usr/share/hwdata/usb.ids"
878
979
 
879
- # File: usb.rb | Line: 164
980
+ # File: usb.rb | Line: 168
880
981
  # Definition: def hwdata_file_set?
881
982
  LinuxStat::USB.hwdata_file_set?()
882
983
  => true
883
984
 
884
- # File: usb.rb | Line: 191
985
+ # File: usb.rb | Line: 195
885
986
  # Definition: def initialize_hwdata
886
987
  LinuxStat::USB.initialize_hwdata()
887
988
  => false
@@ -897,104 +998,104 @@ LinuxStat::Uname.nodename()
897
998
  => "archlinux"
898
999
 
899
1000
  LinuxStat::Uname.release()
900
- => "5.10.2-xanmod1-cacule-1-cacule"
1001
+ => "5.9.9-xanmod1-1"
901
1002
 
902
1003
  LinuxStat::Uname.sysname()
903
1004
  => "Linux"
904
1005
 
905
1006
  LinuxStat::Uname.version()
906
- => "#1 SMP PREEMPT Thu, 24 Dec 2020 18:28:16 +0000"
1007
+ => "#1 SMP PREEMPT Fri, 20 Nov 2020 07:44:55 +0000"
907
1008
 
908
1009
  ```
909
1010
 
910
1011
  ### LinuxStat::User
911
1012
  ```
912
- # File: user.rb | Line: 98
1013
+ # File: user.rb | Line: 101
913
1014
  # Definition: def get_user
914
1015
  LinuxStat::User.get_current_user()
915
1016
  => "sourav"
916
1017
 
917
- # File: user.rb | Line: 137
1018
+ # File: user.rb | Line: 140
918
1019
  # Definition: def get_euid
919
1020
  LinuxStat::User.get_euid()
920
1021
  => 1000
921
1022
 
922
- # File: user.rb | Line: 129
1023
+ # File: user.rb | Line: 132
923
1024
  # Definition: def get_gid
924
1025
  LinuxStat::User.get_gid()
925
1026
  => 1000
926
1027
 
927
- # File: user.rb | Line: 152
1028
+ # File: user.rb | Line: 155
928
1029
  # Definition: def get_login
929
1030
  LinuxStat::User.get_login()
930
1031
  => "sourav"
931
1032
 
932
- # File: user.rb | Line: 121
1033
+ # File: user.rb | Line: 124
933
1034
  # Definition: def get_uid
934
1035
  LinuxStat::User.get_uid()
935
1036
  => 1000
936
1037
 
937
- # File: user.rb | Line: 98
1038
+ # File: user.rb | Line: 101
938
1039
  # Definition: def get_user
939
1040
  LinuxStat::User.get_user()
940
1041
  => "sourav"
941
1042
 
942
- # File: user.rb | Line: 215
1043
+ # File: user.rb | Line: 218
943
1044
  # Definition: def gid_by_username(username = get_user)
944
1045
  LinuxStat::User.gid_by_username(username)
945
1046
  => 1000
946
1047
 
947
- # File: user.rb | Line: 56
1048
+ # File: user.rb | Line: 58
948
1049
  # Definition: def gids
949
1050
  LinuxStat::User.gids()
950
1051
  => {: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
1052
 
952
- # File: user.rb | Line: 314
1053
+ # File: user.rb | Line: 317
953
1054
  # Definition: def home_by_gid(id = get_gid)
954
1055
  LinuxStat::User.home_by_gid(id)
955
1056
  => "/home/sourav"
956
1057
 
957
- # File: user.rb | Line: 266
1058
+ # File: user.rb | Line: 269
958
1059
  # Definition: def home_by_username(user = get_user)
959
1060
  LinuxStat::User.home_by_username(user)
960
1061
  => "/home/sourav"
961
1062
 
962
- # File: user.rb | Line: 72
1063
+ # File: user.rb | Line: 75
963
1064
  # Definition: def home_directories
964
1065
  LinuxStat::User.home_directories()
965
1066
  => {: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
1067
 
967
- # File: user.rb | Line: 293
1068
+ # File: user.rb | Line: 296
968
1069
  # Definition: def homes_by_uid(id = get_uid)
969
1070
  LinuxStat::User.homes_by_uid(id)
970
1071
  => ["/home/sourav"]
971
1072
 
972
- # File: user.rb | Line: 23
1073
+ # File: user.rb | Line: 25
973
1074
  # Definition: def ids
974
1075
  LinuxStat::User.ids()
975
1076
  => {: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
1077
 
977
- # File: user.rb | Line: 11
1078
+ # File: user.rb | Line: 13
978
1079
  # Definition: def list
979
1080
  LinuxStat::User.list()
980
1081
  => ["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
1082
 
982
- # File: user.rb | Line: 244
1083
+ # File: user.rb | Line: 247
983
1084
  # Definition: def uid_by_username(username = get_user)
984
1085
  LinuxStat::User.uid_by_username(username)
985
1086
  => 1000
986
1087
 
987
- # File: user.rb | Line: 40
1088
+ # File: user.rb | Line: 42
988
1089
  # Definition: def uids
989
1090
  LinuxStat::User.uids()
990
1091
  => {: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
1092
 
992
- # File: user.rb | Line: 187
1093
+ # File: user.rb | Line: 190
993
1094
  # Definition: def username_by_gid(gid = get_gid)
994
1095
  LinuxStat::User.username_by_gid(gid)
995
1096
  => "sourav"
996
1097
 
997
- # File: user.rb | Line: 169
1098
+ # File: user.rb | Line: 172
998
1099
  # Definition: def usernames_by_uid(uid = get_uid)
999
1100
  LinuxStat::User.usernames_by_uid(uid)
1000
1101
  => ["sourav"]