summaryrefslogtreecommitdiffstats
path: root/logd/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
* logd: propagate ::log statusMark Salyzyn2015-04-151-5/+5
| | | | | | | | | | | | | Add a return value for the ::log() methods, this allows us to optimize the wakeup for the readers to only occur when the log message is actually placed. This is for a future where we may dedupe identical log messages, filter out log messages, and certainly if we filter the messages out with an internal logd check of __android_log_is_loggable(). Change-Id: I763b2a7c29502ab7fa0a5d5022c7b60244fcfde4
* Merge "logd: syscall optimization"Mark Salyzyn2015-04-151-1/+1
|\
| * logd: syscall optimizationMark Salyzyn2015-04-011-1/+1
| | | | | | | | | | | | | | - prset(PR_SET_NAME) call once - No need to call getuid(), should be AID_LOGD Change-Id: I4dde0b178bc84e711b355cd7677b0dbf905a0634
* | logd: uidToName improvementMark Salyzyn2015-04-081-2/+56
|/ | | | | | | | - read packages.list to acquire package names - hijack the reinit handler as a privileged worker Bug: 19608965 Change-Id: If7becb34354d6415e5c387ecea7d4109a15259c9
* logd: report reinitMark Salyzyn2015-03-121-5/+19
| | | | | Bug: 19681572 Change-Id: I343b9d108f064f87df79512a0fdf1b35513c3136
* logd: add reinit commandMark Salyzyn2015-03-121-15/+107
| | | | | | | | | | - respond to SIGHUP - respond to logd command "reinit" - respond to logd --reinit - reopens files on /data, eg: re-read of persistent properties Bug: 19681572 Change-Id: Iadac58e6653f027cb7355497bd675eef376ce0a8
* Revert "logd: Add minimum time bucket statistics"Mark Salyzyn2015-03-041-3/+0
| | | | | | | | | | | | | This forward port reverts commit e457b74ce6ee6d799812dc2ec5e4b8b18bcd3e91 No longer as necessary once we add liblog: Instrument logging of logd write drops Although this provided an indication of how close statistically we were to overloading logd it is simpler to understand fails thus to hunt and peck a corrected value for /proc/sys/net/unix/max_dgram_qlen Change-Id: I2b30e0fc30625a48fd11a12c2d2cc6a41f26226f
* logd: logd placed into background cgroupMark Salyzyn2015-02-041-0/+5
| | | | Change-Id: I38d7be05ab77fc944a9dbef2b6575d4caa920d08
* logd: auditd remove logDmesg methodMark Salyzyn2014-12-051-0/+18
| | | | | | | | | | | | | - logDmesg method consumes considerable memory resources (typically 128KB depending on kernel) - In the future (eg: klogd, syslogd) there may be need to feed multiple logs or threads with the retrieved data. - By moving the actions of logDmesg into the mainline that instantiates the thread objects, we can leverage a single allocation of the the kernel log allocation. - logDmesg (private) is replaced with log (public) which has a more useful and descriptive purpose for the class. Change-Id: Ie2dd0370661493c1e596a7e486904a0e8caab9ff
* logd: Add control statistics enable/disable.Mark Salyzyn2014-10-061-0/+9
| | | | | | | | | | - ro.build.type=user turn off statistics - ro.config.low_ram=true turn off statistics - logd.statistics override Bug: 17526159 Bug: 17526187 Change-Id: I74796043ac34753c6dd10018719ebc0bcd94e00f
* Fix implicit declaration of function 'prctl' in logd.Elliott Hughes2014-07-181-2/+1
| | | | Change-Id: I0f655ad15295739adb8f04ec62c88a220413875e
* logd: add logd.auditd propertyMark Salyzyn2014-04-291-11/+26
| | | | | | | | - permit us a mechanism to disable auditd - standardize property boolean Bug: 14275676 Change-Id: I76f245c6aee511ed44274159e0ea55915b484dda
* logd: libsysutils: logd startup outside init environmentMark Salyzyn2014-04-171-0/+29
| | | | Change-Id: I3426b6c3eebdd0c8258e966dcaaaa2825d7a23d1
* logd: auditd: add logd.auditd.dmesg propertyMark Salyzyn2014-04-071-1/+9
| | | | Change-Id: If4a579c2221eec99cf3f6acf59ead8c2d5230517
* logd: selinux auditd initial commitWilliam Roberts2014-04-071-1/+15
| | | | | | | | | | | | | | | | | | | | | | Initial commit for an audit daemon that writes kernel audit messages to the Android logger. The daemon searches dmesg for all lines that contain "audit" and writes them. Then receiving the messages from the netlink socket. It also formats the messages so they are compatable with ausearch (type=<t> <m> format) Modified: Mark Salyzyn <salyzyn@google.com> - do not start auditd - merge into logd, stripping unnecessary file logging. - Convert headers and code to support C++ - Fix bugs in libaudit - squash timestamp (replace with 0.0) due to duplication - squash pid due to duplication - squash comm due to duplication Change-Id: I421bcf33e7e670d596628b1b5c7c25536ce2d3fe
* logd: Add minimum time bucket statisticsMark Salyzyn2014-04-011-0/+9
| | | | | | | | | | * Only enabled for dev builds because halves performance. - Used to establish if /proc/sys/net/unix/max_dgram_qlen is appropriate for the platform (see logd/LogStatistics.cpp comments) - enabled if logd.dgram_qlen.statistics is not zero/empty Change-Id: Ib8ecfeb75b6f0f954c099a6b1032b8afb5efcbd4
* set /proc/sys/net/unix/max_dgram_qlen to large valueMark Salyzyn2014-03-031-1/+2
| | | | | | | | - init: set /proc/sys/net/unix/max_dgram_qlen to 300 - libsysutils: Add listen backlog argument to startListener - logd: set listen backlog to 300 Change-Id: Id6d37d6c937ba2d221e76258d89c9516619caeec
* logd: Add SCHED_BATCH to reduce priorityMark Salyzyn2014-02-261-0/+8
| | | | | | (cherry picked from commit 85620a1bfff1824687fd1cb14c8e1a9b2683c061) Change-Id: Id25cdef0dd7f8c5e154a0da2db2dd0554849babc
* logd: initial checkin.Mark Salyzyn2014-02-261-0/+115
* Create a new userspace log daemon for handling logging messages. Original-Change-Id: I75267df16359684490121e6c31cca48614d79856 Signed-off-by: Nick Kralevich <nnk@google.com> * Merge conflicts * rename new syslog daemon to logd to prevent confusion with bionic syslog * replace racy getGroups call with KISS call to client->getGid() * Timestamps are filed at logging source * insert entries into list in timestamp order * Added LogTimeEntry tail filtration handling * Added region locking around LogWriter list * separate threads for each writer * /dev/socket/logd* permissions Signed-off-by: Mark Salyzyn <salyzyn@google.com> (cherry picked from commit 3e76e0a49760c4970b7cda6153e51026af98e4f3) Author: Nick Kralevich <nnk@google.com> Change-Id: Ice88b1412d8f9daa7f9119b2b5aaf684a5e28098