resource: Add disk and network resource driver 92/278692/4 submit/tizen/20220805.011932
authorChanwoo Choi <cw00.choi@samsung.com>
Mon, 25 Jul 2022 03:44:02 +0000 (12:44 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Tue, 2 Aug 2022 02:32:49 +0000 (11:32 +0900)
commitb3308132cbfbc2de1b74c07842bbba18a12c0063
treec394984993040960a52abb58776da7735df77e6a
parentfbf292ad884a71023554bef0d4858dbad0208d24
resource: Add disk and network resource driver

Add disk and network resource driver to provide monitoring data.

1. Add disk resource driver to provide the disk bandwidth
   and usage with following resource attributes:
- DISK_ATTR_NAME indicates the disk device name
- DISK_ATTR_READ_PER_SEC indicates read bandwidth of specific block like zram0
- DISK_ATTR_WRITE_PER_SEC indicates write bandwidth of specific block like mmcblk0
- DISK_ATTR_READ_TOTAL indicates read kB size of specific block
- DISK_ATTR_WRITE_TOTAL indicates write kB size of specific block

The detailed description[1] of data are from /proc/diskstats and
/sys/class/block/[block name]/stats:
[1] https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats

2. Add skeleton of network resource driver with resource name attribute.
- NETWORK_ATTR_NAME indicates the network device name

Change-Id: Ib440ab628ad1edc5a24378b9c18b80b7c9a8367e
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
CMakeLists.txt
lib/resource-monitor/resource-monitor.h
src/resource/resource-disk.c [new file with mode: 0644]
src/resource/resource-network.c [new file with mode: 0644]