1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#![crate_name = "sysinfo"]
#![crate_type = "lib"]
#![crate_type = "rlib"]
extern crate libc;
#[cfg(target_os = "macos")]
mod mac;
#[cfg(target_os = "macos")]
use mac as sys;
#[cfg(not(target_os = "macos"))]
mod linux;
#[cfg(not(target_os = "macos"))]
use linux as sys;
pub use sys::{
Component,
Process,
Processor,
System,
Disk,
DiskType,
};
mod component;
mod process;
mod processor;
mod system;
mod utils;
#[repr(C)]
#[derive(Clone, PartialEq, PartialOrd, Debug, Copy)]
pub enum Signal {
Hangup = 1,
Interrupt = 2,
Quit = 3,
Illegal = 4,
Trap = 5,
Abort = 6,
Bus = 7,
FloatingPointException = 8,
Kill = 9,
User1 = 10,
Segv = 11,
User2 = 12,
Pipe = 13,
Alarm = 14,
Term = 15,
Stklft = 16,
Child = 17,
Continue = 18,
Stop = 19,
TSTP = 20,
TTIN = 21,
TTOU = 22,
Urgent = 23,
XCPU = 24,
XFSZ = 25,
VirtualAlarm = 26,
Profiling = 27,
Winch = 28,
IO = 29,
Power = 30,
Sys = 31,
}