https://github.com/osquery/osquery logo
Title
h

Hugh (Zercurity)

07/10/2020, 11:11 AM
of the users mouse activity? applications? or just general system CPU usage?
b

binu

07/10/2020, 6:44 PM
For users mouse activity ,and application
h

Hugh (Zercurity)

07/10/2020, 6:49 PM
sorry, couldn't help you with that use case.
b

binu

07/12/2020, 9:22 AM
Ok thanks
Machine active/inactive(idle) times query available in osquery ?
h

Hugh (Zercurity)

07/15/2020, 4:15 PM
SELECT (SUM(user) + SUM(nice) + SUM(system) + SUM(idle) * 1.0) AS tsb, SUM(COALESCE(idle, 0)) + SUM(COALESCE(iowait, 0)) AS itsb FROM cpu_time;
full example in the link to medium I posted
though you will have to run this query periodically to check the difference in times. In order to correctly calculate usage.
b

binu

07/15/2020, 4:36 PM
Ok thanks for your help