SQL Query - Finding CPU age (how old)

  • Hi All

    Trying to do a query to find out how old are the cpu on device. We do have a way of doing it but it involves manual step which we are trying to move away from.

    Basically now we are taking the CPU Model example INTEL I5 8500 2.4gh, 01/04/2017 ( Date CPU Launch), then do the difference with today's date, which work but we always need to update the table with the CPU Model and date cpu was launch.

    Here's an example of the query line

    Select 'Intel(R) Pentium(R) 4 CPU 2.26GHz','01/01/2002' union

    select distinct v_R_System.Name0 as [System Name],

    DateDiff(dd,CONVERT(CHAR(10),CONVERT(DATETIME,LEFT(ProcessorReleaseDates.ReleaseDate,10),105),101),getdate())/365.25 AS [Processor Age],

    Another way we taught was via the BIOS date but this would not work as if the BIOS get updated it would provide the current bios date.

    What would be the best approach to do this.

    Tks

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • Didn't you already ask this q?!

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • ScottPletcher wrote:

    Didn't you already ask this q?!

    According to the OPs profile, no.  In fact, this appears to be the first and only question they've posted.

     

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • sets4life wrote:

    Hi All

    Trying to do a query to find out how old are the cpu on device. We do have a way of doing it but it involves manual step which we are trying to move away from.

    Basically now we are taking the CPU Model example INTEL I5 8500 2.4gh, 01/04/2017 ( Date CPU Launch), then do the difference with today's date, which work but we always need to update the table with the CPU Model and date cpu was launch.

    Here's an example of the query line

    Select 'Intel(R) Pentium(R) 4 CPU 2.26GHz','01/01/2002' union select distinct v_R_System.Name0 as [System Name], DateDiff(dd,CONVERT(CHAR(10),CONVERT(DATETIME,LEFT(ProcessorReleaseDates.ReleaseDate,10),105),101),getdate())/365.25 AS [Processor Age],

    Another way we taught was via the BIOS date but this would not work as if the BIOS get updated it would provide the current bios date.

    What would be the best approach to do this.

    Tks

    I don't know of any date on the system associated with the CPU's themselves.  It is, however, almost trivial to get the type of processor(s) the machine has.  It can even be done through xp_CmdShell if you don't mind such a brief trip.  Would that be of any help?

     

     

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden wrote:

    ScottPletcher wrote:

    Didn't you already ask this q?!

    According to the OPs profile, no.  In fact, this appears to be the first and only question they've posted.

    OK.  Sorry, my bad, it was on a different SQL Server forum that this q previously appeared.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • @sets4life

    Are you still there?  If so, see my previous post.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply