How  to top five minutes and ten minutes record

Hi,
i have to get top five minutes records
group by hostid and cpuid and timestamp is the field
group by
hostid,cpuid
and the group is also based on last 5 minutes or ten minutes or one day
select wait, idle, users, system ,wait+idle+users+system totalusers
from (select hostid,cpuid, avg(wait_to) wait, avg(idle) idle, avg(users) users, avg(system) system from system_cpu where hostid='DSCP02469' and cpuid='first'
group by cpuid,hostid having
max(timestamp)-timestamp<5/1440))
please correct it and send
with regards
shannu sarma
Message was edited by:
user517983
Message was edited by:
user517983

Hi,
SELECT uo.hostid,uo.cpuid,uo.timestamp FROM system_cpu uo
WHERE timestamp >= (SELECT MAX(timestamp)
FROM syStem_cpu uo2 WHERE uo2.cpuid ='cpu1' and uo2.hostid='DSCP02469') - (5 / (24 * 60))HOSTID CPUID
and i even trying in this way but i am not getting right results
hostid='DSCP02469' and cpuid='first'
but other result are also comming due to
som bad sub query.
select cpuid,hostid,timestamp from system_cpu sys where
exists (select hostid,cpuid from system_cpu
where hostid='DSCP02469' and cpuid='first'
having max(timestamp)-sys.timestamp<5/1440
group by hostid,cpuid)
SQL> /
CPUID HOSTID TIMESTAMP
first DSCP02469 29:jun:2006:18:33:01
second dscp02469 29:jun:2006:18:30:18
second dscp02469 29:jun:2006:18:31:04
second dscp02469 29:jun:2006:18:32:53
second dsc02469 29:jun:2006:18:37:36
second dscp02469 29:jun:2006:18:40:39
second dscp02469 29:jun:2006:18:41:26
second dscp02469 29:jun:2006:18:42:31
Message was edited by:
user517983
Message was edited by:
user517983

Similar Messages

  • 60 minutes and 400 minutes

    I had bought 2 subscriptions, one for 60 minutes and one for 400 minutes, i had cancelled the 60 minutes one awhile ago but i am reading here on my skype tonight, and its saying its going to renew tomorrow, though i have cancelled it? i dont understand that, i do not want the 60 minutes to reactive tomorrow! because i had bought a bigger one, also, i wanted to purchase another 400 minutes because i have only 30 minutes left to the 400 one, but its saying it will start after the subscription ends, does that mean i have to wait even though my minutes are gone from the 400 one to be able to start using the new one that i will buy?

    Hi, Danai,
    Just out of curiosity, you have checked your PayPal account to ensure the funds were not deposited to it, and not to the payment method on file with PayPal?
    I appreciate your patience; I would have sent another enquiry to Skype Customer Service within one or two billing cycles.  Please do file again, including the order numbers (which, by the way, should not be posted on a public Community or forum such as this); here is a link to start with: request a refund
    Regards,
    elainem77
    Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
    Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often!

  • How to get the first and the last record of every month within a time range in sql

    I am trying to get the first record and the last record of each and every month in a given date range using sql. I have a sample code
    where i have just selected everything within the date range now i have to extract the first and the last records of each and every month.
    SELECT PurOrderNum,
    OrderDate
    FROM Purchasing.PurOrder
    WHERE OrderDate >= '2013-02-28'
    AND OrderDate <= '2014-12-29'

    SELECT PurOrderNum,
    OrderDate
    FROM
    SELECT PurOrderNum,
    OrderDate,
    MAX(OrderDate) OVER (PARTITION BY DATEDIFF(mm,0,OrderDate)) AS MaxDate,
    MIN(OrderDate) OVER (PARTITION BY DATEDIFF(mm,0,OrderDate)) AS MinDate
    FROM Purchasing.PurOrder
    WHERE OrderDate >= '2013-02-28'
    AND OrderDate <= '2014-12-29'
    )t
    WHERE OrderDate = MaxDate
    OR OrderDate = MinDate
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to remove repeated header and print "No records" in report

    Hi,
    I have a problem with my output report it is repeating the header when no records was found. And does anyone knows how i can put "No records found" (when no record is found) in the output without the Total amount and Grand Total? Please refer to the attachent file for reference.
    Thanks a lot! Hope someone can help me.
    Cheers,
    Jen
    Report ID: CRMR2W26 PARTIAL LOAN PREPAYMENTT MONTHLY SUMMARY REPORT Report Date: 08/04/2008
    For the month of March
    SR Creator SR No. Sales Opty Id Cash Amount($) CPF Amount ($) CIF No. Customer Name Salesperson Name Domicile Branch SR Status
    Domicile Description
    Branch
    Code
    Total amount
    Grand Amount
    Page 1
    Report ID: CRMR2W26 PARTIAL LOAN PREPAYMENTT MONTHLY SUMMARY REPORT Report Date: 08/04/2008
    For the month of March
    SR Creator SR No. Sales Opty Id Cash Amount($) CPF Amount ($) CIF No. Customer Name Salesperson Name Domicile Branch SR Status
    Domicile Description
    Branch
    Code
    No records extracted
    Page 1
    Message was edited by:
    user618088

    This sounds like a Reports issue.
    Perhaps you would be better asking in the Reports rather than the SQL and PL/SQL forum.
    ;)

  • How to create One Master - and 2 detail records region

    Hi,
    My requirement is to have three regions on a single page, one for master record and two for detail records.
    Also, one detail record region needs to upload images (photos) to database.
    Can some one tell me how to do this in APEX.
    Thanks
    Aali

    Hi Aali, I have the same issue in a master detail form, I don't know how to upload images in the detail form, can you help me please.
    Thanks and regards,
    Wilson

  • How to open up Forms and navigate to record with external hyperlink?

    Hello,
    I was wondering whether it is possible to open up a Forms Application, and navigate to a specific Form and record via an external hyperlink. For example in an e-mail a hyperlink is generated which should redirect the user directly into the application and to the correct Form and record ID.
    Thanks in advance for any suggestions.
    Regards

    I suppose this is theoretically possible. The hard part would be to figure out how to pass the equivalent of a ParamList or a Global Variable to a form from a web page. Then you could test for these ParamList or Global values in the called form and navigate to the desired Form and query a specific record. I've seen some demo's on OTN where they embedded a Form into a Web Page and was able to interact between the web page and the form and vis-versus. Unfortunately, I can't remember where I saw the demo, but it was just recently that I saw it. If you can find this demo, it might give you some ideas how to do what you are trying to do.
    Sorry I couldn't be more helpful.
    Craig...
    Edited by: CraigB on Sep 3, 2008 3:07 PM
    Figures, as soon as I post my response, I found the article. Here's the link: http://www.oracle.com/technology/pub/articles/wilfred-adf-forms.html (Integrating Forms with Oracle ADF Faces).

  • How to get the rowid and the entire record selected in PLSQL?

    The code given below does not work.
    You cannot select the record and the rowid using a cursor in one-shot.
    But you could do that in a direct SELECT in "SQL Plus" when you select records for display. Is this a bug in ORACLE PLSQL? Or is there another way to do this?
    DECLARE
    objid_ VARCHAR2(200);
    rec_ xxx_tab%ROWTYPE;
    CURSOR get_rec IS
    SELECT t.*, t.rowid
    FROM xxx_tab t;
    BEGIN
    OPEN get_rec;
    FETCH get_rec INTO rec_, objid_;
    CLOSE get_rec;
    END;
    -----------------------------------

    You cannot fetch into both a record type and a variable. You have a few options, you can declare the record a s a rowtype of the cursor like this:
    DECLARE
       CURSOR c IS
          SELECT t.*, rowid rid
          FROM t;
       l_rec c%ROWTYPE;
    BEGIN
       OPEN c;
       FETCH c INTO l_rec;
       CLOSE c;
    END;You could use an implicit cursor and let Oracle deal with the record type internally (not to mention the open fetch and close) like this:
    BEGIN
       FOR rec in (SELECT t.*, rowid rid FROM t) LOOP
          do_stuff with rec.col_name
       END LOOP;
    END;Note that in both of these you must alias the rowid column to some other name, you could also manually construct the record type to match the table and add a column od ROWID datatype to hold the rowid.
    Finally, I think, depending on what you are actually going to do with the rowid, and how you feel about having records locked, you could look at declaring the cursor as FOR UPDATE and get rhe rowid for free.. This would be most appropriate if you are planning to update the table in the cursor (a bad practce by the way). Something like:
    DECLARE
       l_rec t%ROWTYPE;
       CURSOR c IS
          SELECT t.*, rowid
          FROM t;
    BEGIN
       OPEN c;
       FETCH c INTO l_rec;
       do_whatever with l_rec
       UPDATE t
       SET whatever
       WHERE current of c;
    END;John

  • How to clear/delete diagnostic and usage data records?

    The records under diagnostic and usage getting more each day and i have no ideas on how to delete it. Have try to sync with pc via iTunes and off the function under setting/privacy/location service/systems services/diagnostic and usage. Non works, please HELP!

    FYI
    Complete guide to using iOS 6
    http://howto.cnet.com/ios-6-complete-guide/
    Guide to Built-In Apps on iOS
    https://sites.google.com/site/appleclubfhs/support/advice-and-articles/guide-to- built-in-apps-ios
    You can download a complete iOS 5 iPad User Guide and iOS 6 iPad User Guide here: http://support.apple.com/manuals/ipad/
    Also, Good Instructions http://www.tcgeeks.com/how-to-use-ipad-2/
    Apple - iPad - Guided Tours
    http://www.apple.com/ipad/videos/
    Apple iPad Guided Tours - Watch the videos see all the amazing iPad apps in action. Learn how to use FaceTime, Mail, Safari, Videos, Maps, iBooks, App Store, and more.
    http://www.youtube.com/watch?v=YT2bD0-OqBM
    http://www.youtube.com/watch?v=ROY4tLyNlsg&feature=relmfu
    http://www.youtube.com/watch?v=QSPXXhmwYf4&feature=relmfu
    How to - Articles & User Guides & Tutorials
    http://www.iphone-mac.com/index.php/Index/howto/id/4/type/select
    iPad How-Tos  http://ipod.about.com/lr/ipad_how-tos/903396/1/
    You can download this guide to your iPad.
    iPad User Guide for iOS 5
    http://itunes.apple.com/us/book/ipad-user-guide-for-ios-5/id470308101?mt=11
     Cheers, Tom

  • When I turn on my wifi in top bar and connect,minutes later I get an annoying pop up notification letting me know I'm connected, AGAIN. It freezes everything including psswds and I have to start all over This is petty but how do I shut this popup off?

    When I turn on my wifi in top bar and connect,minutes later I get an annoying pop up notification letting me know I'm connected, AGAIN. It freezes everything including psswds and I have to start all over. This is petty, but how do I shut this popup off?

    What OS X version are you using?
    Can you take a screenshot of the pop-up notification?
    To take a screenshot hold ⌘ Shift 4 to create a selection crosshair. Click and hold while you drag the crosshair over the area you wish to capture and then release the mouse button. You will hear a "camera shutter" sound. This will deposit a screenshot on your Desktop.
    If you can't find it on your Desktop look in your Documents or Downloads folder.
    If you want to attach a screenshot to a response here, click the "camera" icon above the text field:
    This will display a dialog box which enables you to choose the screenshot file (remember it's on your Desktop) and click the Insert Image button.
    ⌘ Shift 4 and then pressing the space bar captures the window the cursor is on.
    ⌘ Shift 3 captures the entire screen.

  • HT1459 i have an ipod touch that is amounted with WAY to many minutes and we do not know the password. i would reset it with itunes but i cannot turn it off for the top lock button doesnt work. how do i restore it to factory settings or fix the lock butto

    I have an ipod touch that i would like to restore to factory settings. Having said that the ipod is locked for over 1,000 minutes and i do not know the password. I know the trick of holding down the lock button and home button at the same time until the "Connect to iTunes" message pops up, but the lock button on my ipod does not work. Is there anything i could do? I really could use some help im very stuck!

    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                          
    If recovery mode does not work try DFU mode.                         
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings         
    Or try using this program to place the iPod in recovery mode
    RecBoot: Easy Way to Put iPhone into Recovery Mode
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: How to back up
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • YouTube has a ten minute limit and 1024 How do I tell how large my video is

    I have it under ten minutes but I don't know how to get it to show me how big a file it is.

    "Right click" (Control-click) on the file to learn more information about any file while using the Finder.

  • So I update the software on my 4th generation iPod and it took about ten minutes. Now the iPod won't unlock or lock properly . And it won't turn on unless plugged in. What should I do?

    So I got a software update for iPod.. Thinking it would be knowing all it would do is update my iPod so it would work better i pressed accept. I guess I screwed it up because I was using FaceTime when impressed accepted it. A second later it shut off my iPod and began the update which took about ten minutes then it turned back on so I unlock it and immediately called back my friend on FaceTime. After spending two hrs on FaceTime I ended the call and immediately noticed my iPod was acting funny. It wouldn't lock when I pressed the button and it won't take a picture of the screen when I press those two buttons. And when I pressed those two buttons together to turn in off it went straight to voice control and I was like what. It won't turn back on unless plugged in. I don't know what is wrong with it. Enyone have an idea? Please help.
    I just got this bcuz my second was beginning not to work this is a used 4th generation but I don't think it was used that long.
    Please any information would help.. Thank you

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up           
    - Restore to factory settings/new iOS device.
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar          

  • Since syncing my Ipod classic three days ago, the songs will only play the first three minutes and five seconds. Then it just stops. After a little while, it moves on to the next song.

    I have an old iPod Classic, 5th generation with video 30 GB. I sync via a pc. Since syncing it three days ago, the songs will only play the first three minutes and five seconds. Then it moves on to the next song or if it's the last song, it goes back to the menu. I just synced again and it it still doing it.It also has a small group of dots near the middle of the screen that weren't there before.Has anyone else had this problem or know how to fix it?  Thanks.

    Please disregard this question. I have a better worded version coming up.

  • I have a macbook pro core i7 mid 2012 And update to the latest version 10.8.4 system after updating the system I have the problem appeared to take off the device and stops at the apple logo for about 5 minutes and then enters the desktop How can I solve t

    I have a macbook pro core i7 mid 2012
    And update to the latest version 10.8.4 system after updating the system I have the problem appeared to take off the device and stops at the apple logo for about 5 minutes and then enters the desktop How can I solve this problem and thank you

    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Step 1
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Enter "BOOT_TIME" (without the quotes) in the search box. Note the timestamps of those log messages, which refer to the times when the system was booted. Now clear the search box and scroll back in the log to the last boot time when you had the problem. Select the messages logged after the boot, during the time something abnormal was happening. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V).
    For example, if the problem is a slow startup taking three minutes, post the messages timestamped within three minutes after the boot time, not before. Please include the BOOT_TIME message at the beginning of the log extract.
    If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message.
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    Still in Console, look under System Diagnostic Reports for crash or panic logs, and post the entire contents of the most recent one, if any. In the interest of privacy, I suggest you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if present (it may not be.) Please don’t post shutdownStall, spin, or hang logs — they're very long and not helpful.

  • It takes a full minute and a half for the Mac App Store Application to load on my iMac.  How can I fix this.  No other applications launch so slowly.

    Whenever I click on the Mac App Store icon in my dock, I get the spinning wheel for a minute and a half.  It then loads.  While in the App Store application, it takes a minute and a half to switch from "featured" to "top charts" for example.  Nothing else on my 24" iMac takes that long to load.  Any ideas on how to fix this problem?

    Drag the App Store app from the Applications folder to the Trash. Drag the App Store icon off the Dock. It should go "poof"..
    Download and install the v10.6.7 combo update.
    http://support.apple.com/kb/DL1361
    That should re install the Mac App Store for you. It's ok to do this even if you are already running v10.6.7
    If the combo did not re install the MAS for you use Pacifist to extract the MAS from the v 10.6.7 .dmg folder.

