platform/core/api/resource-monitor.git
21 months agoresource-monitor: Add system-resource-monitor tool 25/279425/4 accepted/tizen/unified/20220817.153748 submit/tizen/20220812.041529 submit/tizen/20220813.034544 submit/tizen/20220817.021541
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>
21 months agoresource-monitor: Change prototype of resource_monitor_get_resource_count 23/279423/3
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>
21 months agoresource-monitor: Add new disk resource attributes and missing attributes 24/279424/3
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>
21 months agoresource-monitor: Change prototype resource_monitor_get_value_string 12/279412/3
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>
2 years agoRemove PROCESS and PROCESS_GROUP attributes 19/273719/1 accepted/tizen/unified/20220418.141238 submit/tizen/20220415.061937
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>
2 years agoReplace with libpass-resource-monitor 45/273245/1 accepted/tizen/unified/20220405.003749 submit/tizen/20220404.020528
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>
2 years agoAdd capi-system-resource-monitor 21/273021/5 accepted/tizen/unified/20220401.033603 submit/tizen/20220401.015456 submit/tizen/20220401.020712
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>
2 years agoInitial empty repository master
Tizen Infrastructure [Mon, 21 Mar 2022 22:41:52 +0000 (22:41 +0000)]
Initial empty repository