How could i get the kernel and user cpu usage for each process

Hi all,
In order to monitor the system CPU usage, I would like write a script to gather the kernel and user CPU usage for each process, like the prstat or top does. As always missing the shortlived kernel usage, prstat or top cann't get the precise CPU usage. I checked with the dtrace syscall, proc and fbt provider, but don't get which one is useful.
Please provide your comments and suggestion.
Thanks in adv

mail2sleepy wrote:
As I've studied the "dtrace" for a while, and seems Sun gives a pretty high score on this new feature.....I do want to know whether there's some probe can work for it, like writing a "dtrace" version prstat.You can write a prstat without dtrace. Because that's just polling at specific intervals and reading some process structures from /proc. You could have dtrace fire a probe every 5 seconds and read the same thing, but it wouldn't really be using any features of dtrace. Trhying to write it "in dtrace" doesn't make much sense.
What you could do that would be harder via other methods is to fire a probe at process exit that displayed the process information including total CPU time. They could print exactly when processes exited. Doing that without dtrace would be very difficult.
Darren

Similar Messages

  • How could I get the used rates of cpu and main memory

    I want to get the used rates of the cpus and the memeoy?How could I do?
    I write the code on linux and got them by read the file /proc/meminfo and /proc/loadavg.
    Is there the similar file under solaris?
    Further more , under the linux os, I could make a system sound with function ioctl,which function could make a warning sound in Solaris?
    Thanks a lot!

    For memory usage call vmstat. Can't help with CPU usage.

  • My iPod is showing a white screen. I could not see anything. But I can listen to songs by blindly pressing the play button twice. The battery comes only for an hour.? How do I get the display and longer battery?

    Hello Friends,
    I've two iPod Nanos (4th gen - 8GB). I'm facing a severe problem with both of them. For both iPods, I tried to do this method Simultaneously press the top button + home (central) button. But of no use.
    1. My first iPod is showing a white screen. I could not see anything. But I can listen to songs by blindly pressing the play button twice. The battery comes only for an hour.? How do I get the display and longer battery?
    2. My second iPod is facing more severe problem. None of the buttons are working. When I connect it my PC it showing "CONNECTED- eject before disconnecting". But it is not ejecting with all the usual methods. When I manually and physically disconnect it from the PC the same "CONNECTED- eject before disconnecting" is still showing till the battery goes off. After that if i press any button it is showing low battery signal. And when i re-connect it to the PC the same process is repeating. When I tied to restore it to the factory settings I'm getting "Error" report.
    (I'm using windows 7)
    Friends, Please help me with the above problems. It will be a great help.
    Thank You.
    R.SAMALA

    Sounds like some hardware issues, meaning you'll want to take or send the iPods in for service or repairs. You can choose to have Apple do an out of warranty exchange for the prices indicated in the link below or find another third party service perhaps even local to your area.
    http://www.apple.com/support/ipod/service/prices/
    B-rock

  • Dear Customer Service Team,  I bought a twelve-month Dreamweaver CC program with monthly payment that I have paid via bank transfer and there would be a question about the activation. How could I get the license key with which I can activate my account? I

    Dear Customer Service Team,
    I bought a twelve-month Dreamweaver CC program with monthly payment that I have paid via bank transfer and there would be a question about the activation. How could I get the license key with which I can activate my account? I can not find it and now I only have access to the trial version.
    Thank you for your help in advance.
    Kind Regards,
    G. Zsolt

    There is no serial number require for Creative Cloud products, you may activate the products using your email address and password which is associated with Adobe. If your Dreamweaver asking for serial number, then make sure you are signing in with correct email address.
    You may also refer below link
    Sign in, activation, or connection errors | CS5.5 and later

  • How can i get the time and result together show in one Array or in Cluster?

    hello everyone i am a new user .I want to get the time and voltge form a Generater. How can i get the time and result together show in one Array or in Cluster?When i selecte the first(or third...) result then in the front panel display the time and the voltge.Thank you!
    I post the time and voltge NOT together photo
    Attachments:
    12345.GIF ‏54 KB

    You can create an array of clusters with one element being the time and the other being the voltage, like so (using the "Get Waveform Components" function):
    Message Edited by smercurio_fc on 10-17-2007 03:15 PM
    Attachments:
    pic.PNG ‏11 KB

  • By API action, how can I get the list of user IDs within a specific group  (which is created by API) ?

    By API action, how can I get the list of user IDs within a
    specific group (which is created by API) ?
    or How can I get the group (which is I create by API) ID to
    which a specific user belong by API action?
    Thanks
    Alex

    The poster already posted at the Acrobat Users Community, Interactive Forms that sums up a client order from catalog. The sample form posted to Acrobat.com was a revision of the sample form that came with Acrobat 4.0. There are some fairly advance scripts, templates, and document level functions involved with this form.

  • How could i get the dump/restore utility?

    I am newbie to arch, a stupid question
    when i use FreeBSD or other Linux Distribution, dump/restore is always the standard utility
    but i do not find them in pacman
    how could i get the dump/restore utility?
    thanks

    fukawi2 wrote:
    Ranguvar wrote:dump and restore are deprecated in Linux IIRC. Other utilites are available. There's even a quote by Torvalds where he disses them
    There's nothing wrong with the classics
    I think so

  • How we can get the current login user information.

    Hai Experts,
    How we can get the Curren Runnig user, while running the application,
    I tried the below one, but it was not working,
    Dim s As String
    s = objApplication.Company.UserName
    Regards,
    Saidarao yakkala

    Hi.
    Are you try to get and present current user name in workbook or WAD ?
    You may use user exit variable based on sy-uname.
    If you run WAD you may use built webitem info_field and show current user name.
    Regards.

  • I have two iMac's on the same desk. Once iMac pairs with both keyboards and mice.  The other pairs with the mouse, but I cannot get the keyboard to connect.  How do I get a keyboard and mouse to connect to each iMac independently?

    I have two iMac's on the same desk (about a foot apart). One iMac pairs with both keyboards and mice.  The other pairs with the mouse only; I cannot get the keyboard to connect.  How do I get a keyboard and mouse to connect to each iMac independently?

    Antaeus00 wrote:
    I tried sending a request for help,
    But did you succeeed in sending a request for help?
    Did you receive a response? How long has it been since you sent a request?
    but I need someone with more authority to talk to.
    There is no one with more authority than iTunes store support. We herem are only users.

  • How can I get the "Open" and "Save As" dialog boxes to open at larger than their default size?

    How can I get the "Open" and "Save As" dialog boxes to open at larger than their default size?  I would like them to open at the size they were previously resized like they used to in previous operating systems.  They currently open at a very small size and the first colum is only a few letters wide necessitating a resize practically every time one wants to use it.  Any help would be appreciated.

    hi Prasanth,
    select werks matnr from ZVSCHDRUN into table it_plant.
    sort it_plant by matnr werks.
    select
            vbeln
            posnr
            matnr
            werks
            erdat
            kbmeng
            vrkme
            from vbap
            into table it_vbap
            for all entries in it_plant
            where matnr = it_plant-matnr and
                  werks = it_plant-werks.
    and again i have to write one more select query for vbup.
    am i right?

  • HT204053 If I have an apple ID for myself and my wife has just got a iPhone for the first time how can she get the same apps as I have for my iPhone and iPad

    If I have an apple ID for myself and my wife has just got a iPhone for the first time how can she get the same apps as I have for my iPhone and iPad by getting it off my iCloud?

    She can't from iCloud without setting up your iCloud account on her phone. But just sync the same apps from your iTunes Library on your computer to her phone.
    Your wife should setup her own iCloud account - which is separate to the iTunes Store accounts.

  • How can i get the itunes and apps store icon on my ipad desktop?

    How can i get the itunes and apps store icon on my ipad desktop?

    Google are supposed to be working on an iPad maps app.

  • I'm new to Mac. I have an iPhone and a Mac Mini.  My original iTunes was on a Windows computer that crashed.  So, all of my iTunes Music and Movies are gone.  How do I get the movies and music from my iPhone to the new Mac Mini?

    I'm new to Mac. I have an iPhone and a Mac Mini.  My original iTunes was on a Windows computer that crashed.  So, all of my iTunes Music and Movies are gone.  How do I get the movies and music from my iPhone to the new Mac Mini?

    If you still have the crashed Win computer, you may be able to recover your music and movies from the hard drive. If you have a friend with a hard drive USB connection kit and a PC, they should be able to help.  Otherwise, check locally for computer services that might do that for you (I think Best Buy Geek Squad may be able to help). If the drive itself is in good shape, it shouldn't be too expensive. 

  • How can I hide the password and user name in url???

    Hi experts,
    I'm creating a login page and know I have a problem.
    The Username and password are verified in a Java class, after checking the user and password, the user should be linked to the portal.
    So far everything has worked well.
    But when I call the lin like this
    res.sendRedirect ("/ irj / portal j_user =" + UserN + "& j_password =" + passw);
    then the user name and Pwasswort appears in the url.
    Can someone tell me how can I hide the password and user name???
    It will be very helpful.
    Thank you
    Edited by: Cilvaring on Aug 5, 2011 12:00 PM

    If there is no specific reason that you have to use sendredirect...thne you can try request.forward.....
    RequestDispatcher rd = request.getRequestDispatcher("pathToResource");
      rd.forward(request, response);

  • How could i get the selected node in the JTree

    getLastSelectedPathComponent() �returns the parent node of currenr selected, so how could I get the selected node itself in the JTree
    I will appretiate for any help!

    i think you can get by....
    TreePath treePath = tree.getSelectionPath();
    DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) treePath.getLastPathComponent();

Maybe you are looking for