Maybe you are looking for

  • Problem in creating job via submit

    sap 4.7 i am opening/scheduling job from other program/job And from some reason i get two jobs with the same name. One is working good, and the other one is stay in schedule. My problem is  , why i active two jobs and not only one  ? And why one (tha

  • Hi. I somehow deleted my firefox search window with the little magnifying glass. Can you help me get it back?

    Luckily I have google saved in the bookmarks menu because this is the only method I have of searching the web.

  • Premiere CC (PC) ne reconnaît plus fichiers .m2ts d'un dossier

    Bonjour, J'ai un projet à rendre dans deux jours et impossible de le terminer car subitement, la dernière mise à jour de Première CC ne reconnait plus aucune chute vidéo .2mts contenues dans un dossier. Le projet comporte deux jours de chutes vidéo (

  • Not detecting Thunderbolt Display

    Hello, I just purchased the Thunderbolt Display and there's a problem when I try using it with Windows 8 on my Macbook Pro. The funny thing is that the first time I connected it (2 days ago), it WORKED. Then yesterday it didn't work at the beginning,

  • Text rendering slow

    Using FCP X I am manually adding open subtitles, my sequences are short, but typing the text is taking ages to render and the typing speed is less than a character per second! I am using a 2x 2.66 6 core Mac Pro with 20GB RAM.