New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 756552 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Add "log" command to ectool

Project Member Reported by teravest@chromium.org, Aug 17 2017

Issue description

Currently, aligning events between cros_ec.log and other Chrome OS logs is difficult. The EC has its own 0-base for time, so users have to scan through the log and hope to find an event that will log in both the EC log and syslog.

A "log" command for ectool would allow userspace to pass some data to be written to that log, so a syslog-style timestamp could be written once an hour or so (or on some interesting event like suspend or resume).

I'd love to hear back if anyone thinks this is a bad approach.
 

Comment 1 by sha...@chromium.org, Aug 18 2017

https://chromium-review.googlesource.com/388802 is somewhat related -- the EC will log its RTC value on power state change. We can make this more usable for platforms that don't rely on the EC for their RTC, but do want to log RTC: system_set_rtc() can also print the RTC value, and we can use more fine-grained #ifdefs (eg. we don't need RTC alarm host commands if we're just setting the RTC for logging).

Whether we add a "log" host command (which doesn't exist yet, so it will require a FW update) or use the existing RTC functionality, the feature will be slow to roll out -- it will be mostly limited to new platforms, it's not cost-effective to do a FW update just for this feature. If we want something that works right now for all / most platforms, we might consider some way of logging the EC hwtimer value and the OS time at approximately the same time (when logging is invoked). We might achieve this by causing an error condition that will cause a cprints() on all / most platforms. Maybe sending a non-existing host command?
I think we can advertise the capability to userland and take action based on that. I think it's generally useful to able to shove a string into the EC log for those correlations. It's flexible in that we can put kernel demsg times or regular host time. 
Owner: teravest@chromium.org
Status: Assigned (was: Untriaged)
I'm going to try poking at this.
Cc: kramasub@chromium.org dzigterman@chromium.org
Owner: ----
Status: Available (was: Assigned)

Sign in to add a comment