linux_stat 0.6.4 → 0.7.5

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: 15bbdf4582dc8a526cde2230d81e2fea8ea67f5684daeae87161bd486e8f73a0
4
- data.tar.gz: 236125a3f4ac8c85563cf075be40b8ceb0e7e0b4cd6374abce1c6c6f62da8d56
3
+ metadata.gz: 11d9c04524805452a0662ea750b21a137a69912f4f699f7582076c5fa46ad639
4
+ data.tar.gz: 6428b4caee5b475349b34c667c5d7157b6fb5d64b9a0a90dbdb160a8b3182042
5
5
  SHA512:
6
- metadata.gz: 9c2f0f12aa42dbb2c63426a5c7aa384bb68a02dcf283b78953ebc641b6d1803400f571d94e6eb4a812b282672d95a071857fd2e4ab4004d17c163eb2ce12fea7
7
- data.tar.gz: 448f627019dce4ada6c6c76c75dc3a2d531230a1cf77de7a88d0fd372c43e79ed69b479dc7625385ac9f2e44e1bb8da2ef8405d9737ddccd5b985691959cf294
6
+ metadata.gz: 9cb66d951d9f1b7beb0115e3c0e040c377930efeeb323aa38c2cfd4af29988c6aa99041efdfbcb00c8e29383256254997c4d5297777c5cac7503834f279fa922
7
+ data.tar.gz: bc42532fabf55a172b9688c56e66e695e3caa45f4b94d2006601021cbec6569b8aea5a15dfcb50b82646350707e915fb5b76198c6ff37bf4cf79207d91542509
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
- # LinuxStat
1
+ # LinuxStat [![Ruby Gem](https://badge.fury.io/rb/linux_stat.svg)](https://rubygems.org/gems/linux_stat) ![Workflow Status](https://github.com/souravgoswami/linux_stat/workflows/LinuxStat%20Test/badge.svg)
2
+
2
3
  ![logo](https://raw.githubusercontent.com/Souravgoswami/linux_stat/master/images/logo.jpg)
3
4
 
4
5
  For reading the eyecandy HTML version, visit [linux_stat](https://souravgoswami.github.io/linux_stat/).
@@ -10,7 +11,7 @@ It only works for Linux, and detecting the OS is upto the user of this gem.
10
11
  ---
11
12
 
12
13
  ## Dependencies:
13
- + You need to have the C compile to be able to compile the C extension.
14
+ + You need to have the C compiler installed to be able to compile the C extensions.
14
15
  On Arch Linux:
15
16
  ```
16
17
  # pacman -S gcc make
@@ -49,465 +50,753 @@ Or install it yourself as:
49
50
  ## Usage
50
51
  ### LinuxStat::BIOS
51
52
  ```
52
- LinuxStat::BIOS.date
53
+ # File: bios.rb | Line: 56
54
+ # Definition: def date
55
+ LinuxStat::BIOS.date()
53
56
  => "04/10/2017"
54
57
 
55
- LinuxStat::BIOS.model
58
+ # File: bios.rb | Line: 10
59
+ # Definition: def model
60
+ LinuxStat::BIOS.model()
56
61
  => "Inspiron 5567"
57
62
 
58
- LinuxStat::BIOS.vendor
63
+ # File: bios.rb | Line: 27
64
+ # Definition: def vendor
65
+ LinuxStat::BIOS.vendor()
59
66
  => "Dell Inc."
60
67
 
61
- LinuxStat::BIOS.version
68
+ # File: bios.rb | Line: 42
69
+ # Definition: def version
70
+ LinuxStat::BIOS.version()
62
71
  => "1.1.2"
63
72
 
64
73
  ```
65
74
 
66
75
  ### LinuxStat::Battery
67
76
  ```
68
- LinuxStat::Battery.charge
77
+ # File: battery.rb | Line: 100
78
+ # Definition: def charge
79
+ LinuxStat::Battery.charge()
69
80
  => 100.0
70
81
 
71
- LinuxStat::Battery.charging?
82
+ # File: battery.rb | Line: 73
83
+ # Definition: def charging?
84
+ LinuxStat::Battery.charging?()
72
85
  => true
73
86
 
74
- LinuxStat::Battery.discharging?
87
+ # File: battery.rb | Line: 82
88
+ # Definition: def discharging?
89
+ LinuxStat::Battery.discharging?()
75
90
  => false
76
91
 
77
- LinuxStat::Battery.full?
92
+ # File: battery.rb | Line: 91
93
+ # Definition: def full?
94
+ LinuxStat::Battery.full?()
78
95
  => true
79
96
 
80
- LinuxStat::Battery.manufacturer
97
+ # File: battery.rb | Line: 45
98
+ # Definition: def manufacturer
99
+ LinuxStat::Battery.manufacturer()
81
100
  => "Samsung SDI"
82
101
 
83
- LinuxStat::Battery.model
102
+ # File: battery.rb | Line: 36
103
+ # Definition: def model
104
+ LinuxStat::Battery.model()
84
105
  => "DELL CYMGM77"
85
106
 
86
- LinuxStat::Battery.present?
107
+ # File: battery.rb | Line: 8
108
+ # Definition: def present?
109
+ LinuxStat::Battery.present?()
87
110
  => true
88
111
 
89
- LinuxStat::Battery.stat
112
+ # File: battery.rb | Line: 16
113
+ # Definition: def stat
114
+ LinuxStat::Battery.stat()
90
115
  => {:model=>"DELL CYMGM77", :manufacturer=>"Samsung SDI", :technology=>"Li-ion", :status=>"Full", :charge=>100.0, :charging=>true, :discharging=>false, :full=>true}
91
116
 
92
- LinuxStat::Battery.status
117
+ # File: battery.rb | Line: 64
118
+ # Definition: def status
119
+ LinuxStat::Battery.status()
93
120
  => "Full"
94
121
 
95
- LinuxStat::Battery.technology
122
+ # File: battery.rb | Line: 54
123
+ # Definition: def technology
124
+ LinuxStat::Battery.technology()
96
125
  => "Li-ion"
97
126
 
98
127
  ```
99
128
 
100
129
  ### LinuxStat::CPU
101
130
  ```
102
- LinuxStat::CPU.count
131
+ # File: cpu.rb | Line: 82
132
+ # Definition: def count
133
+ LinuxStat::CPU.count()
103
134
  => 4
104
135
 
105
- LinuxStat::CPU.cur_freq
106
- => [2000063, 2000108, 2000332, 2000028]
136
+ # File: cpu.rb | Line: 101
137
+ # Definition: def cur_freq
138
+ LinuxStat::CPU.cur_freq()
139
+ => [2000052, 2000013, 2000012, 1960509]
107
140
 
108
- LinuxStat::CPU.max_freq
141
+ # File: cpu.rb | Line: 116
142
+ # Definition: def max_freq
143
+ LinuxStat::CPU.max_freq()
109
144
  => [2000000, 2000000, 2000000, 2000000]
110
145
 
111
- LinuxStat::CPU.model
146
+ # File: cpu.rb | Line: 93
147
+ # Definition: def model
148
+ LinuxStat::CPU.model()
112
149
  => "Intel(R) Core(TM) i3-6006U CPU @ 2.00GHz"
113
150
 
114
- LinuxStat::CPU.stat
115
- => {0=>0.0, 1=>0.0, 2=>0.0, 3=>0.0, 4=>0.0}
151
+ # File: cpu.rb | Line: 21
152
+ # Definition: def stat(sleep = ticks_to_ms)
153
+ LinuxStat::CPU.stat(sleep)
154
+ => {0=>20.0, 1=>0.0, 2=>0.0, 3=>0.0, 4=>0.0}
116
155
 
117
- LinuxStat::CPU.total_usage
118
- => 0.0
156
+ # File: cpu.rb | Line: 63
157
+ # Definition: def total_usage(sleep = ticks_to_ms)
158
+ LinuxStat::CPU.usage(sleep)
159
+ => 50.0
119
160
 
120
- LinuxStat::CPU.usage
161
+ # File: cpu.rb | Line: 63
162
+ # Definition: def total_usage(sleep = ticks_to_ms)
163
+ LinuxStat::CPU.usage(sleep)
121
164
  => 20.0
122
165
 
123
- LinuxStat::CPU.usages
124
- => {0=>20.0, 1=>0.0, 2=>0.0, 3=>50.0, 4=>100.0}
166
+ # File: cpu.rb | Line: 21
167
+ # Definition: def stat(sleep = ticks_to_ms)
168
+ LinuxStat::CPU.usages(sleep)
169
+ => {0=>0.0, 1=>0.0, 2=>0.0, 3=>0.0, 4=>0.0}
125
170
 
126
171
  ```
127
172
 
128
- ### LinuxStat::Filesystem
173
+ ### LinuxStat::FS
129
174
  ```
130
- LinuxStat::Filesystem.available
131
- => 33120964608
132
-
133
- LinuxStat::Filesystem.free
134
- => 33120964608
135
-
136
- LinuxStat::Filesystem.stat
137
- => {:total=>119981191168, :free=>33120964608, :used=>86860226560}
175
+ LinuxStat::FS.stat(arg = "/")
176
+ => {:block_size=>4096, :fragment_size=>4096, :blocks=>29292283, :block_free=>12825937, :block_avail_unpriv=>12825937, :inodes=>58612160, :free_inodes=>56967681, :filesystem_id=>2050, :mount_flags=>1024, :max_filename_length=>255}
138
177
 
139
- LinuxStat::Filesystem.stat_raw
140
- => {:block_size=>4096, :fragment_size=>4096, :blocks=>29292283, :block_free=>8086173, :block_avail_unpriv=>8086173, :inodes=>58612160, :free_inodes=>56567338, :filesystem_id=>2050, :mount_flags=>1024, :max_filename_length=>255}
178
+ ```
141
179
 
142
- LinuxStat::Filesystem.total
180
+ ### LinuxStat::Filesystem
181
+ ```
182
+ # File: filesystem.rb | Line: 92
183
+ # Definition: def available(fs = ?/.freeze)
184
+ LinuxStat::Filesystem.available(fs)
185
+ => 52544036864
186
+
187
+ # File: filesystem.rb | Line: 58
188
+ # Definition: def free(fs = ?/.freeze)
189
+ LinuxStat::Filesystem.free(fs)
190
+ => 52544036864
191
+
192
+ # File: filesystem.rb | Line: 19
193
+ # Definition: def stat(fs = ?/.freeze)
194
+ LinuxStat::Filesystem.stat(fs)
195
+ => {:total=>119981191168, :free=>52544036864, :used=>67437154304}
196
+
197
+ # File: filesystem.rb | Line: 108
198
+ # Definition: def stat_raw(fs = ?/.freeze)
199
+ LinuxStat::Filesystem.stat_raw(fs)
200
+ => {:block_size=>4096, :fragment_size=>4096, :blocks=>29292283, :block_free=>12828134, :block_avail_unpriv=>12828134, :inodes=>58612160, :free_inodes=>56968284, :filesystem_id=>2050, :mount_flags=>1024, :max_filename_length=>255}
201
+
202
+ # File: filesystem.rb | Line: 39
203
+ # Definition: def total(fs = ?/.freeze)
204
+ LinuxStat::Filesystem.total(fs)
143
205
  => 119981191168
144
206
 
145
- LinuxStat::Filesystem.used
146
- => 86860226560
207
+ # File: filesystem.rb | Line: 73
208
+ # Definition: def used(fs = ?/.freeze)
209
+ LinuxStat::Filesystem.used(fs)
210
+ => 67437154304
147
211
 
148
212
  ```
149
213
 
150
214
  ### LinuxStat::Kernel
151
215
  ```
152
- LinuxStat::Kernel.build_date
216
+ # File: kernel.rb | Line: 86
217
+ # Definition: def build_date
218
+ LinuxStat::Kernel.build_date()
153
219
  => 2020-11-20 07:44:55 +0000
154
220
 
155
- LinuxStat::Kernel.build_date_string
221
+ # File: kernel.rb | Line: 140
222
+ # Definition: def build_date_string
223
+ LinuxStat::Kernel.build_date_string()
156
224
  => "20 Nov 2020 07:44:55 +0000"
157
225
 
158
- LinuxStat::Kernel.build_user
226
+ # File: kernel.rb | Line: 21
227
+ # Definition: def build_user
228
+ LinuxStat::Kernel.build_user()
159
229
  => "souravgoswami@archlinux"
160
230
 
161
- LinuxStat::Kernel.clk_tck
231
+ # File: kernel.rb | Line: 179
232
+ # Definition: def ticks
233
+ LinuxStat::Kernel.clk_tck()
162
234
  => 100
163
235
 
164
- LinuxStat::Kernel.compiler
236
+ # File: kernel.rb | Line: 33
237
+ # Definition: def compiler
238
+ LinuxStat::Kernel.compiler()
165
239
  => [:gcc, "10.2.0"]
166
240
 
167
- LinuxStat::Kernel.compiler_version
241
+ # File: kernel.rb | Line: 55
242
+ # Definition: def compiler_version
243
+ LinuxStat::Kernel.compiler_version()
168
244
  => "10.2.0"
169
245
 
170
- LinuxStat::Kernel.release
246
+ # File: kernel.rb | Line: 10
247
+ # Definition: def version
248
+ LinuxStat::Kernel.release()
171
249
  => "5.9.9-xanmod1-1"
172
250
 
173
- LinuxStat::Kernel.string
251
+ # File: kernel.rb | Line: 169
252
+ # Definition: def string
253
+ LinuxStat::Kernel.string()
174
254
  => "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"
175
255
 
176
- LinuxStat::Kernel.ticks
256
+ # File: kernel.rb | Line: 179
257
+ # Definition: def ticks
258
+ LinuxStat::Kernel.ticks()
177
259
  => 100
178
260
 
179
- LinuxStat::Kernel.version
261
+ # File: kernel.rb | Line: 10
262
+ # Definition: def version
263
+ LinuxStat::Kernel.version()
180
264
  => "5.9.9-xanmod1-1"
181
265
 
182
266
  ```
183
267
 
184
268
  ### LinuxStat::Memory
185
269
  ```
186
- LinuxStat::Memory.available
187
- => 579264
188
-
189
- LinuxStat::Memory.percent_available
190
- => 15.1
191
-
192
- LinuxStat::Memory.percent_used
193
- => 84.9
194
-
195
- LinuxStat::Memory.stat
196
- => {:total=>3836236, :used=>3256972, :available=>579264, :percent_used=>84.9, :percent_available=>15.1}
197
-
198
- LinuxStat::Memory.total
270
+ # File: memory.rb | Line: 50
271
+ # Definition: def available
272
+ LinuxStat::Memory.available()
273
+ => 342000
274
+
275
+ # File: memory.rb | Line: 81
276
+ # Definition: def percent_available
277
+ LinuxStat::Memory.percent_available()
278
+ => 8.91
279
+
280
+ # File: memory.rb | Line: 70
281
+ # Definition: def percent_used
282
+ LinuxStat::Memory.percent_used()
283
+ => 91.09
284
+
285
+ # File: memory.rb | Line: 11
286
+ # Definition: def stat
287
+ LinuxStat::Memory.stat()
288
+ => {:total=>3836236, :used=>3494236, :available=>342000, :percent_used=>91.09, :percent_available=>8.91}
289
+
290
+ # File: memory.rb | Line: 40
291
+ # Definition: def total
292
+ LinuxStat::Memory.total()
199
293
  => 3836236
200
294
 
201
- LinuxStat::Memory.used
202
- => 3256972
295
+ # File: memory.rb | Line: 60
296
+ # Definition: def used
297
+ LinuxStat::Memory.used()
298
+ => 3494236
203
299
 
204
300
  ```
205
301
 
206
302
  ### LinuxStat::Mounts
207
303
  ```
208
- LinuxStat::Mounts.device_stat
209
- => {:mountpoint=>"/", :total=>119981191168, :free=>33120964608, :available=>33120964608, :used=>86860226560, :percent_used=>72.39, :percent_free=>27.61, :percent_available=>27.61}
304
+ # File: mounts.rb | Line: 179
305
+ # Definition: def device_stat(dev = root)
306
+ LinuxStat::Mounts.device_stat(dev)
307
+ => {:mountpoint=>"/", :total=>119981191168, :free=>52544036864, :available=>52544036864, :used=>67437154304, :percent_used=>56.21, :percent_free=>43.79, :percent_available=>43.79}
210
308
 
211
- LinuxStat::Mounts.devices_stat
309
+ # File: mounts.rb | Line: 137
310
+ # Definition: def devices_stat
311
+ LinuxStat::Mounts.devices_stat()
212
312
  => {"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...
213
313
 
214
- LinuxStat::Mounts.list
215
- => ["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=1892908k,nr_inodes=473227,mode=755 0 0", "run /run tmpfs rw,nosuid,nodev,relatime,mode=755 0 0", "...
314
+ # File: mounts.rb | Line: 11
315
+ # Definition: def list
316
+ LinuxStat::Mounts.list()
317
+ => ["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=1892904k,nr_inodes=473226,mode=755 0 0", "run /run tmpfs rw,nosuid,nodev,relatime,mode=755 0 0", "...
216
318
 
217
- LinuxStat::Mounts.list_devices
218
- => ["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...
319
+ # File: mounts.rb | Line: 20
320
+ # Definition: def list_devices
321
+ LinuxStat::Mounts.list_devices()
322
+ => ["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", "tra...
219
323
 
220
- LinuxStat::Mounts.list_devices_mount_point
221
- => {"proc"=>"/proc", "sys"=>"/sys", "dev"=>"/dev", "run"=>"/run", "/dev/sda2"=>"/", "securityfs"=>"/sys/kernel/security", "tmpfs"=>"/run/user/1000", "devpts"=>"/dev/pts", "cgroup2"=>"/sys/fs/cgroup/unified", "cgroup"=>"/sys/fs/cgroup/perf_event", "pstore...
324
+ # File: mounts.rb | Line: 109
325
+ # Definition: def list_devices_mount_point
326
+ LinuxStat::Mounts.list_devices_mount_point()
327
+ => {"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/blkio", "pstore"=>"/...
222
328
 
223
- LinuxStat::Mounts.mount_point
329
+ # File: mounts.rb | Line: 80
330
+ # Definition: def mount_point(dev = root)
331
+ LinuxStat::Mounts.mount_point(dev)
224
332
  => "/"
225
333
 
226
- LinuxStat::Mounts.root
334
+ # File: mounts.rb | Line: 29
335
+ # Definition: def root
336
+ LinuxStat::Mounts.root()
227
337
  => "/dev/sda2"
228
338
 
229
- LinuxStat::Mounts.root_fs
339
+ # File: mounts.rb | Line: 38
340
+ # Definition: def root_fs
341
+ LinuxStat::Mounts.root_fs()
230
342
  => "xfs"
231
343
 
232
- LinuxStat::Mounts.root_mount_options
344
+ # File: mounts.rb | Line: 47
345
+ # Definition: def root_mount_options
346
+ LinuxStat::Mounts.root_mount_options()
233
347
  => "rw,noatime,attr2,inode64,logbufs=8,logbsize=32k,noquota"
234
348
 
235
- LinuxStat::Mounts.tmpfs
236
- => {"/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...
349
+ # File: mounts.rb | Line: 56
350
+ # Definition: def tmpfs
351
+ LinuxStat::Mounts.tmpfs()
352
+ => {"/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", "/tmp"=>"...
237
353
 
238
354
  ```
239
355
 
240
356
  ### LinuxStat::Net
241
357
  ```
242
- LinuxStat::Net.current_usage
243
- => {:received=>2183400.0, :transmitted=>114860.0}
358
+ # File: net.rb | Line: 80
359
+ # Definition: def usage(interval = 0.1)
360
+ LinuxStat::Net.current_usage(interval)
361
+ => {:received=>0.0, :transmitted=>0.0}
244
362
 
245
- LinuxStat::Net.ipv4_private
363
+ # File: net.rb | Line: 10
364
+ # Definition: def ipv4_private
365
+ LinuxStat::Net.ipv4_private()
246
366
  => "192.168.0.102"
247
367
 
248
- LinuxStat::Net.total_bytes
249
- => {:received=>294316415, :transmitted=>45313147}
368
+ # File: net.rb | Line: 23
369
+ # Definition: def total_bytes
370
+ LinuxStat::Net.total_bytes()
371
+ => {:received=>509728604, :transmitted=>38480016}
250
372
 
251
- LinuxStat::Net.total_bytes_received
252
- => 294317913
373
+ # File: net.rb | Line: 41
374
+ # Definition: def total_bytes_received
375
+ LinuxStat::Net.total_bytes_received()
376
+ => 509728604
253
377
 
254
- LinuxStat::Net.total_bytes_transmitted
255
- => 45313147
378
+ # File: net.rb | Line: 54
379
+ # Definition: def total_bytes_transmitted
380
+ LinuxStat::Net.total_bytes_transmitted()
381
+ => 38480016
256
382
 
257
- LinuxStat::Net.usage
258
- => {:received=>1643690.0, :transmitted=>146030.0}
383
+ # File: net.rb | Line: 80
384
+ # Definition: def usage(interval = 0.1)
385
+ LinuxStat::Net.usage(interval)
386
+ => {:received=>0.0, :transmitted=>0.0}
259
387
 
260
388
  ```
261
389
 
262
390
  ### LinuxStat::OS
263
391
  ```
264
- LinuxStat::OS.bits
392
+ # File: os.rb | Line: 97
393
+ # Definition: def bits
394
+ LinuxStat::OS.bits()
265
395
  => 64
266
396
 
267
- LinuxStat::OS.distribution
397
+ # File: os.rb | Line: 42
398
+ # Definition: def distribution
399
+ LinuxStat::OS.distribution()
268
400
  => "Arch Linux"
269
401
 
270
- LinuxStat::OS.hostname
402
+ # File: os.rb | Line: 81
403
+ # Definition: def hostname
404
+ LinuxStat::OS.hostname()
271
405
  => "archlinux"
272
406
 
273
- LinuxStat::OS.lsb_release
407
+ # File: os.rb | Line: 30
408
+ # Definition: def lsb_release
409
+ LinuxStat::OS.lsb_release()
274
410
  => {:LSB_VERSION=>"1.4", :DISTRIB_ID=>"Arch", :DISTRIB_RELEASE=>"rolling", :DISTRIB_DESCRIPTION=>"Arch Linux"}
275
411
 
276
- LinuxStat::OS.machine
412
+ # File: os.rb | Line: 64
413
+ # Definition: def machine
414
+ LinuxStat::OS.machine()
277
415
  => "x86_64"
278
416
 
279
- LinuxStat::OS.nodename
417
+ # File: os.rb | Line: 72
418
+ # Definition: def nodename
419
+ LinuxStat::OS.nodename()
280
420
  => "archlinux"
281
421
 
282
- LinuxStat::OS.os_release
422
+ # File: os.rb | Line: 15
423
+ # Definition: def os_release
424
+ LinuxStat::OS.os_release()
283
425
  => {: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/"...
284
426
 
285
- LinuxStat::OS.uptime
286
- => {:hour=>7, :minute=>44, :second=>29.92}
427
+ # File: os.rb | Line: 110
428
+ # Definition: def uptime
429
+ LinuxStat::OS.uptime()
430
+ => {:hour=>5, :minute=>29, :second=>14.23}
287
431
 
288
432
  ```
289
433
 
290
- ### LinuxStat::Process
434
+ ### LinuxStat::PrettifyBytes
291
435
  ```
292
- LinuxStat::Process.count
293
- => 205
294
-
295
- LinuxStat::Process.idle
296
- => [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, 152, 153, 166, 168, 172, 174, 176, 178, 182, 183, 184, 185, 186, 188, 230, 271, 324, 328, 337, 14228, 14757, 14998, 14999, 15000, 15001, 15...
436
+ # File: prettify_bytes.rb | Line: 42
437
+ # Definition: def convert_binary(n)
438
+ LinuxStat::PrettifyBytes.convert_binary(n = 948100170920596)
439
+ => "862.29 tebibytes"
297
440
 
298
- LinuxStat::Process.list
299
- => [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, 120, 122, 131, 134,...
441
+ # File: prettify_bytes.rb | Line: 19
442
+ # Definition: def convert_decimal(n)
443
+ LinuxStat::PrettifyBytes.convert_decimal(n = 778254889812055)
444
+ => "778.25 terabytes"
300
445
 
301
- LinuxStat::Process.names
302
- => {1=>"systemd", 2=>"kthreadd", 3=>"rcu_gp", 4=>"rcu_par_gp", 6=>"kworker/0:0H", 9=>"mm_percpu_wq", 10=>"ksoftirqd/0", 11=>"rcuc/0", 12=>"rcu_preempt", 13=>"rcub/0", 14=>"migration/0", 15=>"idle_inject/0", 16=>"cpuhp/0", 17=>"cpuhp/1", 18=>"idle_inject/...
446
+ # File: prettify_bytes.rb | Line: 90
447
+ # Definition: def convert_short_binary(n)
448
+ LinuxStat::PrettifyBytes.convert_short_binary(n = 924133737100164)
449
+ => "840.49 TiB"
303
450
 
304
- LinuxStat::Process.running
305
- => [21158]
451
+ # File: prettify_bytes.rb | Line: 65
452
+ # Definition: def convert_short_decimal(n)
453
+ LinuxStat::PrettifyBytes.convert_short_decimal(n = 723831850276707)
454
+ => "723.83 TB"
306
455
 
307
- LinuxStat::Process.sleeping
308
- => [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, 165, 167, 189, 217, 231, 302, 307, 308, 309, 310, 320, 321, 322, 323, 325, 326, 350, 353, 356, 374, 394,...
456
+ ```
309
457
 
310
- LinuxStat::Process.types
458
+ ### LinuxStat::Process
459
+ ```
460
+ # File: process.rb | Line: 19
461
+ # Definition: def count
462
+ LinuxStat::Process.count()
463
+ => 202
464
+
465
+ # File: process.rb | Line: 71
466
+ # Definition: def idle
467
+ LinuxStat::Process.idle()
468
+ => [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, 152, 153, 169, 171, 173, 174, 177, 178, 183, 184, 185, 186, 187, 188, 231, 271, 373, 383, 1001, 2553, 2554, 2555, 2556, 2557, 2558, 7770, 1...
469
+
470
+ # File: process.rb | Line: 8
471
+ # Definition: def list
472
+ LinuxStat::Process.list()
473
+ => [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,...
474
+
475
+ # File: process.rb | Line: 25
476
+ # Definition: def names
477
+ LinuxStat::Process.names()
478
+ => {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...
479
+
480
+ # File: process.rb | Line: 97
481
+ # Definition: def running
482
+ LinuxStat::Process.running()
483
+ => [13667]
484
+
485
+ # File: process.rb | Line: 58
486
+ # Definition: def sleeping
487
+ LinuxStat::Process.sleeping()
488
+ => [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, 168, 170, 189, 218, 235, 301, 305, 309, 310, 311, 314, 315, 316, 317, 331, 334, 337, 403, 407, 409, 410,...
489
+
490
+ # File: process.rb | Line: 37
491
+ # Definition: def types
492
+ LinuxStat::Process.types()
311
493
  => {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...
312
494
 
313
- LinuxStat::Process.zombie
495
+ # File: process.rb | Line: 84
496
+ # Definition: def zombie
497
+ LinuxStat::Process.zombie()
314
498
  => []
315
499
 
316
500
  ```
317
501
 
318
502
  ### LinuxStat::ProcessInfo
319
503
  ```
320
- LinuxStat::ProcessInfo.cmdline
321
- => "ruby exe/linuxstat.rb -md"
504
+ # File: process_info.rb | Line: 54
505
+ # Definition: def cmdline(pid = $$)
506
+ LinuxStat::ProcessInfo.cmdline(pid)
507
+ => "ruby /usr/bin/linuxstat.rb -md"
322
508
 
323
- LinuxStat::ProcessInfo.command_name
509
+ # File: process_info.rb | Line: 78
510
+ # Definition: def command_name(pid = $$)
511
+ LinuxStat::ProcessInfo.command_name(pid)
324
512
  => "ruby"
325
513
 
326
- LinuxStat::ProcessInfo.cpu_stat
514
+ # File: process_info.rb | Line: 247
515
+ # Definition: def cpu_stat(pid: $$, sleep: ticks_to_ms)
516
+ LinuxStat::ProcessInfo.cpu_stat(pid:, sleep:)
327
517
  => {:cpu_usage=>0.0, :threads=>1, :last_executed_cpu=>1}
328
518
 
329
- LinuxStat::ProcessInfo.cpu_usage
519
+ # File: process_info.rb | Line: 301
520
+ # Definition: def cpu_usage(pid: $$, sleep: ticks_to_ms)
521
+ LinuxStat::ProcessInfo.cpu_usage(pid:, sleep:)
330
522
  => 0.0
331
523
 
332
- LinuxStat::ProcessInfo.gid
524
+ # File: process_info.rb | Line: 406
525
+ # Definition: def gid(pid = $$)
526
+ LinuxStat::ProcessInfo.gid(pid)
333
527
  => {:real=>1000, :effective=>1000, :saved_set=>1000, :filesystem_uid=>1000}
334
528
 
335
- LinuxStat::ProcessInfo.last_executed_cpu
529
+ # File: process_info.rb | Line: 369
530
+ # Definition: def last_executed_cpu(pid = $$)
531
+ LinuxStat::ProcessInfo.last_executed_cpu(pid)
336
532
  => 1
337
533
 
338
- LinuxStat::ProcessInfo.mem_stat
339
- => {:memory=>10051.584, :virtual_memory=>81801.216, :resident_memory=>15986.688}
534
+ # File: process_info.rb | Line: 114
535
+ # Definition: def mem_stat(pid = $$)
536
+ LinuxStat::ProcessInfo.mem_stat(pid)
537
+ => {:memory=>12247.04, :virtual_memory=>83943.424, :resident_memory=>18116.608}
340
538
 
341
- LinuxStat::ProcessInfo.memory
342
- => 10051.584
539
+ # File: process_info.rb | Line: 147
540
+ # Definition: def memory(pid = $$)
541
+ LinuxStat::ProcessInfo.memory(pid)
542
+ => 12247.04
343
543
 
344
- LinuxStat::ProcessInfo.owner
345
- => "sourav"
544
+ # File: process_info.rb | Line: 540
545
+ # Definition: def nice(pid = $$)
546
+ LinuxStat::ProcessInfo.nice(pid)
547
+ => 0
346
548
 
347
- LinuxStat::ProcessInfo.resident_memory
348
- => 15986.688
549
+ # File: process_info.rb | Line: 427
550
+ # Definition: def owner(pid = $$)
551
+ LinuxStat::ProcessInfo.owner(pid)
552
+ => "sourav"
349
553
 
350
- LinuxStat::ProcessInfo.threads
554
+ # File: process_info.rb | Line: 197
555
+ # Definition: def resident_memory(pid = $$)
556
+ LinuxStat::ProcessInfo.resident_memory(pid)
557
+ => 18116.608
558
+
559
+ # File: process_info.rb | Line: 497
560
+ # Definition: def running_time(pid = $$)
561
+ LinuxStat::ProcessInfo.running_time(pid)
562
+ => 1.2999999999992724
563
+
564
+ # File: process_info.rb | Line: 480
565
+ # Definition: def start_time(pid = $$)
566
+ LinuxStat::ProcessInfo.start_time(pid)
567
+ => 2020-12-17 16:36:46 +0530
568
+
569
+ # File: process_info.rb | Line: 449
570
+ # Definition: def start_time_epoch(pid = $$)
571
+ LinuxStat::ProcessInfo.start_time_epoch(pid)
572
+ => 1608203206
573
+
574
+ # File: process_info.rb | Line: 525
575
+ # Definition: def state(pid = $$)
576
+ LinuxStat::ProcessInfo.state(pid)
577
+ => "R"
578
+
579
+ # File: process_info.rb | Line: 344
580
+ # Definition: def threads(pid = $$)
581
+ LinuxStat::ProcessInfo.threads(pid)
351
582
  => 1
352
583
 
353
- LinuxStat::ProcessInfo.total_io
584
+ # File: process_info.rb | Line: 23
585
+ # Definition: def total_io(pid = $$)
586
+ LinuxStat::ProcessInfo.total_io(pid)
354
587
  => {:read_bytes=>0, :write_bytes=>0}
355
588
 
356
- LinuxStat::ProcessInfo.uid
589
+ # File: process_info.rb | Line: 382
590
+ # Definition: def uid(pid = $$)
591
+ LinuxStat::ProcessInfo.uid(pid)
357
592
  => {:real=>1000, :effective=>1000, :saved_set=>1000, :filesystem_uid=>1000}
358
593
 
359
- LinuxStat::ProcessInfo.virtual_memory
360
- => 81801.216
594
+ # File: process_info.rb | Line: 172
595
+ # Definition: def virtual_memory(pid = $$)
596
+ LinuxStat::ProcessInfo.virtual_memory(pid)
597
+ => 83943.424
361
598
 
362
599
  ```
363
600
 
364
601
  ### LinuxStat::Swap
365
602
  ```
366
- LinuxStat::Swap.any?
603
+ # File: swap.rb | Line: 22
604
+ # Definition: def any?
605
+ LinuxStat::Swap.any?()
367
606
  => true
368
607
 
369
- LinuxStat::Swap.available
370
- => 3383720
371
-
372
- LinuxStat::Swap.list
373
- => {"/dev/zram0"=>[:partition, 4194300, 810580, -2]}
374
-
375
- LinuxStat::Swap.percent_available
376
- => 80.67
377
-
378
- LinuxStat::Swap.percent_used
379
- => 19.33
380
-
381
- LinuxStat::Swap.stat
382
- => {:total=>4194300, :used=>810580, :available=>3383720, :percent_used=>19.33, :percent_available=>80.67}
383
-
384
- LinuxStat::Swap.total
608
+ # File: swap.rb | Line: 68
609
+ # Definition: def available
610
+ LinuxStat::Swap.available()
611
+ => 3100412
612
+
613
+ # File: swap.rb | Line: 8
614
+ # Definition: def list
615
+ LinuxStat::Swap.list()
616
+ => {"/dev/zram0"=>[:partition, 4194300, 1093888, -2]}
617
+
618
+ # File: swap.rb | Line: 103
619
+ # Definition: def percent_available
620
+ LinuxStat::Swap.percent_available()
621
+ => 73.92
622
+
623
+ # File: swap.rb | Line: 89
624
+ # Definition: def percent_used
625
+ LinuxStat::Swap.percent_used()
626
+ => 26.08
627
+
628
+ # File: swap.rb | Line: 32
629
+ # Definition: def stat
630
+ LinuxStat::Swap.stat()
631
+ => {:total=>4194300, :used=>1093888, :available=>3100412, :percent_used=>26.08, :percent_available=>73.92}
632
+
633
+ # File: swap.rb | Line: 57
634
+ # Definition: def total
635
+ LinuxStat::Swap.total()
385
636
  => 4194300
386
637
 
387
- LinuxStat::Swap.used
388
- => 810580
638
+ # File: swap.rb | Line: 80
639
+ # Definition: def used
640
+ LinuxStat::Swap.used()
641
+ => 1093888
389
642
 
390
643
  ```
391
644
 
392
645
  ### LinuxStat::Sysconf
393
646
  ```
394
- LinuxStat::Sysconf.child_max
647
+ LinuxStat::Sysconf.child_max()
395
648
  => 2000000
396
649
 
397
- LinuxStat::Sysconf.get_euid
650
+ LinuxStat::Sysconf.get_euid()
398
651
  => 1000
399
652
 
400
- LinuxStat::Sysconf.get_gid
653
+ LinuxStat::Sysconf.get_gid()
401
654
  => 1000
402
655
 
403
- LinuxStat::Sysconf.get_login
656
+ LinuxStat::Sysconf.get_login()
404
657
  => "sourav"
405
658
 
406
- LinuxStat::Sysconf.get_uid
659
+ LinuxStat::Sysconf.get_uid()
407
660
  => 1000
408
661
 
409
- LinuxStat::Sysconf.get_user
662
+ LinuxStat::Sysconf.get_user()
410
663
  => "sourav"
411
664
 
412
- LinuxStat::Sysconf.hostname_max
665
+ LinuxStat::Sysconf.hostname_max()
413
666
  => 64
414
667
 
415
- LinuxStat::Sysconf.login_name_max
668
+ LinuxStat::Sysconf.login_name_max()
416
669
  => 256
417
670
 
418
- LinuxStat::Sysconf.open_max
419
- => 1024
671
+ LinuxStat::Sysconf.open_max()
672
+ => 8192
420
673
 
421
- LinuxStat::Sysconf.pagesize
674
+ LinuxStat::Sysconf.pagesize()
422
675
  => 4096
423
676
 
424
- LinuxStat::Sysconf.posix_version
677
+ LinuxStat::Sysconf.posix_version()
425
678
  => 200809
426
679
 
427
- LinuxStat::Sysconf.sc_clk_tck
680
+ LinuxStat::Sysconf.sc_clk_tck()
428
681
  => 100
429
682
 
430
- LinuxStat::Sysconf.stream_max
683
+ LinuxStat::Sysconf.stream_max()
431
684
  => 16
432
685
 
433
- LinuxStat::Sysconf.tty_name_max
686
+ LinuxStat::Sysconf.tty_name_max()
434
687
  => 32
435
688
 
436
689
  ```
437
690
 
438
691
  ### LinuxStat::Uname
439
692
  ```
440
- LinuxStat::Uname.machine
693
+ LinuxStat::Uname.machine()
441
694
  => "x86_64"
442
695
 
443
- LinuxStat::Uname.nodename
696
+ LinuxStat::Uname.nodename()
444
697
  => "archlinux"
445
698
 
446
- LinuxStat::Uname.release
699
+ LinuxStat::Uname.release()
447
700
  => "5.9.9-xanmod1-1"
448
701
 
449
- LinuxStat::Uname.sysname
702
+ LinuxStat::Uname.sysname()
450
703
  => "Linux"
451
704
 
452
- LinuxStat::Uname.version
705
+ LinuxStat::Uname.version()
453
706
  => "#1 SMP PREEMPT Fri, 20 Nov 2020 07:44:55 +0000"
454
707
 
455
708
  ```
456
709
 
457
710
  ### LinuxStat::User
458
711
  ```
459
- LinuxStat::User.get_current_user
712
+ # File: user.rb | Line: 98
713
+ # Definition: def get_user
714
+ LinuxStat::User.get_current_user()
460
715
  => "sourav"
461
716
 
462
- LinuxStat::User.get_euid
717
+ # File: user.rb | Line: 137
718
+ # Definition: def get_euid
719
+ LinuxStat::User.get_euid()
463
720
  => 1000
464
721
 
465
- LinuxStat::User.get_gid
722
+ # File: user.rb | Line: 129
723
+ # Definition: def get_gid
724
+ LinuxStat::User.get_gid()
466
725
  => 1000
467
726
 
468
- LinuxStat::User.get_login
727
+ # File: user.rb | Line: 152
728
+ # Definition: def get_login
729
+ LinuxStat::User.get_login()
469
730
  => "sourav"
470
731
 
471
- LinuxStat::User.get_uid
732
+ # File: user.rb | Line: 121
733
+ # Definition: def get_uid
734
+ LinuxStat::User.get_uid()
472
735
  => 1000
473
736
 
474
- LinuxStat::User.get_user
737
+ # File: user.rb | Line: 98
738
+ # Definition: def get_user
739
+ LinuxStat::User.get_user()
475
740
  => "sourav"
476
741
 
477
- LinuxStat::User.gid_by_username
742
+ # File: user.rb | Line: 215
743
+ # Definition: def gid_by_username(username = get_user)
744
+ LinuxStat::User.gid_by_username(username)
478
745
  => 1000
479
746
 
480
- LinuxStat::User.gids
747
+ # File: user.rb | Line: 56
748
+ # Definition: def gids
749
+ LinuxStat::User.gids()
481
750
  => {: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, :...
482
751
 
483
- LinuxStat::User.home_by_gid
752
+ # File: user.rb | Line: 314
753
+ # Definition: def home_by_gid(id = get_gid)
754
+ LinuxStat::User.home_by_gid(id)
484
755
  => "/home/sourav"
485
756
 
486
- LinuxStat::User.home_by_username
757
+ # File: user.rb | Line: 266
758
+ # Definition: def home_by_username(user = get_user)
759
+ LinuxStat::User.home_by_username(user)
487
760
  => "/home/sourav"
488
761
 
489
- LinuxStat::User.home_directories
762
+ # File: user.rb | Line: 72
763
+ # Definition: def home_directories
764
+ LinuxStat::User.home_directories()
490
765
  => {: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...
491
766
 
492
- LinuxStat::User.homes_by_uid
767
+ # File: user.rb | Line: 293
768
+ # Definition: def homes_by_uid(id = get_uid)
769
+ LinuxStat::User.homes_by_uid(id)
493
770
  => ["/home/sourav"]
494
771
 
495
- LinuxStat::User.ids
772
+ # File: user.rb | Line: 23
773
+ # Definition: def ids
774
+ LinuxStat::User.ids()
496
775
  => {: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...
497
776
 
498
- LinuxStat::User.list
777
+ # File: user.rb | Line: 11
778
+ # Definition: def list
779
+ LinuxStat::User.list()
499
780
  => ["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...
500
781
 
501
- LinuxStat::User.uid_by_username
782
+ # File: user.rb | Line: 244
783
+ # Definition: def uid_by_username(username = get_user)
784
+ LinuxStat::User.uid_by_username(username)
502
785
  => 1000
503
786
 
504
- LinuxStat::User.uids
787
+ # File: user.rb | Line: 40
788
+ # Definition: def uids
789
+ LinuxStat::User.uids()
505
790
  => {: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...
506
791
 
507
- LinuxStat::User.username_by_gid
792
+ # File: user.rb | Line: 187
793
+ # Definition: def username_by_gid(gid = get_gid)
794
+ LinuxStat::User.username_by_gid(gid)
508
795
  => "sourav"
509
796
 
510
- LinuxStat::User.usernames_by_uid
797
+ # File: user.rb | Line: 169
798
+ # Definition: def usernames_by_uid(uid = get_uid)
799
+ LinuxStat::User.usernames_by_uid(uid)
511
800
  => ["sourav"]
512
801
 
513
802
  ```