https://github.com/osquery/osquery logo
#general
Title
# general
e

Erich Stoekl

04/29/2020, 9:05 PM
Can anyone give me an example of a long-running osquery command?
z

zwass

04/29/2020, 9:26 PM
Something that consumes a lot of resources?
e

Erich Stoekl

04/29/2020, 9:54 PM
something that just runs for a while
something like a sleep
but yes, something that uses a lot of resources would be good
z

zwass

04/29/2020, 10:28 PM
Copy code
osquery> .timer ON
osquery> select count(*) from processes;
+----------+
| count(*) |
+----------+
| 400      |
+----------+
Run Time: real 0.003 user 0.001090 sys 0.001459
osquery> select count(*) from processes, processes;
+----------+
| count(*) |
+----------+
| 160000   |
+----------+
Run Time: real 0.417 user 0.137328 sys 0.279141
osquery> select count(*) from processes, processes,processes;
1
That will give you exponential growth on runtime
e

Erich Stoekl

04/29/2020, 10:39 PM
nice, that worked!
thank you
s

seph

05/01/2020, 11:27 AM
Adding a hashing will consume resources and take longer.
Curl, maybe
2 Views