Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    compute the run time and sleep time of a process in kernel 2.4

    hi there i'm working on a project about implementing a new scheduler into kernel 2.4 version. i figured out the concepts of how it works. However, i struggle with compute the exact run time (which determines the time process is on the CPU) and sleep time (the time process is waiting for the CPU).by the way, i figured out i could use getnstimeofday() - sleep_time(which is in task_struct) which gives the waiting time of a process (which is mainly what i want). i will be glad for every reply and thanks anyway.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    It is easier to get this data from /proc, but the sysstat source code will help you figure out how this is done. In any case, source code excavations can reveal a lot of interesting cruft!
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts