linux_stat 0.6.5 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +516 -197
- data/exe/linuxstat.rb +92 -5
- data/ext/fs_stat/fs_stat.c +7 -3
- data/ext/sysconf/sysconf.c +28 -3
- data/ext/utsname/utsname.c +24 -15
- data/lib/linux_stat/cpu.rb +27 -9
- data/lib/linux_stat/os.rb +2 -2
- data/lib/linux_stat/prettify_bytes.rb +1 -4
- data/lib/linux_stat/process_info.rb +173 -14
- data/lib/linux_stat/user.rb +1 -1
- data/lib/linux_stat/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f24315a14357e71327614a2ec812f052ff71973af21e34e6a14f3a24f537083a
|
4
|
+
data.tar.gz: f2c18ac10d00092ead72522700cf97d58b599890b6c6a0fd076e4ffd88ebf6b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06ec57333b02c7cf239ed0f2e2cd889f95110523e642807d534ec71c9761b9f58066326ed01291871b4f7d9b692adc778db743f2c275f4485c2779ea320b1253
|
7
|
+
data.tar.gz: b577d7ed448d1c5f474ab70c0fda4fd333f43049f27978cf9970032f15c05f2b2f3040d248108393bde474324b6e1d83694d7054a6f2d1f0eaba466d2c7c2b8b
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
# LinuxStat
|
1
|
+
# LinuxStat [](https://rubygems.org/gems/linux_stat) 
|
2
|
+
|
2
3
|

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