CN103425567B - A kind of logger computer is truly started shooting the method and system of service life - Google Patents

A kind of logger computer is truly started shooting the method and system of service life Download PDF

Info

Publication number
CN103425567B
CN103425567B CN201310370104.7A CN201310370104A CN103425567B CN 103425567 B CN103425567 B CN 103425567B CN 201310370104 A CN201310370104 A CN 201310370104A CN 103425567 B CN103425567 B CN 103425567B
Authority
CN
China
Prior art keywords
computer
bios
instruction
time counting
service life
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201310370104.7A
Other languages
Chinese (zh)
Other versions
CN103425567A (en
Inventor
郑红文
叶振兴
穆元春
王再跃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei Lianbao Information Technology Co Ltd
Original Assignee
Hefei Lianbao Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei Lianbao Information Technology Co Ltd filed Critical Hefei Lianbao Information Technology Co Ltd
Priority to CN201310370104.7A priority Critical patent/CN103425567B/en
Publication of CN103425567A publication Critical patent/CN103425567A/en
Application granted granted Critical
Publication of CN103425567B publication Critical patent/CN103425567B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

A kind of method of service life the invention discloses logger computer is truly started shooting, the method includes computer in start, runs to the appointment codes of BIOS, sends RDTSC instruction;The time counting that above-mentioned instruction is got is added with already present time counting in BIOS ROM;When computer seeks entry into stand-by/sleep mode or shutdown, execute BIOS ACPI code, send SMI;In SMI handler, send RDTSC instruction again;The time counting that the above-mentioned RDTSC sending again instruction is got is added with already present time counting in BIOS ROM.Truly the start shooting method of service life of logger computer according to the present invention can obtain the true start service life of computer.

Description

A kind of logger computer is truly started shooting the method and system of service life
Technical field
The present invention relates to computer, more particularly, to a kind of logger computer is truly started shooting the method for service life.
Background technology
Do not have preferable method at present to obtain true start service life after dispatching from the factory for the computer.User is to meter Calculation machine is guaranteed to keep in good repair, and simply determines whether to reach term of service with the invoice time.Such as, the guarantee period of a computer is set to 1 year, but actually have two kinds of users:One kind is everyday using computer, and usage frequency is at a relatively high;Another kind is to be rarely employed Computer, then the true service life of this two computers is certainly different.Make in the true start obtaining computer In the case of the life-span, you can the maintenance cycle of setting computer:Subscriber computer or using the invoice time as guarantee Phase, or using the true start life-span as the guarantee period, which arrives first, and just the guarantee period reaches at last.Automobile industry is to adopt class As guarantee period computational methods.
In addition, user is when buying computer, due to not knowing the true start use time of computer, often Misgivings, worry that whether can buy others reprocesses machine.If computer can show true start service life, also can help User dispels misgivings.
ACPI (Advanced Configuration and Power Interface), that is, advanced configuration and power supply connect Mouthful.ACPI is in operation following several modes:
S0:Normal mode.
S1:Standby mode, only CPU quit work, and other equipment is still in powering state.
S2:CPU closes, and S1 is about the same.
S3:Standby mode, system is switched to after this pattern, and except internal memory, the power supply of computer other equipment all will be interrupted, Only internal memory relies on electric power to maintain data therein(Because internal memory is volatibility, as long as power-off, data just without).This Sample is when hope recovers it is possible to be directly returned to standby front state.This pattern non-fully not power consumption, if therefore Power supply occurs extremely in the standby state(For example have a power failure), then just can only turn back on next time, front not preserve so standby Data all can lose, but the resume speed of this pattern is the fastest.
S4:Park mode, system is switched to after this pattern, and the data in internal memory can all be dumped to firmly by system automatically In a hibernation file on disk, it is then cut off the power supply to all devices.So when recover when, system can from hard disk incite somebody to action The content of hibernation file directly reads in internal memory, and returns to the state before dormancy.This pattern not power consumption completely, is not therefore afraid of Abnormal electrical power supply after dormancy, but cost is to need one piece and physical memory hard drive space of a size(Present hard disk across More TB rank, big capacity hard disk is more and more cheap).And the resume speed of this pattern is slower, depending on memory size and hard Disk speed.
S5:Shut down computer.
SMI:System Management Interrupt system management interrupt.
Content of the invention
A kind of method of service life it is an object of the invention to provide logger computer is truly started shooting, obtain to calculate The true start service life of machine, facilitates user and maintainer inquiry.
For achieving the above object, the present invention proposes a kind of logger computer and truly starts shooting the method for service life, the party Method includes:
Computer, in start, runs to the appointment codes of BIOS, sends RDTSC instruction;
The time counting that above-mentioned instruction is got is added with already present time counting in BIOS ROM;
When computer seeks entry into stand-by/sleep mode or shutdown, execute BIOS ACPI code, send and be System management interrupt, SMI;
In SMI handler, send RDTSC instruction again;
The time counting that get the above-mentioned RDTSC sending again instruction and already present time counting in BIOS ROM It is added.
The program of the present invention have the beneficial effects that the true start that can obtain computer by said method uses In the life-span, facilitate user and maintainer inquiry.
Preferably, described computer, in start or in the setting program of BIOS, shows described computer at this Secondary using front true start service life.
The invention allows for the system corresponding with such scheme:
A kind of logger computer is truly started shooting the system of service life, and this system includes:
Computer, in start, runs to the appointment codes of BIOS, sends the device of RDTSC instruction;
The device that the time counting that above-mentioned instruction is got is added with already present time counting in BIOS ROM;
When computer seeks entry into stand-by/sleep mode or shutdown, execute BIOS ACPI code, send and be System management interrupt, the device of SMI;
In SMI handler, send the device of RDTSC instruction again;
The time counting that get the above-mentioned RDTSC sending again instruction and already present time counting in BIOS ROM The device being added.
Preferably, described computer, in start or in the setting program of BIOS, shows described computer at this The secondary device using front true start service life.
The present invention compared with prior art has the advantages that:
(1)Subscriber computer or using the invoice time as the shelf-life, or using true start service life as guaranteeing the quality Phase, which arrives first, and just the shelf-life reaches at last.Automobile industry is using similar shelf-life computational methods.This can be helped Help distributor when doing after-sale service, more preferably grasp the service condition of computer, reduce unnecessary maintenance.
(2)In start or in BIOS SETUP, display computer uses front true start at this to computer Service life, facilitates user and maintainer to inquire about the true start service life of computer.
(3)Method involved in the present invention can promote a kind of computer environmental protection concept, and such as computer need not at night During work, must not start shooting the whole night, computer can be in park mode.
Brief description
Fig. 1 shows that logger computer involved in the present invention is truly started shooting the flow chart of service life method.
Specific embodiment
Below in conjunction with the accompanying drawings the specific embodiment of the present invention is described further.
Taking Intel X86 series microprocessor architecture as a example the specific embodiment of the present invention is made an explanation, X86 The CPU of series all has a cpu instruction RDTSC, can obtain the time counting of computer booting using this RDTSC instruction.
RDTSC instructs read access time label counter, as shown in table 1 below, by executing RDTSC instruction, by the time of CPU The currency of label counter is loaded into EDX:Eax register.Time tag enumerator is included in 64 MSR register.MSR High 32 of depositor are loaded into EDX register, and its low 32 are loaded into eax register.CPU progressive time mark of per clock cycle Sign enumerator MSR once, in cpu reset, it is reset to " 0 ".
Operation code Instruction Explanation
0F31 RDTSC Time tag enumerator is read in EDX:EAX
Table 1 shows RDTSC instruction
RDTSC instruction is not serializing instruction.So, before read access time label counter, it there is no need to wait until All instructions all executeds above.Similarly, before execution read operation, instruction below can also start to execute.
Specific logger computer truly start shooting service life method flow chart as shown in figure 1, computer first is being opened Setting program during machine or in BIOS(BIOS SETUP)In, display computer uses the longevity at this using front true start Life, when computer is to use first, shows " 0 ", do so facilitates the inquiry work of user and maintainer, Neng Gouqing Chu know true start service life before this use for this computer, as shown in S101 in Fig. 1;Work as computer booting When, run to the appointment codes of BIOS, RDTSC instruction will be sent, thus obtain this start of described computer starting always Time counting to BIOS this section of start recording during, as shown in S102 in Fig. 1;The time that above-mentioned RDTSC instruction is got Count be added with existing time counting in BIOS ROM, realize computer truly start shooting service life add up, certainly, if Described computer is to use for the first time, then the time counter of BIOS ROM is 0, as shown in S103 in Fig. 1;Run in computer To the OS stage it is intended to enter standby mode S1 or S3, when park mode S4 or computer attempt shutdown S5, OS executes BIOS ACPI code, will send SMI, as shown in S104 in Fig. 1;In SMI handler, RDTSC instruction can be sent again, thus Get described computer and enter standby mode S1 or S3, park mode S4 or meter from BIOS start recording to described computer Calculation machine attempt shut down S5 before this section during time counting, as shown in S105 in Fig. 1;Above-mentioned RDTSC instruction is got Time counting is added with existing time counting in BIOS ROM, you can the true start constantly updating this computer uses the longevity Life, as shown in S106 in Fig. 1.If it should be noted that user needs to update BIOS ROM, then the time in BIOS ROM Enumerator must retain it is not possible to be reset.

Claims (4)

1. a kind of logger computer truly start shooting service life method it is characterised in that the method includes:
Computer, in start, runs to the appointment codes of BIOS, sends RDTSC instruction;
The time counting that above-mentioned instruction is got is added with already present time counting in BIOS ROM;
When computer seeks entry into stand-by/sleep mode or shutdown, execute BIOS ACPI code, send system pipes Reason interrupts SMI;
In SMI handler, send RDTSC instruction again;
The time counting that get the above-mentioned RDTSC sending again instruction and time counting phase already present in BIOS ROM Plus.
2. logger computer according to claim 1 truly start shooting service life method it is characterised in that:Described calculating Machine, in start or in the setting program of BIOS, shows that described computer uses the longevity at this using front true start Life.
3. a kind of logger computer truly start shooting service life system it is characterised in that this system includes:
Computer, in start, runs to the appointment codes of BIOS, sends the device of RDTSC instruction;
The device that the time counting that above-mentioned instruction is got is added with already present time counting in BIOS ROM;
When computer seeks entry into stand-by/sleep mode or shutdown, execute BIOS ACPI code, send system pipes Reason interrupts the device of SMI;
In SMI handler, send the device of RDTSC instruction again;
The time counting that the above-mentioned RDTSC sending again instruction is got is added with already present time counting in BIOS ROM Device.
4. logger computer according to claim 3 truly start shooting service life system it is characterised in that:Described calculating Machine, in start or in the setting program of BIOS, shows that described computer uses front true start service life at this Device.
CN201310370104.7A 2013-08-22 2013-08-22 A kind of logger computer is truly started shooting the method and system of service life Expired - Fee Related CN103425567B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310370104.7A CN103425567B (en) 2013-08-22 2013-08-22 A kind of logger computer is truly started shooting the method and system of service life

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310370104.7A CN103425567B (en) 2013-08-22 2013-08-22 A kind of logger computer is truly started shooting the method and system of service life

Publications (2)

Publication Number Publication Date
CN103425567A CN103425567A (en) 2013-12-04
CN103425567B true CN103425567B (en) 2017-03-08

Family

ID=49650352

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310370104.7A Expired - Fee Related CN103425567B (en) 2013-08-22 2013-08-22 A kind of logger computer is truly started shooting the method and system of service life

Country Status (1)

Country Link
CN (1) CN103425567B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590444B (en) * 2018-07-24 2023-08-18 合肥联宝信息技术有限公司 Recording method and system for first use time of electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1740938A (en) * 2004-08-27 2006-03-01 英业达股份有限公司 Time management system and method
CN1940885A (en) * 2005-09-30 2007-04-04 联想(北京)有限公司 System and method for counting use time

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2085855A1 (en) * 2008-01-30 2009-08-05 Deutsche Thomson OHG Method for processing time values in a computer or programmable machine
CN201629130U (en) * 2009-12-17 2010-11-10 福建捷联电子有限公司 Video device with service time prompting function

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1740938A (en) * 2004-08-27 2006-03-01 英业达股份有限公司 Time management system and method
CN1940885A (en) * 2005-09-30 2007-04-04 联想(北京)有限公司 System and method for counting use time

Also Published As

Publication number Publication date
CN103425567A (en) 2013-12-04

Similar Documents

Publication Publication Date Title
JP3943665B2 (en) Sleep control method and event notification method
US8949638B2 (en) Embedded controller with an internal timer
CN103218033B (en) A kind of method and device waking hardware device up
AU2011336388B2 (en) Modular gating of microprocessor low-power mode
CN110069280B (en) Electronic device and firmware updating method thereof
WO2011063584A1 (en) Deep standby method and device for embedded system
TW201342032A (en) Connected standby sleep state
CN102866934A (en) Dormancy and wake-up system for embedded device based on non-volatile random access memory
US9423847B2 (en) Method and apparatus for transitioning a system to an active disconnect state
CN103823769A (en) Computer system and data recovery method
TWI522794B (en) Energy-efficient nonvolatile microprocessor
CN111506351A (en) Deep sleep method, wake-up method and sleep and wake-up method for system on chip
US10394307B2 (en) Information processing apparatus, information processing method, and program
CN103927145A (en) System hibernating and awakening method and device based on hybrid memory
TW515995B (en) Method allowing to configure computer system as wake on LAN
CN101149637A (en) Computer system electricity-saving state power management method
TWI420724B (en) Battery activation
CN103425567B (en) A kind of logger computer is truly started shooting the method and system of service life
CN101131606A (en) Palm PC standby time guarantee method
CN102541246B (en) Standby method based on dragon chip processor platform
US9332064B2 (en) Computer system and remote control method thereof
JP5279762B2 (en) Electronic device capable of reducing power consumption in power-off state and method for reducing power consumption
CN104205001A (en) Thermal sensor dynamic shutdown
CN103218031A (en) Electronic device and sleep method
TW201115321A (en) Electronic device and power management method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170308

Termination date: 20200822

CF01 Termination of patent right due to non-payment of annual fee