2 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
4 * Licensed under the Flora License, Version 1.1 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
22 #define APP_ID_MAX_SIZE 256
25 * @brief Load average report
27 struct system_load_average_report {
28 time_t time; /** Number of seconds after the Epoch */
29 float one_min_avg; /** One minute load averate */
30 float five_min_avg; /** Five minutes load average */
31 float fifteen_min_avg; /** Fifteen minutes load average */
35 * @brief System Memory usage report
37 struct system_memory_usage_report {
38 time_t time; /** Number of seconds after the Epoch */
39 float usage; /** Memory utilization (Percent) */
43 * @brief System CPU usage report
45 struct system_cpu_usage_report {
46 time_t time; /** Number of seconds after the Epoch */
47 float usage; /** Cpu utilization (Percent) */
51 * @brief System CPU usage report per core.
53 struct system_percpu_usage_report {
54 time_t time; /** Number of seconds after the Epoch */
55 unsigned int cpu_count; /** Number of logical cpus (cores) */
56 float usage[]; /** Utilization of each logical cpu (core) */
60 * @brief Process CPU usage report.
62 struct process_cpu_usage_report {
63 time_t time; /** Number of seconds after the Epoch */
64 int pid; /** Process Pid */
65 float usage; /** CPU utilization of process (Percent) */
69 * @brief Process memory usage report.
71 struct process_memory_usage_report {
72 time_t time; /** Number of seconds after the Epoch */
73 int pid; /** Process Pid */
74 float usage; /** System's memory utilization of process (Percent) */
78 * @brief Application CPU usage report.
80 struct app_cpu_usage_report {
81 char app_id[APP_ID_MAX_SIZE];
82 struct process_cpu_usage_report process_report;
86 * @brief Application memory usage report.
88 struct app_memory_usage_report {
89 char app_id[APP_ID_MAX_SIZE];
90 struct process_memory_usage_report process_report;