platform/core/system/resourced.git
7 years agoheart : fix memory leak. 04/87404/3
Kichan Kwon [Thu, 8 Sep 2016 01:26:38 +0000 (10:26 +0900)]
heart : fix memory leak.

Change-Id: Idaf09623ef8d50a3bc041eadc3a4a58f1dcdc78a
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agocommon : remove related to config_parse_new 89/85989/1 accepted/tizen/common/20160905.171542 accepted/tizen/ivi/20160906.000201 accepted/tizen/mobile/20160906.000104 accepted/tizen/tv/20160906.000117 accepted/tizen/wearable/20160906.000143 submit/tizen/20160905.074328
Kichan Kwon [Tue, 30 Aug 2016 02:14:08 +0000 (11:14 +0900)]
common : remove related to config_parse_new

- It can be replaced with config_parse and util functions

Change-Id: I1a77c006dfedd2dbd0d25ca6b42f1ed79b410cff
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoproc-stat : thaw process before setting state 25/85625/5
Kichan Kwon [Fri, 26 Aug 2016 07:19:51 +0000 (16:19 +0900)]
proc-stat : thaw process before setting state

- Until now, all processes are thawed after setting state to foreground
- However, System-freezer doesn't thaw foreground service bound with UI app

Change-Id: I502e80e7a197875c0b82882fb4478158f75773ef
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoproc-stat : do whole background process though app is directly come from initial... 22/85622/4
Kichan Kwon [Fri, 26 Aug 2016 06:40:10 +0000 (15:40 +0900)]
proc-stat : do whole background process though app is directly come from initial state

- Until now, to apply whole background processes, app should be come from foreground
- However, from Tizen 3.0, app can be launched at the background without going to foreground

Change-Id: I0096779f75e200b97aaaddf0d5ff4ad26e62aa8b
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoRemove dependency on wm_ready 84/84684/5
Kichan Kwon [Mon, 22 Aug 2016 04:42:46 +0000 (13:42 +0900)]
Remove dependency on wm_ready

- Resourced doesn't need this dependency any more

Change-Id: I51408234053080ee2635b3d4d53816b5891773d4
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agocommon : use strncmp to compare string 10/83610/7
Kichan Kwon [Fri, 12 Aug 2016 04:13:02 +0000 (13:13 +0900)]
common : use strncmp to compare string

- strstr can return false positive if first string is the prefix of second string

Change-Id: I3e2c733e5319c95ecac9235fad7478d212d87b5c
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoRemove needless things 12/83512/6
Kichan Kwon [Thu, 11 Aug 2016 09:27:51 +0000 (18:27 +0900)]
Remove needless things

- Unused definitions
- Documents about libresourced
- Headers about libproc-stat

Change-Id: Ica5a8654bab3795b3d9cbb97475c86a791505ec4
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoheart : multi-user logging : use old user list when updating user list is failed 88/85788/4 accepted/tizen/common/20160901.143352 accepted/tizen/ivi/20160901.072751 accepted/tizen/mobile/20160901.072702 accepted/tizen/tv/20160901.072719 accepted/tizen/wearable/20160901.072733 submit/tizen/20160901.005311
Kichan Kwon [Mon, 29 Aug 2016 05:58:22 +0000 (14:58 +0900)]
heart : multi-user logging : use old user list when updating user list is failed

- gumd can return fail if other package locks user list
- If resourced doesn't have existing user list, return fail

Change-Id: I0cf7529e531da716bfd2eee9cf8786d74797f430
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoheart : multi-user logging : implement per-user dat file of HEART-CPU 65/84065/10
Kichan Kwon [Tue, 16 Aug 2016 07:55:35 +0000 (16:55 +0900)]
heart : multi-user logging : implement per-user dat file of HEART-CPU

- Similar to DB, dat cache is composed of hash table (key=uid, value=cache)
- To distinguish destination, some HEART-CPU dbus methods ask uid

Change-Id: I9f703cf054436cf4272d5c2bac5fb95f0803e9fd
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoheart : multi-user logging : attach free function 14/83514/7
Kichan Kwon [Thu, 11 Aug 2016 09:57:06 +0000 (18:57 +0900)]
heart : multi-user logging : attach free function

Change-Id: I60b61b9087798ae067ae9cd3cc5141b2719bbf96
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoheart : multi-user logging : modify sub-modules and key of db_list 11/83511/4
Kichan Kwon [Thu, 11 Aug 2016 02:42:35 +0000 (11:42 +0900)]
heart : multi-user logging : modify sub-modules and key of db_list

