summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Dongwoo Lee [Tue, 7 Mar 2023 05:01:24 +0000 (21:01 -0800)]
resource-monitor: Change 'example' decorator into 'code/endcode'
To fix up the error of auto-generated api documents, 'example'
decorator is changed into 'code' and 'endcode'.
Change-Id: I8b50d4f6e7ef6567836e73d4bd0587d37329ecb5
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Dongwoo Lee [Thu, 20 Oct 2022 07:32:07 +0000 (16:32 +0900)]
resource-monitor: Apply system resource manager library
Change-Id: I6e3cf9cd983d7c804898e37343be1255a95094a4
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Sung-hun Kim [Tue, 27 Sep 2022 08:54:52 +0000 (17:54 +0900)]
resource-monitor: Assign enum values copied from libpass header file
In order to hide pass/resource-monitor.h from public API, values defined in
pass/resource-monitor.h are copied into the capi header file and
'#include <pass/resource-monitor.h>' statement is moved to the .c file from
the .h file.
And replace from tab to space for function description.
Change-Id: Ife7566e8d8c25418d5109c53a689065853d0d80c
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Sung-hun Kim [Mon, 19 Sep 2022 01:56:05 +0000 (10:56 +0900)]
resource-monitor: Fix a wrong function call
Change-Id: Iec5b5bd35fe2a09b9653efd0b83c884d0c88b401
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
Dongwoo Lee [Thu, 15 Sep 2022 07:16:05 +0000 (16:16 +0900)]
resource-monitor: Fix to use proper error codes
Since TIZEN_ERROR_NOT_SUPPORTED error code can represents only the
situation that the target does NOT SUPPORT such a features. So
instead of it, the new local error codes is added as below:
- RESOURCE_MONITOR_ERROR_NOT_SUPPORTED_RESOURCE
- RESOURCE_MONITOR_ERROR_NOT_SUPPORTED_ATTRIBUTE
Change-Id: Ia8ba6042a1b251095b672f787f62528e76ba99f4
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Chanwoo Choi [Fri, 2 Sep 2022 02:57:51 +0000 (11:57 +0900)]
tools: system-resource-monitor: Fix coverity issue
Change-Id: If1b57a0121a43c9ac65cf72038951ef08a0a7298
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Sung-hun Kim [Mon, 29 Aug 2022 07:32:33 +0000 (16:32 +0900)]
resource-monitor: Use pass_resource_monitor_set_resource_flag to make the resource PUBLIC
Some information should be protected from public users.
So the users of capi only can access to attirbutes
which have PUBLIC visibility. By using the added
libpass function, we can enforce the user of capi to
only access PUBLIC attributes. If the user tries to
access PRIVATE attributes, the set attribute function
will return RESOURCE_MONITOR_ERROR_PERMISSION_DENIED
error.
Change-Id: If7f40a7cf4e2c0987fa3594a6e3e3f0839c0aded
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
Chanwoo Choi [Thu, 1 Sep 2022 07:06:19 +0000 (16:06 +0900)]
resource-monitor: Add RESOURCE_MONITOR_ERROR_PERMISSION_DENIED error
If the user of capi-system-resource-monitor have not systemmonitor
privilege, return RESOURCE_MONITOR_ERROR_PERMISSION_DENIED error.
Change-Id: Id64804d01b6ef5ca1cb437606dfe4a69ba36b090
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Thu, 1 Sep 2022 05:39:59 +0000 (14:39 +0900)]
resource-monitor: Add example code and update some brief
Add example code to give the guide about using
capi-system-resource-monitor and update some brief
to make it more understable when reading brief section.
Change-Id: I80a56b805c1fd65f8fcbc31a6a7c33ea6b37fb54
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Wed, 31 Aug 2022 07:52:13 +0000 (16:52 +0900)]
resource-monitor: Add systemmonitor privilege
Add systemmonitor privilege[1] to monitor resource data.
[1] https://www.tizen.org/privilege/systemmonitor
Change-Id: Ice104a12a472766ab2d7795a05c90cb7f8fb2463
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Wed, 31 Aug 2022 06:58:13 +0000 (15:58 +0900)]
resource-monitor: Add @see tag to indicate the related capi
Change-Id: Icc3664b8f1a5a1bbeef153a885638e2189eee636
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Wed, 31 Aug 2022 05:54:45 +0000 (14:54 +0900)]
resource-monitor: Fix typo and change document to improve readability
- Fix type
- Replace with new words as followings:
: id -> ID
: int id -> int monitor_id
: uint -> uint32
: cpu -> CPU
- Change the some description
Change-Id: Iced5dda67e09b6fa57b49d4592b0a3231da2a8ca
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Mon, 29 Aug 2022 02:35:49 +0000 (11:35 +0900)]
resource-monitor: Fix static analysis issue
Change-Id: Ic3d63bbe27cebe3d7eef6fb77ec404e49b84a209
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Tue, 23 Aug 2022 03:57:59 +0000 (12:57 +0900)]
resource-monitor: Define enumeration type name and add description for each enum
Define enumeration type name and add description for each enum
according to Natvie API rules.
[Added enumeration definition]
- resource_monitor_error_e for resource monitor error value
- resource_monitor_attr_id_e for resource attribute ID like "u_int64_t attr_id"
- resource_monitor_ctrl_id_e for resource control ID like "u_int64_t ctrl_id"
Change-Id: I43ff0ec643e61fc9dd74e12f20e156204c5b072f
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Sung-hun Kim [Mon, 22 Aug 2022 09:53:58 +0000 (18:53 +0900)]
packaging: Fix typos in the spec file
Change-Id: Ie0f43f5877f693d54078870ee0a6fc566705b618
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
Chanwoo Choi [Fri, 19 Aug 2022 06:30:37 +0000 (15:30 +0900)]
resource-monitor: Update function description according to Native API rules
Add the error enumeration for only resource monitor module
and update function descriptions according to Native API rules.
- RESOURCE_MONITOR_ERROR_NONE
- RESOURCE_MONITOR_ERROR_NOT_SUPPORTED
- RESOURCE_MONITOR_ERROR_INVALID_PARAMETER
- RESOURCE_MONITOR_ERROR_NO_DATA
- RESOURCE_MONITOR_ERROR_OUT_OF_MEMORY
Lastly, change the prototype of resource_monitor_is_resource_attr_supported()
as following because if capi function requires the parameters,
must handle the invalid parameter error case by returning
the INVALID_PARAMETER error.
[De
-bool resource_monitor_is_resource_attr_supported(int id, int resource_id, u_int64_t attr_id);
+int resource_monitor_is_resource_attr_supported(int id, int resource_id, u_int64_t attr_id, bool *supported);
Change-Id: I0485f6a485d4ce6dcb70f9013b3a7dc9db0fbd3f
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Thu, 18 Aug 2022 09:31:58 +0000 (18:31 +0900)]
resource-monitor: doc: Add CAPI_SYSTEM_MONITOR_MODULE and update description
Compose the following domain tree of resource monitor
by adding CAPI_SYSTEM_MONITOR_MODULE and update the description
of resource monitor API>
[Domain tree of system monitor]
CAPI_SYSTEM_FRAMEWORK : System
- CAPI_SYSTEM_MONITOR_MODULE : Monitor
-- CAPI_SYSTEM_RESOURCE_MONITOR_MODULE : Resource Monitor
Change-Id: I75907f21bdda6016554a1a59574e013973064088
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Tue, 9 Aug 2022 04:36:30 +0000 (13:36 +0900)]
resource-monitor: Add system-resource-monitor tool
Add system-resource-monitor cli tool to print the supported resources
and resource attributes. Also, monitor the resource attribute data.
[Example of system-resource-monitor]
-------------------------------------------------------------------------------------------------------------------------------
: | Resource Attribute Name | Resource Attribute Value | Unit | Resource Attribute Description
-------------------------------------------------------------------------------------------------------------------------------
0: 0| RESOURCE_MONITOR_SYSTEM_ATTR_CPU_UTIL | 0.74 | % | CPU average utilization
0: 1| RESOURCE_MONITOR_SYSTEM_ATTR_CPU_USER_UTIL | 0.25 | % | CPU average utilization on user
0: 2| RESOURCE_MONITOR_SYSTEM_ATTR_CPU_SYS_UTIL | 0.50 | % | CPU average utilization on system
0: 3| RESOURCE_MONITOR_SYSTEM_ATTR_PER_CPU_UTIL | 0.99 0.99 0.99 0.00 | % | Per-CPU utilization
0: 4| RESOURCE_MONITOR_SYSTEM_ATTR_PER_CPU_USER_UTIL | 0.99 0.00 0.00 0.00 | % | Per-CPU utilization on user
0: 5| RESOURCE_MONITOR_SYSTEM_ATTR_PER_CPU_SYS_UTIL | 0.00 0.99 0.99 0.00 | % | Per-CPU utilization on system
0: 6| RESOURCE_MONITOR_SYSTEM_ATTR_POSSIBLE_CPU | 4 | ea | Number of possible CPU
0: 7| RESOURCE_MONITOR_SYSTEM_ATTR_ONLINE_CPU | 4 | ea | Number of online CPU
1: 0| RESOURCE_MONITOR_MEMORY_ATTR_TOTAL |
1051213824 | kB | Memory total size
1: 1| RESOURCE_MONITOR_MEMORY_ATTR_AVAILABLE |
783130624 | kB | Memory available size
1: 2| RESOURCE_MONITOR_MEMORY_ATTR_FREE |
545079296 | kB | Memory free size
1: 3| RESOURCE_MONITOR_MEMORY_ATTR_BUFFER |
16211968 | kB | Memorry buffer size
1: 4| RESOURCE_MONITOR_MEMORY_ATTR_CACHED |
224661504 | kB | Memory cached size
1: 5| RESOURCE_MONITOR_MEMORY_ATTR_CMA_TOTAL | 0 | kB | CMA memory total size
1: 6| RESOURCE_MONITOR_MEMORY_ATTR_CMA_FREE | 0 | kB | CMA memory free size
1: 7| RESOURCE_MONITOR_MEMORY_ATTR_SWAP_TOTAL |
4294963200 | kB | Swap memory total size
1: 8| RESOURCE_MONITOR_MEMORY_ATTR_SWAP_FREE |
4294963200 | kB | Swap memory free size
2: 0| RESOURCE_MONITOR_DISPLAY_ATTR_NAME | lcd | | Display device name
2: 1| RESOURCE_MONITOR_DISPLAY_ATTR_FPS | 0.00 | fps | Frame per second
3: 0| RESOURCE_MONITOR_BATTERY_ATTR_CAPACITY | 50 | % | Battery capacity
3: 1| RESOURCE_MONITOR_BATTERY_ATTR_STATUS | Not Supported | | Battery status
3: 2| RESOURCE_MONITOR_BATTERY_ATTR_TEMPERATURE | Not Supported | | Battery temperature
3: 3| RESOURCE_MONITOR_BATTERY_ATTR_VOLTAGE_NOW | Not Supported | uV | Battery voltage figure
3: 4| RESOURCE_MONITOR_BATTERY_ATTR_CURRENT_NOW | Not Supported | uA | Battery current figure
3: 5| RESOURCE_MONITOR_BATTERY_ATTR_PRESENT | Not Supported | | Battery connected status
3: 6| RESOURCE_MONITOR_BATTERY_ATTR_ONLINE | Not Supported | | Battery Charger connector status
4: 0| RESOURCE_MONITOR_CPU_ATTR_NAME | cpu0 | | CPU cluster name
4: 1| RESOURCE_MONITOR_CPU_ATTR_CUR_FREQ | Not Supported | kHz | Current CPU frequency
4: 2| RESOURCE_MONITOR_CPU_ATTR_MIN_FREQ | Not Supported | kHz | Current CPU minimum frequency
4: 3| RESOURCE_MONITOR_CPU_ATTR_MAX_FREQ | Not Supported | kHz | Current CPU maximum frequency
4: 4| RESOURCE_MONITOR_CPU_ATTR_AVAILABLE_MIN_FREQ | Not Supported | kHz | Available CPU minimum frequency
4: 5| RESOURCE_MONITOR_CPU_ATTR_AVAILABLE_MAX_FREQ | Not Supported | kHz | Available CPU maximum frequency
4: 6| RESOURCE_MONITOR_CPU_ATTR_CUR_GOVERNOR | Not Supported | | Current CPU frequency governor name
5: 0| RESOURCE_MONITOR_DISK_ATTR_NAME | vda | | Disk device name
5: 1| RESOURCE_MONITOR_DISK_ATTR_READ_PER_SEC | 0.00 | kB/s | Disk read per second
5: 2| RESOURCE_MONITOR_DISK_ATTR_WRITE_PER_SEC | 0.00 | kB/s | Disk write per second
5: 3| RESOURCE_MONITOR_DISK_ATTR_READ_TOTAL | 485198 | kB | Disk read total size
5: 4| RESOURCE_MONITOR_DISK_ATTR_WRITE_TOTAL | 24352 | kB | Disk write total size
Change-Id: Ibf7e1f0fb380feb54b36c874a09df64ee493ea7c
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Tue, 9 Aug 2022 04:17:04 +0000 (13:17 +0900)]
resource-monitor: Change prototype of resource_monitor_get_resource_count
Change prototype of resource_monitor_get_resource_count
because pass_resource_monitor_get_resource_count's prototype is changed.
Change-Id: Ibb474da55be846e20001929f760602ee91ce3673
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Tue, 9 Aug 2022 03:59:17 +0000 (12:59 +0900)]
resource-monitor: Add new disk resource attributes and missing attributes
Add new disk resource attributes to monitor disk h/w resource
and add the missing resource attributes for cpu/bus/gpu/display/memory/battery
resources.
[Added resource attributes]
RESOURCE_MONITOR_TYPE_DISK
- RESOURCE_MONITOR_DISK_ATTR_NAME
- RESOURCE_MONITOR_DISK_ATTR_READ_PER_SEC
- RESOURCE_MONITOR_DISK_ATTR_WRITE_PER_SEC
- RESOURCE_MONITOR_DISK_ATTR_READ_TOTAL
- RESOURCE_MONITOR_DISK_ATTR_WRITE_TOTAL
RESOURCE_MONITOR_TYPE_CPU
- RESOURCE_MONITOR_CPU_ATTR_NAME
RESOURCE_MONITOR_TYPE_BUS
- RESOURCE_MONITOR_BUS_ATTR_NAME
RESOURCE_MONITOR_TYPE_GPU
- RESOURCE_MONITOR_GPU_ATTR_NAME
RESOURCE_MONITOR_TYPE_DISPLAY
- RESOURCE_MONITOR_DISPLAY_ATTR_NAME
RESOURCE_MONITOR_TYPE_BATTERY
- RESOURCE_MONITOR_MEMORY_ATTR_SWAP_TOTAL
- RESOURCE_MONITOR_MEMORY_ATTR_SWAP_FREE
Change-Id: Ib5f555c929406403334139993197b435ca49febc
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Tue, 9 Aug 2022 03:55:19 +0000 (12:55 +0900)]
resource-monitor: Change prototype resource_monitor_get_value_string
Change prototype resource_monitor_get_value_string
and add description about free opearion of get_array functions.
Change-Id: Ibe9a8fa9db39457e90dcb637ee76a5d69d2186c7
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Fri, 1 Apr 2022 07:55:53 +0000 (16:55 +0900)]
Remove PROCESS and PROCESS_GROUP attributes
Need the additional capability in order to monitor
PROCESS and PROCESS_GROUP data. It means that it is not proper
to allow the application user to monitor both PROCESS and PROCESS_GROUP.
So that remove PROCESS and PROCESS_GROUP attributes.
Change-Id: Ia26dad494c9aa5698622a43c6fb068b0d1c11150
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Fri, 1 Apr 2022 05:35:49 +0000 (14:35 +0900)]
Replace with libpass-resource-monitor
Change-Id: Icafa3124da356f54c229ff99ab961da22e20aba9
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Chanwoo Choi [Mon, 7 Mar 2022 07:38:09 +0000 (16:38 +0900)]
Add capi-system-resource-monitor
Add new capi-system-resource-monitor to support resource monitor
and add the skeleton code for capi-system-resource-monitor-tool.
[Package list]
- Following packages provides Tizen C API library and header file.
capi-system-resource-monitor-0.0.1-0.aarch64.rpm
capi-system-resource-monitor-devel-0.0.1-0.aarch64.rpm
capi-system-resource-monitor-debuginfo-0.0.1-0.aarch64.rpm
capi-system-resource-monitor-debugsource-0.0.1-0.aarch64.rpm
- Following packages provides the 'resouce-monitor-test' executable binary.
capi-system-resource-monitor-tool-0.0.1-0.aarch64.rpm
capi-system-resource-monitor-tool-debuginfo-0.0.1-0.aarch64.rpm
[File hierarchy]
usr/
├── bin
│ └── resource-monitor-test
├── include
│ └── system
│ └── resource-monitor.h
├── lib
│ └── debug
│ └── usr
│ ├── bin
│ │ └── resource-monitor-test.debug
│ └── lib64
│ └── libcapi-system-resource-monitor.so.0.0.1.debug
├── lib64
│ ├── libcapi-system-resource-monitor.so -> libcapi-system-resource-monitor.so.0
│ ├── libcapi-system-resource-monitor.so.0 -> libcapi-system-resource-monitor.so.0.0.1
│ ├── libcapi-system-resource-monitor.so.0.0.1
│ └── pkgconfig
│ └── capi-system-resource-monitor.pc
├── share
│ └── licenses
│ └── capi-system-resource-monitor
│ └── LICENSE
└── src
└── debug
└── capi-system-resource-monitor-0.0.1-0.aarch64
├── src
│ └── resouce-monitor.c
└── test
└── resource-monitor-test.c
Change-Id: I1442fe2b5aab47c1c7678fc2403e2b8be51a04ac
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Tizen Infrastructure [Mon, 21 Mar 2022 22:41:52 +0000 (22:41 +0000)]
Initial empty repository