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

  • SEARCH
  • Home
  • 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 8827557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:24:03+00:00 2026-06-14T07:24:03+00:00

When I run my program top reports that I am spending 30+% in sy

  • 0

When I run my program “top” reports that I am spending 30+% in “sy” (kernel space).

How can I get more information about this? What system call is eating up all
this time, etc.

Thanks responders:

  • It sounds like Devel::NYTProf is good for profiling the entire program — but I had trouble installing it on Amazon Linux.

  • If I just want a snapshot of system calls strace seems to be great.

Updated: I did this and the time spent in system calls is actually negligible. My best guess is the threads are stuck waiting on some resource. The answers are still good below but any advice would help.

  • 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-06-14T07:24:04+00:00Added an answer on June 14, 2026 at 7:24 am

    You could use strace(1) - trace system calls and signals.
    -c flag will produce aggregate results grouped by syscall. -p NUM is a PID of running process to attach.
    Monitoring a crawler (for instance) looks like this:

    stas@crawler2:~/ScrapMe$ strace -c -p 32184                                                                                                                                                                                              
    Process 32184 attached - interrupt to quit
    ^CProcess 32184 detached
    % time     seconds  usecs/call     calls    errors syscall
    ------ ----------- ----------- --------- --------- ----------------
     48.00    0.000024           0       128           sendto
     26.00    0.000013           0        76           write
     26.00    0.000013           0      2652      2652 stat
      0.00    0.000000           0        24           close
      0.00    0.000000           0       226           poll
      0.00    0.000000           0        78           rt_sigaction
      0.00    0.000000           0        26           rt_sigprocmask
      0.00    0.000000           0        52           alarm
      0.00    0.000000           0        26           socket
      0.00    0.000000           0        26        26 connect
      0.00    0.000000           0        75           recvfrom
      0.00    0.000000           0        26           getsockname
      0.00    0.000000           0        26           getpeername
      0.00    0.000000           0        26           getsockopt
      0.00    0.000000           0       310           fcntl
      0.00    0.000000           0        13           epoll_wait
      0.00    0.000000           0        26           epoll_ctl
    ------ ----------- ----------- --------- --------- ----------------
    100.00    0.000050                  3816      2678 total
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to gain some run-time information about a C++ program, which is kinda
When I try to run this program, I get an error in Firefox saying
I want to design a c# program which can run program a 3rd exe
I get the following error when running mongo-hadoop streaming: java.io.IOException: Cannot run program "mapper.py":
There is a space in the string, but when I run program, it returns
To run a program with custom env settings, we do this on Linux $
I can run my program outside of a jar file, but I want to
I have a program that can open multiple forms, and when there are a
I'm trying to compile and run this program .obviously, it doesn't work!my question is
I am trying to run a program that analyzes a bunch of text files

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.