Appopt  : disable (not used in now, this sub-module will be modified to unify with other modules)
Memory  : use user default DB (memory usage can be changed by user's app usage)
Storage : set WAL journal mode (for backward compatibility)

Key : SYSTEM_X DB uses key (0; uid of root)

Change-Id: Ic02e04a04b4b2c2b6f8cf34c337d3c0fbcb6bf55
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoCreate script for upgrade (Tizen 2.4 -> 3.0) 04/83304/5
Kichan Kwon [Tue, 9 Aug 2016 13:33:05 +0000 (22:33 +0900)]
Create script for upgrade (Tizen 2.4 -> 3.0)

- Move HEART DB and dat files

Change-Id: I59eb63c0772178633ca00bbf46b2354c0ddcc556
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoheart : multi-user logging : implement per-user DB 25/82725/7
Kichan Kwon [Fri, 5 Aug 2016 07:44:51 +0000 (16:44 +0900)]
heart : multi-user logging : implement per-user DB

- USER_DEFAULT and USER_OWN are similar as SYSTEM_X
- Difference is that only DB owner's logs are written in the user DB

- To manage all user's DB, each sub-module has DB hash table (key=uid, value=DB)

Change-Id: I6737f02f0c48c1fe2718144262e464a7c666967f
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoheart : multi-user logging : add uid in the logging table 08/82708/11
Kichan Kwon [Wed, 3 Aug 2016 07:47:13 +0000 (16:47 +0900)]
heart : multi-user logging : add uid in the logging table

- To write log in the cache,
1) Each sub-module send pid
2) Before writing to cache, pid is converted to uid
3) uid will be used to find destination (don't stored in the DB)

Change-Id: I71f52cc1908b43f24c45d7f774f58bf0210b5e02
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoheart : multi-user logging : classify sub-modules with DB type. 25/81125/9
Kichan Kwon [Fri, 22 Jul 2016 07:12:49 +0000 (16:12 +0900)]
heart : multi-user logging : classify sub-modules with DB type.

- SYSTEM_DEFAULT : use default SQLite3 DB
- SYSTEM_OWN : use their own DB
- USER_DEFAULT and USER_OWN will be implemented

Change-Id: I172b677bf01ebb9a8bf88c3c673f1b2638e03d95
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoproc-stat : use freezer function only if freezer module is loaded 09/83109/1 accepted/tizen/common/20160811.150021 accepted/tizen/ivi/20160811.085403 accepted/tizen/mobile/20160811.085315 accepted/tizen/tv/20160811.085328 accepted/tizen/wearable/20160811.085344 submit/tizen/20160811.024345
Kichan Kwon [Tue, 9 Aug 2016 07:51:45 +0000 (16:51 +0900)]
proc-stat : use freezer function only if freezer module is loaded

Change-Id: I6fc420d8ba6e8c1518d59851ef1ff4eb5c3137b3
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoproc-stat : remove libproc-stat 86/83086/1
Kichan Kwon [Tue, 9 Aug 2016 06:30:59 +0000 (15:30 +0900)]
proc-stat : remove libproc-stat

- libproc-stat.so(socket communication) is alternated with dbus communication
- In addition, libresourced rpm package is removed because of absence of library in this package

Change-Id: I729a5edc0c4e2d188e0b62608f21997bd7930916
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agofreezer : remove library and configuration files 12/82812/2
Kichan Kwon [Mon, 8 Aug 2016 01:15:58 +0000 (10:15 +0900)]
freezer : remove library and configuration files

- To use freezer module, you should install system-freezer plugin

Change-Id: I716e81a324a6d64083126ce67c031c229854ba99
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoproc-stat : apply LRU state at the favorite apps. 59/82559/1
Kichan Kwon [Mon, 13 Jun 2016 11:23:29 +0000 (20:23 +0900)]
proc-stat : apply LRU state at the favorite apps.

- Favorite apps have their own LRU state

Change-Id: I398d9ec0d100a6788eff5edd94fe8c8ab75f0608
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoSet existent user and group name 91/81691/3
Kichan Kwon [Thu, 28 Jul 2016 01:55:00 +0000 (10:55 +0900)]
Set existent user and group name

- User and group name "app" no longer exist

Change-Id: I44d31dd115544f1f4bf2fe77d36454ce239d41c3
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agocommon : remove proc_status.appid. 62/81262/7
Kichan Kwon [Mon, 25 Jul 2016 06:51:07 +0000 (15:51 +0900)]
common : remove proc_status.appid.

- This variable is overlapped with proc_status.pai->appid

Change-Id: Icd36586ab27891eb3692807b1e943b251d7e0e6d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoRemove unused code 48/80948/1
Kichan Kwon [Thu, 21 Jul 2016 04:52:22 +0000 (13:52 +0900)]
Remove unused code

Change-Id: Ie8da88ab74a52c6b47cd7aecb56f0756083829dc
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoSet SmackProcessLabel to System::Privileged 51/80851/1 accepted/tizen/common/20160721.175531 accepted/tizen/ivi/20160721.090707 accepted/tizen/mobile/20160721.090333 accepted/tizen/tv/20160721.091225 accepted/tizen/wearable/20160721.090846 submit/tizen/20160721.003054
Yunjin Lee [Wed, 20 Jul 2016 11:26:55 +0000 (20:26 +0900)]
Set SmackProcessLabel to System::Privileged

Change-Id: I802fe9becb1aad996f742efc86d2e6e2e84f2696
Signed-off-by: Yunjin Lee <yunjin-.lee@samsung.com>
7 years agomemory : remove memps_log 60/80760/1 accepted/tizen/common/20160720.173312 accepted/tizen/ivi/20160720.055903 accepted/tizen/mobile/20160720.055749 accepted/tizen/tv/20160720.055810 accepted/tizen/wearable/20160720.055840 submit/tizen/20160720.051200
Kichan Kwon [Wed, 20 Jul 2016 04:55:49 +0000 (13:55 +0900)]
memory : remove memps_log

- It isn't utilized in the platform image

Change-Id: I2f67d624e5f53a6f7c5d987b7ff5b3a8680ca234
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoApply Tizen coding rule 50/79850/1 accepted/tizen/common/20160714.152847 accepted/tizen/ivi/20160714.054105 accepted/tizen/mobile/20160714.054059 accepted/tizen/tv/20160714.054052 accepted/tizen/wearable/20160714.054102 submit/tizen/20160714.021423
Kichan Kwon [Wed, 13 Jul 2016 08:06:57 +0000 (17:06 +0900)]
Apply Tizen coding rule

Change-Id: I5988977501cce67899c0e0044886865d1bd8bfe9
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agosluggish : remove sluggish module 93/79793/1
Kichan Kwon [Wed, 13 Jul 2016 04:10:54 +0000 (13:10 +0900)]
sluggish : remove sluggish module

- In current, nobody call sluggish method
- Its role is overlapped with crash-worker

Change-Id: I432739fae74c981287e4880f3ca047199a45f0ea
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocommon : close directory stream after using 07/79107/1
Kichan Kwon [Fri, 8 Jul 2016 07:49:11 +0000 (16:49 +0900)]
common : close directory stream after using

Change-Id: I653c883a244ba2256e5e876a2477a97d8eb969ef
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agomemory : use HEART-MEMORY data only if HEART-MEMORY module is enabled 79/79079/1
Kichan Kwon [Fri, 8 Jul 2016 06:17:30 +0000 (15:17 +0900)]
memory : use HEART-MEMORY data only if HEART-MEMORY module is enabled

Change-Id: Ifde1a811b4b133a88e31a22974c84aa22bd93dd7
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoChange some pathes 78/79078/1
Kichan Kwon [Fri, 8 Jul 2016 06:13:13 +0000 (15:13 +0900)]
Change some pathes

- HEART log files can be regarded to user data
- Therefore, these files may be located at user data area

Change-Id: I90c5896f5be53d67db719052d84681291715e16a
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agofreezer : start vital mode only if suspend mode is enabled 47/78547/1 accepted/tizen/common/20160706.142155 accepted/tizen/ivi/20160706.082505 accepted/tizen/mobile/20160706.082324 accepted/tizen/tv/20160706.082334 accepted/tizen/wearable/20160706.082346 submit/tizen/20160706.021530
Kichan Kwon [Wed, 6 Jul 2016 05:07:24 +0000 (14:07 +0900)]
freezer : start vital mode only if suspend mode is enabled

Change-Id: I34a3c2a8e993cbb446b126a0c0056a0389dd3acd
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agotimer-slack : set declaration with definition 27/78527/1
Kichan Kwon [Wed, 6 Jul 2016 03:11:03 +0000 (12:11 +0900)]
timer-slack : set declaration with definition

Change-Id: I2997cb478734f8910f408a40b5e7c695eff4059b
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoRemove traces about network module 26/78526/1
Kichan Kwon [Wed, 6 Jul 2016 03:08:04 +0000 (12:08 +0900)]
Remove traces about network module

- test, DB, IPC, ...

Change-Id: I7e013120565791f3f887871425d2f78b4e86c7c6
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocpu : tidy up configuration 11/74111/5
Kichan Kwon [Mon, 13 Jun 2016 01:48:43 +0000 (10:48 +0900)]
cpu : tidy up configuration

- Remove unused config keys
- X_CPU_SHARE : absolute -> relative cpu share of root
- QUOTA_MAX_BANDWIDTH : max relative cpu time

Change-Id: I9221eed483b1a55c6e703793071b6e241c309d74
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocommon : fix memory leak when Runtime-info requests information 55/78055/2
Kichan Kwon [Mon, 4 Jul 2016 06:30:57 +0000 (15:30 +0900)]
common : fix memory leak when Runtime-info requests information

- e_dbus_message_send internally use dbus_connection_send_with_reply
- However, edbus_message_send is used for replying, so resourced can't receive anything
- Therefore, we should use dbus_connection_send to reply
- In addition, edbus_init is modified to use dbus_conn

Change-Id: I5f00463ab3c434ff442889d60bb947baca86c206
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocommon : fix abnormal retry counter 30/78130/1
Kichan Kwon [Mon, 4 Jul 2016 10:07:05 +0000 (19:07 +0900)]
common : fix abnormal retry counter

Change-Id: I34c923452834943112065ad483577397c9f45328
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoRemove network module 62/77962/3
Kunhoon Baik [Sat, 2 Jul 2016 06:02:16 +0000 (15:02 +0900)]
Remove network module

- This feature may be turned on Tizen 4.0

Change-Id: I3c75e01bc622ac9d7a13ea992a8721b45d730056
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoheart : suppose discharging when wrong current battery status is written 19/74319/3
Kichan Kwon [Tue, 14 Jun 2016 01:13:38 +0000 (10:13 +0900)]
heart : suppose discharging when wrong current battery status is written

Change-Id: If6a319d8d457623ede701e0ec26b3163a825f2d4
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocpu : modify CPU sub-cgroup 79/71779/3
Kichan Kwon [Fri, 27 May 2016 05:43:50 +0000 (14:43 +0900)]
cpu : modify CPU sub-cgroup

- To control CPU share with our intention

- /background/quota -> /quota
- /background/download -> deleted

Change-Id: I13cfe7f1de3e8477d97f02d018bc927108fcfe74
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoTidy up spec file 04/71304/1
Kichan Kwon [Wed, 25 May 2016 04:21:49 +0000 (13:21 +0900)]
Tidy up spec file

Change-Id: If0d89ecfad33025087ec58879f300a6c889bd5ca
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years ago...: Apply Tizen coding rule 79/70079/2
sunm.lee [Wed, 18 May 2016 04:30:06 +0000 (13:30 +0900)]
...: Apply Tizen coding rule

Apply Tizen coding rule to:
 block, cpu, heart, mem-stress, memory, network,
 proc-stat, resourced, sluggish, swap, timer-slack,
 vip-agent

Change-Id: I58945a9b433744824b576d0cab2a4027867bf6da
Signed-off-by: sunm.lee <sunm.lee@samsung.com>
8 years agocommon, tests, resourced-dbus, utils: Apply Tizen coding rule 25/69825/1 accepted/tizen/common/20160517.174121 accepted/tizen/ivi/20160517.083414 accepted/tizen/mobile/20160517.083442 accepted/tizen/tv/20160517.083330 accepted/tizen/wearable/20160517.083400 submit/tizen/20160517.042048
sunm.lee [Tue, 17 May 2016 03:03:13 +0000 (12:03 +0900)]
common, tests, resourced-dbus, utils: Apply Tizen coding rule

Apply Tizen coding rule to:
 common, tests, resourced-dbus, utils

Change-Id: I8f1554a58b1dc03e459933cd9f6633a3bf8c5e56
Signed-off-by: sunm.lee <sunm.lee@samsung.com>
8 years agoInclude more functions into the memps logging definition 59/69059/1
Kichan Kwon [Wed, 11 May 2016 08:53:25 +0000 (17:53 +0900)]
Include more functions into the memps logging definition

Change-Id: I7049733da2dee2b7eda52c0fac06c80eb7070850
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoDefine memps logging function only when it is used 72/68972/1 accepted/tizen/common/20160511.142037 accepted/tizen/ivi/20160512.050744 accepted/tizen/mobile/20160512.050733 accepted/tizen/tv/20160512.050641 accepted/tizen/wearable/20160512.050714 submit/tizen/20160511.010637
Kichan Kwon [Wed, 11 May 2016 00:51:14 +0000 (09:51 +0900)]
Define memps logging function only when it is used

Change-Id: I69e42652042698fe4c5db5f13f5b0fb5b5b5d696
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agofreezer : change freezer mode 41/68841/2 submit/tizen/20160510.074147
Kichan Kwon [Tue, 10 May 2016 05:47:59 +0000 (14:47 +0900)]
freezer : change freezer mode

Change-Id: Ide7e0f37cc189317709a1d43dac161a586213f6d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoMake switch to on/off memps logging 21/68421/4
Kichan Kwon [Wed, 4 May 2016 06:34:47 +0000 (15:34 +0900)]
Make switch to on/off memps logging

- Default state : on(mobile, wearable), off(tv)

Change-Id: I6267de0b8805a1318916ef449fcf8e40c0de9af5
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocommon : check null parameter 87/68387/4
Kichan Kwon [Wed, 4 May 2016 01:41:44 +0000 (10:41 +0900)]
common : check null parameter

Change-Id: Ibfb0a5827d536ca56cc494d34f3234544cfc51c8
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agofreezer : update freezer library 03/68103/2
Kichan Kwon [Mon, 2 May 2016 08:27:18 +0000 (17:27 +0900)]
freezer : update freezer library

Change-Id: I36b33b6a12829aee356b75a8d9bada6643bfe8b5
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agofreezer : move aduitd to the VITAL_WAKEUP group 01/68101/2
Kichan Kwon [Mon, 2 May 2016 08:20:23 +0000 (17:20 +0900)]
freezer : move aduitd to the VITAL_WAKEUP group

- auditd receives socket messages from kernel
- If auditd is frozen until VITAL_DISPLAY_WAKEUP event,
 not only auditd can't process but also kernel can't go to the suspend state.
- Therefore, auditd should be included in the VITAL_WAKEUP group.

Change-Id: If0723e703bc72cad17195f2f9208188bd03b492b
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoEnable freezer module 88/67788/2 accepted/tizen/common/20160429.170615 accepted/tizen/ivi/20160429.074453 accepted/tizen/mobile/20160429.074359 accepted/tizen/tv/20160429.074420 accepted/tizen/wearable/20160429.074437 submit/tizen/20160429.062253
Kichan Kwon [Thu, 28 Apr 2016 08:31:36 +0000 (17:31 +0900)]
Enable freezer module

Change-Id: Iccb19c8edcd513dbe175f0f20238cc33f63451e8
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoDefine resourced config path 39/66939/2
Kichan Kwon [Fri, 22 Apr 2016 06:12:34 +0000 (15:12 +0900)]
Define resourced config path

Change-Id: Ibd33c1952b6a3571b7de302de0704bcf5565d6b3
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agovip : remove some VIP processes 12/66912/2
Kichan Kwon [Fri, 22 Apr 2016 03:19:39 +0000 (12:19 +0900)]
vip : remove some VIP processes

- Xorg : no longer used
- amd : to support multi-user

Change-Id: I2eaffddee7b0f44365af0dd5e6258740219a8235
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agovip : register only system slice services 07/66907/2
Kichan Kwon [Fri, 22 Apr 2016 03:15:09 +0000 (12:15 +0900)]
vip : register only system slice services

Change-Id: I91bed94d427cd0a37cd0ff42c9554afc7af31b41
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocpu : use correct name 45/66645/1
Kichan Kwon [Wed, 20 Apr 2016 06:00:15 +0000 (15:00 +0900)]
cpu : use correct name

Change-Id: I182f65811e3fe8f83218c305cd65136f483dfe72
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoRemove useless definitions 27/66627/1
Kichan Kwon [Wed, 20 Apr 2016 03:14:31 +0000 (12:14 +0900)]
Remove useless definitions

Change-Id: I7f8077268b2880328e33156d5f71f9dfe40c4007
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoChange path of exclude list file 84/66284/2 accepted/tizen/common/20160418.142022 accepted/tizen/ivi/20160418.124535 accepted/tizen/mobile/20160418.124253 accepted/tizen/tv/20160418.124303 accepted/tizen/wearable/20160418.124459 submit/tizen/20160418.095021
Kichan Kwon [Mon, 18 Apr 2016 07:31:50 +0000 (16:31 +0900)]
Change path of exclude list file

- /usr/etc -> TZ_SYS_ETC(/opt/etc)

Change-Id: I8850e0b87f08ad66bd33e98227d10a593503bb99
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoblock : prevent overlapped mount 41/65941/3
Kichan Kwon [Thu, 14 Apr 2016 06:38:23 +0000 (15:38 +0900)]
block : prevent overlapped mount

- When resourced checks overlapped mount, it compares path with mtab
- In the mtab, /home/~(link path) is written to /opt/home/~(original path)
- To match path and mounted directory, we use not link path but original path

Change-Id: I2c86b73c2e286b3b426752f408d77c5194b0eb27
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoblock : no longer use configend option at the conf file 13/66113/2
Kichan Kwon [Fri, 15 Apr 2016 08:27:23 +0000 (17:27 +0900)]
block : no longer use configend option at the conf file

- configend is just used to inform the end of conf file

Change-Id: Ibd1bb085af9cd94d3d1601f69ed51fb8be8ede82
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoblock : fix errata 12/65912/1
Kichan Kwon [Thu, 14 Apr 2016 02:55:11 +0000 (11:55 +0900)]
block : fix errata

Change-Id: I62b80369fbcdd7bcf6f07252189391e4a87896a5
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocommon : fix log priority 11/65911/1
Kichan Kwon [Thu, 14 Apr 2016 02:50:07 +0000 (11:50 +0900)]
common : fix log priority

Change-Id: I28366f45df28f20b80b128f683087048484d014f
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoproc-stat : change log priority 95/65895/1
Kichan Kwon [Thu, 14 Apr 2016 01:28:28 +0000 (10:28 +0900)]
proc-stat : change log priority

- If resourced can't find pkgname in the program list, add new one
- Therefore, we don't have to worry about that if making new list is successful

Change-Id: I2360186e07fd408ae0cfbd4b12ebc465cc8b7353
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoFind internal storage root path of all user 15/64115/5 accepted/tizen/common/20160412.131302 accepted/tizen/ivi/20160413.123437 accepted/tizen/mobile/20160413.123151 accepted/tizen/tv/20160413.123351 accepted/tizen/wearable/20160413.123413 submit/tizen/20160412.072933
Kichan Kwon [Wed, 30 Mar 2016 06:24:21 +0000 (15:24 +0900)]
Find internal storage root path of all user

- To adapt multi-user environment
- With modifying this, some methods are also modified.
  - Getting size : accumulate whole root path's
  - Monitoring path : add all user's root path

Change-Id: I79081be2f9de8217ae6f76f2ef689cf830580134
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocommon : use make_cgroup_subdir with consistent rule 92/65492/3
Kichan Kwon [Mon, 11 Apr 2016 09:15:58 +0000 (18:15 +0900)]
common : use make_cgroup_subdir with consistent rule

- parentdir : path of parent
- cgroup_name : cgroup name what you want to make

Change-Id: Idad60c03428974eeabcbfaae9753fad70341d40b
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocommon : remount cgroup directory 21/64421/7
Kichan Kwon [Fri, 1 Apr 2016 05:42:47 +0000 (14:42 +0900)]
common : remount cgroup directory

- systemd mounts cgroup directory to Read-Only

- Therefore, we need to remount to Read-Write before making new cgroup
 and turn back after then

Change-Id: I085dc7f2c7110133e311ebdac43e2c247b5f0950
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoFix errata 78/64078/1
Kichan Kwon [Wed, 30 Mar 2016 02:08:03 +0000 (11:08 +0900)]
Fix errata

Change-Id: I709a7500b3979fad0dffa9e9d061788cdcf3ce6a
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoSet max reading length 56/63856/1 accepted/tizen/common/20160329.050940 accepted/tizen/ivi/20160328.115840 accepted/tizen/mobile/20160328.115721 accepted/tizen/tv/20160328.115750 accepted/tizen/wearable/20160328.115843 submit/tizen/20160328.100804 submit/tizen/20160328.101155
Kichan Kwon [Mon, 28 Mar 2016 06:21:06 +0000 (15:21 +0900)]
Set max reading length

Change-Id: Ic23e693c62bcd81f2a8619986f52111c97c97b41
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoUse unsigned long long to read size of anonymous memory 38/63738/1 submit/tizen/20160325.112940
Kichan Kwon [Fri, 25 Mar 2016 11:14:57 +0000 (20:14 +0900)]
Use unsigned long long to read size of anonymous memory

- The size of anon memory is written with bytes

- To prevent overflow, use larger variable

Change-Id: Icdeeb08595b2e267960d09112536a5003e722860
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoSet max reading length 38/63538/2 accepted/tizen/common/20160324.173209 accepted/tizen/ivi/20160324.131755 accepted/tizen/mobile/20160324.133122 accepted/tizen/tv/20160324.133120 accepted/tizen/wearable/20160324.132901 submit/tizen/20160324.114937
Kichan Kwon [Thu, 24 Mar 2016 11:25:10 +0000 (20:25 +0900)]
Set max reading length

- The length of buf = PATH_MAX (linux/limits.h)

Change-Id: Ic58b774a8a215f144aa34e0bbc5d4c70852e46d8
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoMerge "Disable freezer and swap of mobile probile for consitency with wearable profil...
Kwon [Thu, 24 Mar 2016 11:20:43 +0000 (04:20 -0700)]
Merge "Disable freezer and swap of mobile probile for consitency with wearable profile" into tizen

8 years agoMake function to get the root path of (internal, external) storage 81/62781/6
Kichan Kwon [Fri, 18 Mar 2016 07:23:04 +0000 (16:23 +0900)]
Make function to get the root path of (internal, external) storage

- With making this, modify some functions to use new function.

Change-Id: Iadeabf9374f1fbd1d9430527c53524b30714cfb2
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoApply Tizen directory path guide 04/61504/3
Kichan Kwon [Tue, 8 Mar 2016 09:14:14 +0000 (18:14 +0900)]
Apply Tizen directory path guide

* Changed path

- /opt/usr/etc, /etc/opt -> TZ_SYS_ETC (/opt/etc)
- /opt/storage -> TZ_SYS_STORAGE (/opt/media)
- /opt/usr/data -> TZ_SYS_DATA (/opt/data)
- /opt/usr/dbspace -> TZ_SYS_DB (/opt/dbspace)
- /opt/usr/share -> TZ_SYS_SHARE (/opt/share)

Change-Id: Ibaa6ac20d768e5e6fe52b5f971713f1f77e57cb2
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoDisable freezer and swap of mobile probile for consitency with wearable profile 14/63414/1
Kunhoon Baik [Wed, 23 Mar 2016 16:05:37 +0000 (01:05 +0900)]
Disable freezer and swap of mobile probile for consitency with wearable profile

Change-Id: Ia738d93b5eb5b51b97c2e6734c9e5f837d6b7c45

8 years agoMerge "Disable mem-stress.service" into tizen accepted/tizen/common/20160304.195552 accepted/tizen/ivi/20160305.093824 accepted/tizen/mobile/20160305.093737 accepted/tizen/tv/20160305.093749 accepted/tizen/wearable/20160305.093808 submit/tizen/20160304.064902
Kichan Kwon [Fri, 4 Mar 2016 06:48:18 +0000 (22:48 -0800)]
Merge "Disable mem-stress.service" into tizen

8 years agoDetach memps module 32/61132/1
Kichan Kwon [Fri, 4 Mar 2016 06:37:04 +0000 (15:37 +0900)]
Detach memps module

- This module will be managed separately

Change-Id: I9dd88efa76d8927507ea3eeb8b1e06b86506d57f
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoDisable mem-stress.service 05/61005/2
Kichan Kwon [Thu, 3 Mar 2016 07:53:43 +0000 (16:53 +0900)]
Disable mem-stress.service

- It just occupies memory and does nothing

- But it can be used to make low memory environment, so we don't delete it

Change-Id: I5cd2f8ab8789c0ce525b108dd9cb97b15fb2879f
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoproc-stat : fix errata 22/60722/1 accepted/tizen/common/20160302.193633 accepted/tizen/ivi/20160302.072739 accepted/tizen/mobile/20160302.072650 accepted/tizen/tv/20160302.072701 accepted/tizen/wearable/20160302.072720 submit/tizen/20160302.051130
Kichan Kwon [Wed, 2 Mar 2016 02:27:53 +0000 (11:27 +0900)]
proc-stat : fix errata

Change-Id: I4bf737e527ed2dee040c8f9844bb5a66693048fd
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agovmpressure : don't make /proc app list 69/59969/3 accepted/tizen/ivi/20160222.081958 accepted/tizen/mobile/20160222.081812 accepted/tizen/tv/20160222.081848 accepted/tizen/wearable/20160222.081924 submit/tizen/20160222.063236
Kichan Kwon [Mon, 22 Feb 2016 02:15:44 +0000 (11:15 +0900)]
vmpressure : don't make /proc app list

 - As it reads (pid, appname), compare appname with vip list

Change-Id: I3a9f9377e0ee44ea55e525d4a167f749cdc453a6
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agotests : set initial value 58/59758/1 accepted/tizen/ivi/20160219.002314 accepted/tizen/mobile/20160219.002224 accepted/tizen/tv/20160219.002242 accepted/tizen/wearable/20160219.002257 submit/tizen/20160218.085406
Kichan Kwon [Thu, 18 Feb 2016 08:20:37 +0000 (17:20 +0900)]
tests : set initial value

Change-Id: I354ab3a65e27591466615eb0558db73a9084069c
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoMerge "vmpressure : improve VIP app register process" into tizen
Kichan Kwon [Wed, 17 Feb 2016 03:33:32 +0000 (19:33 -0800)]
Merge "vmpressure : improve VIP app register process" into tizen

8 years agovmpressure : improve VIP app register process 96/59196/7
Kichan Kwon [Thu, 11 Feb 2016 09:20:23 +0000 (18:20 +0900)]
vmpressure : improve VIP app register process

- To convert appname to pid, existing code opens cmdline file and match appname.
 However, this process is file operation, so it causes performance degradation.

- To decrease file operation, (appname,pid) array is maken before conversion.
 By using this array, we don't have to access cmdline file many times.

Change-Id: I2de243a5ef93615288907cdd6eb848f8b15e9be1
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoRevert "vmpressure : improve VIP app register process" 07/59607/1
Kichan Kwon [Wed, 17 Feb 2016 01:19:06 +0000 (10:19 +0900)]
Revert "vmpressure : improve VIP app register process"

This reverts commit bb60ed5b3cf0d9f77d8ee1c354607b6730235456.

Change-Id: I1cf6398c8a25a96fa4d69d20bb0e2ad3bfb65163

8 years agoblock : change log priority 25/59525/1 accepted/tizen/mobile/20160216.103526 accepted/tizen/tv/20160216.103544 accepted/tizen/wearable/20160216.103605 submit/tizen/20160216.085528
Kichan Kwon [Tue, 16 Feb 2016 08:38:05 +0000 (17:38 +0900)]
block : change log priority

- This log just informs accessing file and not returning error if this error is printed.

 Therefore, to prevent misunderstanding, change the priority to INFO

Change-Id: I51a10d93eee246144ba7081f2bf4d562bc6f5329
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agovmpressure : improve VIP app register process 96/59196/1
Kichan Kwon [Thu, 11 Feb 2016 09:20:23 +0000 (18:20 +0900)]
vmpressure : improve VIP app register process

- To convert appname to pid, existing code opens cmdline file and match appname.
 However, this process is file operation, so it causes performance degradation.

- To decrease file operation, (appname,pid) array is maken before conversion.
 By using this array, we don't have to access cmdline file many times.

Change-Id: I2de243a5ef93615288907cdd6eb848f8b15e9be1
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agonetwork: remove unused header 25/55925/1 accepted/tizen/ivi/20160218.023955 accepted/tizen/mobile/20151230.120249 accepted/tizen/tv/20151230.120322 accepted/tizen/wearable/20151230.120341 submit/tizen/20151230.082436 submit/tizen_ivi/20160217.000000 submit/tizen_ivi/20160217.000003
Prajwal A N [Wed, 30 Dec 2015 07:35:15 +0000 (16:35 +0900)]
network: remove unused header

* genl.h is not used currently
* it also violates the license requirement

Change-Id: I67472bd60b465905d65d2da517cf0f1e93c0101c
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agoMerge branch 'devel/tizen_2.4' into tizen 44/55544/1 accepted/tizen/mobile/20151229.072840 accepted/tizen/tv/20151229.072918 accepted/tizen/wearable/20151229.072940 submit/tizen/20151229.033448
Prajwal A N [Thu, 24 Dec 2015 10:25:00 +0000 (19:25 +0900)]
Merge branch 'devel/tizen_2.4' into tizen

* added CPU tests
* refactored test module
* removed secure coding issues

Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
Conflicts:
packaging/resourced.spec
src/tests/network/resourced_data_usage_test.c
src/tests/proc-stat/resourced_proc_stat_test.c

Change-Id: I1aebe8558f933a258aced35c3c040ab8befe0ba2

8 years agocommon: resolved secure coding errors devel/tizen_2.4
Prajwal A N [Wed, 23 Dec 2015 04:33:29 +0000 (13:33 +0900)]
common: resolved secure coding errors

Change-Id: I5cec16ef63b09027dc02b42a3bec27780004b327
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agotests: added tests for CPU module
Prajwal A N [Fri, 18 Dec 2015 05:56:02 +0000 (14:56 +0900)]
tests: added tests for CPU module

* tests cgroup creation
* tests different app actions

Change-Id: I1843cde8dff486ebc0127d12b320426cb669527b
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agotests: refactored code
Prajwal A N [Fri, 18 Dec 2015 05:51:10 +0000 (14:51 +0900)]
tests: refactored code

* organized code into usable modules

Change-Id: I898bb93a44eb3aa99d770b85773f824168a4e57e
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agodebug: enabled debug logging
Prajwal A N [Wed, 2 Dec 2015 07:35:20 +0000 (16:35 +0900)]
debug: enabled debug logging

* some logs are not needed normally
* added new flag to disable/enable these logs
* organized some log messages

Change-Id: I9e0ef1428ac6d6d2d2cf244be5eb1f01909f8c40
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agoMerge branch 'devel/tizen_2.4' into tizen 41/54341/2 accepted/tizen/mobile/20151216.052220 accepted/tizen/tv/20151216.052251 accepted/tizen/wearable/20151216.052323 submit/tizen/20151215.235502 submit/tizen_common/20151229.142028 submit/tizen_common/20151229.144031 submit/tizen_common/20151229.154718
Prajwal A N [Tue, 15 Dec 2015 01:47:38 +0000 (10:47 +0900)]
Merge branch 'devel/tizen_2.4' into tizen

* adding TC suite to resourced
* proc-stat, memory, network modules supported (partially)

Change-Id: Ie5fd2b998fb2e90d8d8036f80f77cf4b06a2e7d1
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agotests: disable tests by default
Prajwal A N [Mon, 14 Dec 2015 07:26:47 +0000 (16:26 +0900)]
tests: disable tests by default

* tests module is going to be disabled
* will be enabled locally for testing

Change-Id: Id375e4799cf4705a223cc82653fd08c9ac962b0d
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agotests: added test for network APIs
Prajwal A N [Sun, 13 Dec 2015 23:55:02 +0000 (08:55 +0900)]
tests: added test for network APIs

* testing all network APIs (provided by libresourced)

Change-Id: Ide7fe6cb1c9f91050779efc051208b579a4c980c
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agotests: added proc-stat API test
Prajwal A N [Sun, 13 Dec 2015 23:51:00 +0000 (08:51 +0900)]
tests: added proc-stat API test

* added tests for the proc_stat_get_pid_entry API
* other API tests will be added in future

Change-Id: Ic4bc35bfd8ae06d8c0a92af44f91d687beabda1f
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agotests: added tests package
Prajwal A N [Fri, 31 Jul 2015 11:42:57 +0000 (20:42 +0900)]
tests: added tests package

* added code to test lowmem module in resourced
* added util programs and scripts

Change-Id: Idb8914af71febb32e34082bfd224fc6213fe827e
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agotests: removed slp tests
Prajwal A N [Fri, 11 Dec 2015 04:18:04 +0000 (13:18 +0900)]
tests: removed slp tests

* not using current test suite
* will be replaced by a different test suite

Change-Id: I2160102d3f2ee65c7d64618d9a47dd8d06400581
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agocommon: change service type to simple
Prajwal A N [Tue, 8 Dec 2015 03:09:14 +0000 (12:09 +0900)]
common: change service type to simple

* notify type is creating waiting before launch
* changing this to simple to remove uneccessary waiting times

Change-Id: I6bf26289d229337c993d3de10fada89307b8e0cc
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agocommon: adding support for i686 50/53750/1 accepted/tizen/mobile/20151209.070605 accepted/tizen/tv/20151209.070645 accepted/tizen/wearable/20151209.070732 submit/tizen/20151209.061613
Prajwal A N [Wed, 9 Dec 2015 06:14:28 +0000 (15:14 +0900)]
common: adding support for i686

* i686 is used in emulator

Change-Id: I18962d2b3514200855b3f04a1ffafa8aab55e3aa
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agocommon: support emulator profiles 24/53724/1 submit/tizen/20151209.025448
Prajwal A N [Wed, 9 Dec 2015 02:38:35 +0000 (11:38 +0900)]
common: support emulator profiles

* added system-freezer lib files for x86 arch

Change-Id: I3a7dfd1b103cdf8b5c4888d723d81d0b38140b1a
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agoMerge branch 'devel/tizen_2.4' into tizen 27/53327/2 submit/tizen/20151208.073148
Prajwal A N [Wed, 2 Dec 2015 05:17:02 +0000 (14:17 +0900)]
Merge branch 'devel/tizen_2.4' into tizen

Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
Change-Id: I6a6d867c49be60dd54102d235d1eb13ea605b16e

8 years agofreezer: updated libsystem-freezer.so file
Prajwal A N [Fri, 27 Nov 2015 02:15:26 +0000 (11:15 +0900)]
freezer: updated libsystem-freezer.so file

* updated system-freezer library file
* changes till "unmounting at poweroff" included

Change-Id: Ia2fd0e64731f9e57e84a2f7705306ef86060a5a0
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>
8 years agoswap: change code to build for disabled swap module
Prajwal A N [Fri, 27 Nov 2015 01:45:03 +0000 (10:45 +0900)]
swap: change code to build for disabled swap module

* earlier code was working exclusively for enabled swap module
* changed the build code and common definitions to build for disabled swap module

Change-Id: I7f730f2a4e2ec46f91c97a2ee3e1c6ebae8920a2
Signed-off-by: Prajwal A N <an.prajwal@samsung.com>