Skip to content

Commit 4fe5640

Browse files
committed
Add generated files
1 parent 7b78cc4 commit 4fe5640

File tree

95 files changed

+2270
-476
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+2270
-476
lines changed

c/include/libsbp/cpp/message_traits.h

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,19 +1039,19 @@ struct MessageTraits<msg_sbas_raw_t> {
10391039

10401040

10411041
template<>
1042-
struct MessageTraits<msg_linux_cpu_state_t> {
1042+
struct MessageTraits<msg_linux_cpu_state_dep_a_t> {
10431043
static constexpr u16 id = 32512;
10441044
};
10451045

10461046

10471047
template<>
1048-
struct MessageTraits<msg_linux_mem_state_t> {
1048+
struct MessageTraits<msg_linux_mem_state_dep_a_t> {
10491049
static constexpr u16 id = 32513;
10501050
};
10511051

10521052

10531053
template<>
1054-
struct MessageTraits<msg_linux_sys_state_t> {
1054+
struct MessageTraits<msg_linux_sys_state_dep_a_t> {
10551055
static constexpr u16 id = 32514;
10561056
};
10571057

@@ -1086,6 +1086,24 @@ struct MessageTraits<msg_linux_process_fd_summary_t> {
10861086
};
10871087

10881088

1089+
template<>
1090+
struct MessageTraits<msg_linux_cpu_state_t> {
1091+
static constexpr u16 id = 32520;
1092+
};
1093+
1094+
1095+
template<>
1096+
struct MessageTraits<msg_linux_mem_state_t> {
1097+
static constexpr u16 id = 32521;
1098+
};
1099+
1100+
1101+
template<>
1102+
struct MessageTraits<msg_linux_sys_state_t> {
1103+
static constexpr u16 id = 32522;
1104+
};
1105+
1106+
10891107
template<>
10901108
struct MessageTraits<msg_startup_t> {
10911109
static constexpr u16 id = 65280;

c/include/libsbp/linux.h

Lines changed: 102 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,43 +28,43 @@
2828
SBP_PACK_START
2929

3030

31-
/** List CPU state on the system
31+
/** List CPU state on the system. DEPRECATED.
3232
*
3333
* This message indicates the process state of the top 10 heaviest
3434
* consumers of CPU on the system.
3535
*/
36-
#define SBP_MSG_LINUX_CPU_STATE 0x7F00
36+
#define SBP_MSG_LINUX_CPU_STATE_DEP_A 0x7F00
3737

3838
typedef struct SBP_ATTR_PACKED {
3939
u8 index; /**< sequence of this status message, values from 0-9 */
4040
u16 pid; /**< the PID of the process */
4141
u8 pcpu; /**< percent of cpu used, expressed as a fraction of 256 */
4242
char tname[15]; /**< fixed length string representing the thread name */
4343
char cmdline[0]; /**< the command line (as much as it fits in the remaining packet) */
44-
} msg_linux_cpu_state_t;
44+
} msg_linux_cpu_state_dep_a_t;
4545

4646

47-
/** List CPU state on the system
47+
/** List memory state on the system. DEPRECATED.
4848
*
4949
* This message indicates the process state of the top 10 heaviest
5050
* consumers of memory on the system.
5151
*/
52-
#define SBP_MSG_LINUX_MEM_STATE 0x7F01
52+
#define SBP_MSG_LINUX_MEM_STATE_DEP_A 0x7F01
5353

5454
typedef struct SBP_ATTR_PACKED {
5555
u8 index; /**< sequence of this status message, values from 0-9 */
5656
u16 pid; /**< the PID of the process */
5757
u8 pmem; /**< percent of memory used, expressed as a fraction of 256 */
5858
char tname[15]; /**< fixed length string representing the thread name */
5959
char cmdline[0]; /**< the command line (as much as it fits in the remaining packet) */
60-
} msg_linux_mem_state_t;
60+
} msg_linux_mem_state_dep_a_t;
6161

6262

63-
/** CPU, Memory and Process Starts/Stops
63+
/** CPU, Memory and Process Starts/Stops. DEPRECATED.
6464
*
6565
* This presents a summary of CPU and memory utilization.
6666
*/
67-
#define SBP_MSG_LINUX_SYS_STATE 0x7F02
67+
#define SBP_MSG_LINUX_SYS_STATE_DEP_A 0x7F02
6868

6969
typedef struct SBP_ATTR_PACKED {
7070
u16 mem_total; /**< total system memory */
@@ -73,7 +73,7 @@ typedef struct SBP_ATTR_PACKED {
7373
u16 procs_starting; /**< number of processes that started during collection phase */
7474
u16 procs_stopping; /**< number of processes that stopped during collection phase */
7575
u16 pid_count; /**< the count of processes on the system */
76-
} msg_linux_sys_state_t;
76+
} msg_linux_sys_state_dep_a_t;
7777

7878

7979
/** A list of processes with high socket counts
@@ -177,6 +177,99 @@ of the list being 2 NULL terminators in a row.
177177
} msg_linux_process_fd_summary_t;
178178

179179

180+
/** List CPU state on the system
181+
*
182+
* This message indicates the process state of the top 10 heaviest
183+
* consumers of CPU on the system, including a timestamp.
184+
*/
185+
#define SBP_MSG_LINUX_CPU_STATE 0x7F08
186+
#define SBP_LINUX_CPU_STATE_TIMESTAMP_TYPE_MASK (0x7)
187+
#define SBP_LINUX_CPU_STATE_TIMESTAMP_TYPE_SHIFT (0u)
188+
#define SBP_LINUX_CPU_STATE_TIMESTAMP_TYPE_GET(flags) \
189+
(((flags) >> SBP_LINUX_CPU_STATE_TIMESTAMP_TYPE_SHIFT) \
190+
& SBP_LINUX_CPU_STATE_TIMESTAMP_TYPE_MASK)
191+
#define SBP_LINUX_CPU_STATE_TIMESTAMP_TYPE_SET(flags, val) \
192+
do {((flags) |= \
193+
(((val) & (SBP_LINUX_CPU_STATE_TIMESTAMP_TYPE_MASK)) \
194+
<< (SBP_LINUX_CPU_STATE_TIMESTAMP_TYPE_SHIFT)));} while(0)
195+
196+
197+
#define SBP_LINUX_CPU_STATE_TIMESTAMP_TYPE_SYSTEM_TIME_IN_SECONDS (0)
198+
#define SBP_LINUX_CPU_STATE_TIMESTAMP_TYPE_GPS_TOW_IN_MILLISECONDS (1)
199+
200+
typedef struct SBP_ATTR_PACKED {
201+
u8 index; /**< sequence of this status message, values from 0-9 */
202+
u16 pid; /**< the PID of the process */
203+
u8 pcpu; /**< percent of cpu used, expressed as a fraction of 256 */
204+
u32 time; /**< timestamp of message, refer to flags field for how to interpret */
205+
u8 flags; /**< flags */
206+
char tname[15]; /**< fixed length string representing the thread name */
207+
char cmdline[0]; /**< the command line (as much as it fits in the remaining packet) */
208+
} msg_linux_cpu_state_t;
209+
210+
211+
/** List memory state on the system
212+
*
213+
* This message indicates the process state of the top 10 heaviest
214+
* consumers of memory on the system, including a timestamp.
215+
*/
216+
#define SBP_MSG_LINUX_MEM_STATE 0x7F09
217+
#define SBP_LINUX_MEM_STATE_TIMESTAMP_TYPE_MASK (0x7)
218+
#define SBP_LINUX_MEM_STATE_TIMESTAMP_TYPE_SHIFT (0u)
219+
#define SBP_LINUX_MEM_STATE_TIMESTAMP_TYPE_GET(flags) \
220+
(((flags) >> SBP_LINUX_MEM_STATE_TIMESTAMP_TYPE_SHIFT) \
221+
& SBP_LINUX_MEM_STATE_TIMESTAMP_TYPE_MASK)
222+
#define SBP_LINUX_MEM_STATE_TIMESTAMP_TYPE_SET(flags, val) \
223+
do {((flags) |= \
224+
(((val) & (SBP_LINUX_MEM_STATE_TIMESTAMP_TYPE_MASK)) \
225+
<< (SBP_LINUX_MEM_STATE_TIMESTAMP_TYPE_SHIFT)));} while(0)
226+
227+
228+
#define SBP_LINUX_MEM_STATE_TIMESTAMP_TYPE_SYSTEM_TIME_IN_SECONDS (0)
229+
#define SBP_LINUX_MEM_STATE_TIMESTAMP_TYPE_GPS_TOW_IN_MILLISECONDS (1)
230+
231+
typedef struct SBP_ATTR_PACKED {
232+
u8 index; /**< sequence of this status message, values from 0-9 */
233+
u16 pid; /**< the PID of the process */
234+
u8 pmem; /**< percent of memory used, expressed as a fraction of 256 */
235+
u32 time; /**< timestamp of message, refer to flags field for how to interpret */
236+
u8 flags; /**< flags */
237+
char tname[15]; /**< fixed length string representing the thread name */
238+
char cmdline[0]; /**< the command line (as much as it fits in the remaining packet) */
239+
} msg_linux_mem_state_t;
240+
241+
242+
/** CPU, Memory and Process Starts/Stops.
243+
*
244+
* This presents a summary of CPU and memory utilization, including a timestamp.
245+
*/
246+
#define SBP_MSG_LINUX_SYS_STATE 0x7F0A
247+
#define SBP_LINUX_SYS_STATE_TIMESTAMP_TYPE_MASK (0x7)
248+
#define SBP_LINUX_SYS_STATE_TIMESTAMP_TYPE_SHIFT (0u)
249+
#define SBP_LINUX_SYS_STATE_TIMESTAMP_TYPE_GET(flags) \
250+
(((flags) >> SBP_LINUX_SYS_STATE_TIMESTAMP_TYPE_SHIFT) \
251+
& SBP_LINUX_SYS_STATE_TIMESTAMP_TYPE_MASK)
252+
#define SBP_LINUX_SYS_STATE_TIMESTAMP_TYPE_SET(flags, val) \
253+
do {((flags) |= \
254+
(((val) & (SBP_LINUX_SYS_STATE_TIMESTAMP_TYPE_MASK)) \
255+
<< (SBP_LINUX_SYS_STATE_TIMESTAMP_TYPE_SHIFT)));} while(0)
256+
257+
258+
#define SBP_LINUX_SYS_STATE_TIMESTAMP_TYPE_SYSTEM_TIME_IN_SECONDS (0)
259+
#define SBP_LINUX_SYS_STATE_TIMESTAMP_TYPE_GPS_TOW_IN_MILLISECONDS (1)
260+
261+
typedef struct SBP_ATTR_PACKED {
262+
u16 mem_total; /**< total system memory */
263+
u8 pcpu; /**< percent of total cpu currently utilized */
264+
u8 pmem; /**< percent of total memory currently utilized */
265+
u16 procs_starting; /**< number of processes that started during collection phase */
266+
u16 procs_stopping; /**< number of processes that stopped during collection phase */
267+
u16 pid_count; /**< the count of processes on the system */
268+
u32 time; /**< timestamp of message, refer to flags field for how to interpret */
269+
u8 flags; /**< flags */
270+
} msg_linux_sys_state_t;
271+
272+
180273
/** \} */
181274

182275
SBP_PACK_END

docs/sbp.pdf

369 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)