Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3791886
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:32:16+00:00 2026-05-19T12:32:16+00:00

Is there a way to grep for only calls that over a certain amount

  • 0

Is there a way to grep for only calls that over a certain amount of time?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T12:32:17+00:00Added an answer on May 19, 2026 at 12:32 pm

    It looks like there is a flag that shows the CPU time in the output (-c):

    man strace

    Sample output:

    sysadm@brownie:~$ strace -c ./crypt_crack.py
    % time     seconds  usecs/call     calls    errors syscall
    ------ ----------- ----------- --------- --------- ----------------
     84.38    0.000027           0       340       273 open
     15.63    0.000005           0        67           rt_sigaction
      0.00    0.000000           0        91           read
      0.00    0.000000           0        67           close
      0.00    0.000000           0       117        89 stat
      0.00    0.000000           0        96           fstat
      0.00    0.000000           0         1           lstat
      0.00    0.000000           0         3           lseek
      0.00    0.000000           0        64           mmap
      0.00    0.000000           0        17           mprotect
      0.00    0.000000           0        30           munmap
      0.00    0.000000           0         8           brk
      0.00    0.000000           0         1           rt_sigprocmask
      0.00    0.000000           0         4         2 ioctl
      0.00    0.000000           0         1         1 access
      0.00    0.000000           0         1           execve
      0.00    0.000000           0         1           uname
      0.00    0.000000           0         2           fcntl
      0.00    0.000000           0         4           getdents
      0.00    0.000000           0         1           getcwd
      0.00    0.000000           0         1         1 readlink
      0.00    0.000000           0         1           getrlimit
      0.00    0.000000           0         1           arch_prctl
      0.00    0.000000           0         2           futex
      0.00    0.000000           0         1           set_tid_address
      0.00    0.000000           0         1           set_robust_list
    ------ ----------- ----------- --------- --------- ----------------
    100.00    0.000032                   923       366 total
    
    sysadm@brownie:~$
    

    When run with the -c flag, strace appears to hold all output until execution terminates (gracefully or ctrl-c)

    And with awk to look for CPU time == 0.0:

    sysadm@brownie:~$ strace -c ls -la 2>&1 | awk '{if ($2 == 0.0) print;}'
      0.00    0.000000           0        23           read
      0.00    0.000000           0         1           write
      0.00    0.000000           0        34        12 open
      0.00    0.000000           0        27           close
      0.00    0.000000           0        34           stat
      0.00    0.000000           0        23           fstat
      0.00    0.000000           0        34           lstat
      0.00    0.000000           0         1           lseek
      0.00    0.000000           0        41           mmap
      0.00    0.000000           0        12           munmap
      0.00    0.000000           0         3           brk
      0.00    0.000000           0         2           rt_sigaction
      0.00    0.000000           0         1           rt_sigprocmask
      0.00    0.000000           0         2         2 ioctl
      0.00    0.000000           0         2         1 access
      0.00    0.000000           0         4           socket
      0.00    0.000000           0         4         4 connect
      0.00    0.000000           0         1           execve
      0.00    0.000000           0         1           uname
      0.00    0.000000           0        13           fcntl
      0.00    0.000000           0         2           getdents
      0.00    0.000000           0         1           getrlimit
      0.00    0.000000           0         1           arch_prctl
      0.00    0.000000           0        67        67 getxattr
      0.00    0.000000           0         1           futex
      0.00    0.000000           0         1           set_tid_address
      0.00    0.000000           0         1           clock_gettime
      0.00    0.000000           0         1           set_robust_list
    sysadm@brownie:~$
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using only grep and sed, is there a way I can tranform the output
Is there way in next piece of code to only get the first record?
Is there a way to enforce constraint checking in MSSQL only when inserting new
Is there a way to find the name of the program that is running
Is there a way to take over the Entity Framework class builder? I want
Is there a way to identify, from within a VM, that your code is
I just realized that there is no best way to hide MySQL string connection
Is there a way to use a command like git ls-files to show only
Is there a way to test if a collection is already initialized? try-catch only?
Is there way to add new method to List object over the object from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.