SET(INCLUDE_COMMON_DIR ${CMAKE_SOURCE_DIR}/src/common)
SET(INCLUDE_CGROUP_DIR ${CMAKE_SOURCE_DIR}/src/common/cgroup)
SET(INCLUDE_PUBLIC_DIR ${CMAKE_SOURCE_DIR}/include)
+SET(CONF_DIR ${CMAKE_SOURCE_DIR}/conf)
SET(RESOURCED_INCLUDEDIR ${INCLUDE_COMMON_DIR} ${INCLUDE_CGROUP_DIR} ${INCLUDE_PUBLIC_DIR})
#misc
SET(PRIORITY_SOURCE_DIR ${PROCESS_SOURCE_DIR}/priority)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/resourced.conf DESTINATION /etc/dbus-1/system.d)
+INSTALL(FILES ${CONF_DIR}/org.tizen.resourced.conf DESTINATION /etc/dbus-1/system.d)
ADD_SUBDIRECTORY(src)
IF(DEFINED RD_TESTS_PATH)
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#ordering
# List of configuration files provided by this package - update when any new config file is added!
-%define config_files block cpu cpu-sched heart memory proc swap dedup
+%define config_files block cpu cpu-sched heart memory process swap dedup
for i in %{confdir}/*.conf; do
if [ "$i" = %{confdir}/"*.conf" ]; then
fi
%post config-tv
-%{_sbindir}/update-alternatives --install %{confdir}/memory.conf resourced-config-memory %{confdir}/configs/config-memory-tv.conf 150
+%{_sbindir}/update-alternatives --install %{confdir}/memory.conf resourced-config-memory %{confdir}/configs/config-memory-profile-tv.conf 150
%preun config-tv
if [ $1 -eq 0 ]; then
- %{_sbindir}/update-alternatives --remove resourced-config-memory %{confdir}/configs/config-memory-tv.conf
+ %{_sbindir}/update-alternatives --remove resourced-config-memory %{confdir}/configs/config-memory-profile-tv.conf
fi
%post config-iot-headless
-%{_sbindir}/update-alternatives --install %{confdir}/memory.conf resourced-config-memory %{confdir}/configs/config-memory-iot-headless.conf 150
+%{_sbindir}/update-alternatives --install %{confdir}/memory.conf resourced-config-memory %{confdir}/configs/config-memory-profile-iot-headless.conf 150
%preun config-iot-headless
if [ $1 -eq 0 ]; then
- %{_sbindir}/update-alternatives --remove resourced-config-memory %{confdir}/configs/config-memory-iot-headless.conf
+ %{_sbindir}/update-alternatives --remove resourced-config-memory %{confdir}/configs/config-memory-profile-iot-headless.conf
fi
%files
%attr(700, root, root) %{TZ_SYS_ETC}/dump.d/module.d/dump_heart_data.sh
%files config
-%config %{_sysconfdir}/dbus-1/system.d/resourced.conf
+%config %{_sysconfdir}/dbus-1/system.d/org.tizen.resourced.conf
%{_unitdir}/resourced.service
%{_unitdir}/multi-user.target.wants/resourced.service
%{confdir}/configs/config-memory.conf
-%{confdir}/configs/config-proc.conf
+%{confdir}/configs/config-process.conf
%{confdir}/configs/config-swap.conf
%{confdir}/configs/config-dedup.conf
%{confdir}/configs/config-block.conf
%files config-tv
%manifest resourced.manifest
-%{confdir}/configs/config-memory-tv.conf
+%{confdir}/configs/config-memory-profile-tv.conf
%files config-iot-headless
%manifest resourced.manifest
-%{confdir}/configs/config-memory-iot-headless.conf
+%{confdir}/configs/config-memory-profile-iot-headless.conf
%if %{?vip_agent_module} == ON
%files vip-release-agent
${BLOCK_SOURCE_DIR}/block-monitor.c)
TARGET_LINK_LIBRARIES(block resourced-private-api ${RESOURCED_REQUIRE_PKGS_LDFLAGS})
INSTALL(TARGETS block DESTINATION ${MAKE_INSTALL_PREFIX}${RD_PLUGIN_PATH})
-INSTALL(FILES ${BLOCK_SOURCE_DIR}/block.conf DESTINATION ${RD_CONFIG_PATH})
+INSTALL(FILES ${CONF_DIR}/block.conf DESTINATION ${RD_CONFIG_PATH})
ADD_DEFINITIONS("-DFREEZER_DIR=\"${LIB_INSTALL_DIR}\"")
ADD_LIBRARY(freezer MODULE ${FREEZER_SOURCE_DIR}/freezer.c)
${SWAP_SOURCE_DIR}/zramswap.c)
TARGET_LINK_LIBRARIES(swap resourced-private-api ${RESOURCED_REQUIRE_PKGS_LDFLAGS})
INSTALL(TARGETS swap DESTINATION ${MAKE_INSTALL_PREFIX}${RD_PLUGIN_PATH})
-INSTALL(FILES ${SWAP_SOURCE_DIR}/swap.conf DESTINATION ${RD_CONFIG_PATH})
+INSTALL(FILES ${CONF_DIR}/swap.conf DESTINATION ${RD_CONFIG_PATH})
ADD_LIBRARY(dedup MODULE
${DEDUP_SOURCE_DIR}/dedup.c)
TARGET_LINK_LIBRARIES(dedup resourced-private-api ${RESOURCED_REQUIRE_PKGS_LDFLAGS})
INSTALL(TARGETS dedup DESTINATION ${MAKE_INSTALL_PREFIX}${RD_PLUGIN_PATH})
-INSTALL(FILES ${DEDUP_SOURCE_DIR}/dedup.conf DESTINATION ${RD_CONFIG_PATH})
+INSTALL(FILES ${CONF_DIR}/dedup.conf DESTINATION ${RD_CONFIG_PATH})
ADD_LIBRARY(heart MODULE
${RESOURCE_MONITOR_SOURCE_DIR}/heart.c
${RESOURCE_MONITOR_SOURCE_DIR}/logging.c)
TARGET_LINK_LIBRARIES(heart resourced-private-api ${RESOURCED_REQUIRE_PKGS_LDFLAGS})
INSTALL(TARGETS heart DESTINATION ${MAKE_INSTALL_PREFIX}${RD_PLUGIN_PATH})
-INSTALL(FILES ${RESOURCE_MONITOR_SOURCE_DIR}/heart.conf DESTINATION ${RD_CONFIG_PATH})
+INSTALL(FILES ${CONF_DIR}/heart.conf DESTINATION ${RD_CONFIG_PATH})
CONFIGURE_FILE(${RESOURCE_MONITOR_SOURCE_DIR}/dump_heart_data.sh.in ${RESOURCE_MONITOR_SOURCE_DIR}/dump_heart_data.sh @ONLY)
INSTALL(FILES ${RESOURCE_MONITOR_SOURCE_DIR}/dump_heart_data.sh DESTINATION ${RD_SYS_ETC}/dump.d/module.d)
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE WORLD_EXECUTE)
IF("${MEMORY_MODULE}" STREQUAL "ON")
- INSTALL(FILES ${MEMORY_LIMITER_SOURCE_DIR}/memory.conf DESTINATION ${RD_CONFIG_PATH})
- INSTALL(FILES ${MEMORY_LIMITER_SOURCE_DIR}/memory-tv.conf DESTINATION ${RD_CONFIG_PATH})
- INSTALL(FILES ${MEMORY_LIMITER_SOURCE_DIR}/memory-iot-headless.conf DESTINATION ${RD_CONFIG_PATH})
+ INSTALL(FILES ${CONF_DIR}/memory.conf DESTINATION ${RD_CONFIG_PATH})
+ INSTALL(FILES ${CONF_DIR}/memory-profile-tv.conf DESTINATION ${RD_CONFIG_PATH})
+ INSTALL(FILES ${CONF_DIR}/memory-profile-iot-headless.conf DESTINATION ${RD_CONFIG_PATH})
ENDIF()
IF("${CPU_MODULE}" STREQUAL "ON")
- INSTALL(FILES ${CPU_LIMITER_SOURCE_DIR}/cpu.conf
+ INSTALL(FILES ${CONF_DIR}/cpu.conf
DESTINATION ${RD_CONFIG_PATH} RENAME cpu.conf)
- INSTALL(FILES ${CPU_LIMITER_SOURCE_DIR}/cpu-sched.conf
+ INSTALL(FILES ${CONF_DIR}/cpu-sched.conf
DESTINATION ${RD_CONFIG_PATH} RENAME cpu-sched.conf)
ENDIF()
INSTALL(TARGETS vip-release-agent DESTINATION bin)
ENDIF()
-INSTALL(FILES ${PROCESS_SOURCE_DIR}/proc.conf
- DESTINATION ${RD_CONFIG_PATH} RENAME proc.conf)
+INSTALL(FILES ${CONF_DIR}/process.conf
+ DESTINATION ${RD_CONFIG_PATH} RENAME process.conf)
#include "resourced.h"
#include "trace.h"
-#define PRIORITY_CONF_FILE RD_CONFIG_FILE(proc)
+#define PRIORITY_CONF_FILE RD_CONFIG_FILE(process)
#define FIXED_OOM_CONF_SECTION "OOM_FIXED_APPS"
#include "heart-common.h"
#define UPDATE_INTERVAL DAY_TO_SEC(2)
-#define APPUSAGE_CONF_FILE RD_CONFIG_FILE(proc)
+#define APPUSAGE_CONF_FILE RD_CONFIG_FILE(process)
#define APPUSAGE_CONF_SECTION "APPUSAGE"
static int favorite_count;
#endif
#endif
-#define WATCHDOG_EXCLUDE_CONF_FILE RD_CONFIG_FILE(proc)
+#define WATCHDOG_EXCLUDE_CONF_FILE RD_CONFIG_FILE(process)
#define WATCHDOG_EXCLUDE_CONF_SECTION "WATCHDOG_EXCLUDED_PROCESSES"
static GHashTable *watchdog_exclude_list;
enum cpu_control_type {
SET_NONE,
- SET_DEFAUT,
+ SET_DEFAULT,
SET_BOOTING,
SET_WRT,
SET_LAZY,
if (pid > 0) {
cpu_move_cgroup(pid, CPUCG_MEDIUM_GROUP_PATH);
def_list.control[def_list.num].pid = pid;
- def_list.control[def_list.num++].type = SET_DEFAUT;
+ def_list.control[def_list.num++].type = SET_DEFAULT;
} else {
_E("not found appname = %s", result->value);
}
pri = getpriority(PRIO_PROCESS, ps->pid);
if (pri == -1 || pri > CPU_DEFAULT_PRI)
setpriority(PRIO_PGRP, ps->pid, CPU_DEFAULT_PRI);
- if (check_predefined(ps->pid) != SET_DEFAUT)
+ if (check_predefined(ps->pid) != SET_DEFAULT)
cpu_move_cgroup_foreach(ps->pid, ps->pai, CPUCG_HIGH_GROUP_PATH);
return RESOURCED_ERROR_NONE;
}
static int cpu_exclude_state(void *data)
{
struct proc_exclude *pe = (struct proc_exclude *)data;
- if (check_predefined(pe->pid) == SET_DEFAUT)
+ if (check_predefined(pe->pid) == SET_DEFAULT)
return RESOURCED_ERROR_NONE;
if (pe->type == PROC_INCLUDE)
cpu_move_cgroup(pe->pid, CPUCG_MEDIUM_GROUP_PATH);