CN103425567A - Method and system for recording real startup service life of computer - Google Patents
Method and system for recording real startup service life of computer Download PDFInfo
- Publication number
- CN103425567A CN103425567A CN2013103701047A CN201310370104A CN103425567A CN 103425567 A CN103425567 A CN 103425567A CN 2013103701047 A CN2013103701047 A CN 2013103701047A CN 201310370104 A CN201310370104 A CN 201310370104A CN 103425567 A CN103425567 A CN 103425567A
- Authority
- CN
- China
- Prior art keywords
- computing machine
- bios
- computer
- time counting
- rdtsc
- 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.)
- Granted
Links
Images
Abstract
The invention discloses a method for recording real startup service life of a computer. The method comprises the following steps: during computer startup, transmitting an RDTSC (Read Time Stamp Counter) command after running to a specified code of a BIOS (Basic Input Output System); adding time count acquired by using the command with existing time count in a BISO ROM (Read Only Memory); when the computer attempts to enter a standby mode, or a hibernation mode or is turned off, executing a BISO ACPI (Advanced Configuration and Power Interface) code and transmitting SMI (Structure of Management Information); retransmitting a RDTSC command in an SMI processing producer; adding the time count acquired by using the retransmitted RDTSC command with the existing time count of the BIOS ROM. According to the method for recording real startup service life of the computer related to the invention, the real startup service life of the computer can be acquired.
Description
Technical field
The present invention relates to computing machine, relate in particular to a kind of method that logger computer is truly started shooting serviceable life.
Background technology
At present not method is obtained the true start serviceable life of computing machine after dispatching from the factory preferably.The user is guaranteed to keep in good repair computing machine, just with the invoice time, determines whether to arrive guarantee time.Such as, the guarantee period of a computing machine is decided to be 1 year, but in fact two kinds of users are arranged: a kind of is to use computing machine everyday, and frequency of utilization is quite high; Another kind is seldom to use computing machine, and it is different that the true serviceable life of these two computing machines, yes so.In the situation that obtain the true start serviceable life of computing machine, the maintenance cycle that can setting computer: subscriber computer or using the invoice time as the guarantee period, perhaps using and truly start shooting the life-span as the guarantee period, which arrives first, and just the guarantee period arrives at last.Automobile industry is to adopt similar guarantee period computing method.
In addition, the user, when buying computing machine, the true start service time owing to not knowing computing machine, tends to have a misgiving, and worries whether can buy others' machine of reprocessing.If can showing, computing machine true start serviceable life also can help the user to dispel misgivings.
ACPI (Advanced Configuration and Power Interface), i.e. ACPI.The ACPI following several modes that has been in operation:
S0: normal mode.
S1: standby mode, only have CPU to quit work, other equipment are still in powering state.
S2:CPU closes, and S1 is about the same.
S3: standby mode, after system is switched to this pattern, except internal memory, the power supply of other equipment of computer all will be interrupted, and only have internal memory to rely on electric power maintaining data (because internal memory is volatibility, as long as outage, data have not just had) wherein.When wishing to recover, just can directly return to the front state of standby like this.The not power consumption fully of this pattern for example, if therefore under holding state, power abnormal (having a power failure), just can only be started shooting so next time again, thus before standby not the data of preservation all can lose, but the resume speed of this pattern is the fastest.
S4: park mode, after system is switched to this pattern, system can automatically all dump to the data in internal memory on hard disk in a hibernation file, then cuts off the power supply to all devices.When recovering, system can directly be read in internal memory by the content of hibernation file from hard disk like this, and returns to the state before dormancy.Therefore the not power consumption fully of this pattern, be not afraid of abnormal electrical power supply after dormancy, but cost is to need one and physical memory hard drive space of a size (present hard disk has been crossed over the TB rank, and big capacity hard disk is more and more cheap).And the resume speed of this pattern is slower, depend on memory size and hard disk speed.
S5: shut down computer.
SMI:System Management Interrupt system management interrupt.
Summary of the invention
A kind of method that the object of the present invention is to provide logger computer truly to start shooting serviceable life, in order to obtain the true start serviceable life of computing machine, facilitate user and maintenance personal's inquiry.
For achieving the above object, the present invention proposes a kind of method that logger computer is truly started shooting serviceable life, the method comprises:
Computing machine, when start, runs to the appointment codes of BIOS, sends the RDTSC instruction;
Already present time counting addition in the time counting that above-mentioned instruction is got and BIOS ROM;
When computing machine attempts to enter stand-by/sleep mode or shutdown, carry out BIOS ACPI code, send system management interrupt, SMI;
In the SMI handling procedure, again send the RDTSC instruction;
Already present time counting addition in the time counting that above-mentioned RDTSC instruction of again sending is got and BIOS ROM.
The beneficial effect of the program of the present invention is can obtain by said method the true start serviceable life of computing machine, facilitates user and maintenance personal's inquiry.
Preferably, described computing machine, in when start or the setting program at BIOS, shows the true start serviceable life of described computing machine before this uses.
The invention allows for the system corresponding with such scheme:
The system that a kind of logger computer is truly started shooting serviceable life, this system comprises:
Computing machine, when start, runs to the appointment codes of BIOS, sends the device of RDTSC instruction;
The device of already present time counting addition in the time counting that above-mentioned instruction is got and BIOS ROM;
When computing machine attempts to enter stand-by/sleep mode or shutdown, carry out BIOS ACPI code, send system management interrupt, the device of SMI;
In the SMI handling procedure, again send the device of RDTSC instruction;
The device of already present time counting addition in the time counting that above-mentioned RDTSC instruction of again sending is got and BIOS ROM.
Preferably, in the setting program of described computing machine when start or at BIOS, show the true device of starting shooting serviceable life of described computing machine before this uses.
The present invention compared with prior art has following beneficial effect:
(1) subscriber computer or using the invoice time as the shelf-life, or using and truly start shooting serviceable life as the shelf-life, which arrives first, and just the shelf-life arrives at last.Automobile industry is to adopt similar shelf-life computing method.This can help the dealer when doing after sale service, better grasps the service condition of computer, reduces unnecessary maintenance.
(2) computing machine is in when start or in BIOS SETUP, the true start serviceable life of Display control computer before this uses, facilitates true start serviceable life of user and maintenance personal's query count machine.
(3) method involved in the present invention can promote a kind of computing machine environmental protection concept, and such as computing machine at night, during without work, not start the whole night, can be by computing machine in park mode.
The accompanying drawing explanation
Fig. 1 shows truly the start shooting process flow diagram of method in serviceable life of logger computer involved in the present invention.
Embodiment
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is described further.
The X86 of the Intel series microprocessor architecture of take is made an explanation to the specific embodiment of the present invention as example, and the CPU of X86 series all has a cpu instruction RDTSC, utilizes this RDTSC instruction can obtain the time counting of computer booting.
The time tag counter is read in the RDTSC instruction, as shown in table 1 below, by carrying out the RDTSC instruction, the currency of the time tag counter of CPU is loaded into to the EDX:EAX register.The time tag counter is included in 64 MSR registers.High 32 of the MSR register are loaded into the EDX register, and its low 32 are loaded into eax register.Per clock period of CPU increases progressively time tag counter MSR once, when cpu reset, it is reset to " 0 ".
Operational code | Instruction | Explanation |
0F31 | RDTSC | The time tag counter is read in to EDX:EAX |
Table 1 shows the RDTSC instruction
The RDTSC instruction is not the serializing instruction.Like this, before reading the time tag counter, it there is no need to wait all executeds of all instructions of front.Similarly, before carrying out read operation, the instruction of back also can start to carry out.
Concrete logger computer truly start shooting the method in serviceable life process flow diagram as shown in Figure 1, at first computing machine is when start or in the setting program (BIOS SETUP) at BIOS, the true start serviceable life of Display control computer before this uses, when computing machine is while using first, show " 0 ", do like this inquiry work that has facilitated user and maintenance personal, can clearly know the true start serviceable life of this computing machine before this uses, as shown in S101 in Fig. 1; When computer booting, run to the appointment codes of BIOS, will send the RDTSC instruction, start the time counting during BIOS starts to record this section thereby obtain this start of described computing machine, as shown in S102 in Fig. 1; Existing time counting addition in the time counting that above-mentioned RDTSC instruction is got and BIOS ROM, realize computing machine the cumulative of serviceable life of truly starting shooting, certainly, if described computing machine is to use for the first time, the time counter of BIOS ROM is 0, as shown in S103 in Fig. 1; To the OS stage, attempt to enter standby mode S1 or S3 in computer run, when park mode S4 or computing machine attempt to shut down S5, OS carries out BIOS ACPI code, will send SMI, as shown in S104 in Fig. 1; In the SMI handling procedure, can again send the RDTSC instruction, start to be recorded to described computing machine from BIOS and enter standby mode S1 or S3 thereby get described computing machine, the time counting during this section that park mode S4 or computing machine are attempted to shut down before S5, as shown in S105 in Fig. 1; Existing time counting addition in the time counting that above-mentioned RDTSC instruction is got and BIOS ROM, can constantly update true start serviceable life of this computing machine, as shown in S106 in Fig. 1.It should be noted that, if the user need to upgrade BIOS ROM, the time counter in BIOS ROM must retain so, cannot be reset.
Claims (4)
1. the method that logger computer is truly started shooting serviceable life, is characterized in that, the method comprises:
Computing machine, when start, runs to the appointment codes of BIOS, sends the RDTSC instruction;
Already present time counting addition in the time counting that above-mentioned instruction is got and BIOS ROM;
When computing machine attempts to enter stand-by/sleep mode or shutdown, carry out BIOS ACPI code, send system management interrupt, SMI;
In the SMI handling procedure, again send the RDTSC instruction;
Already present time counting addition in the time counting that above-mentioned RDTSC instruction of again sending is got and BIOS ROM.
2. the method that logger computer according to claim 1 is truly started shooting serviceable life is characterized in that: described computing machine, in when start or the setting program at BIOS, shows the true start serviceable life of described computing machine before this uses.
3. the system that logger computer is truly started shooting serviceable life, is characterized in that, this system comprises:
Computing machine, when start, runs to the appointment codes of BIOS, sends the device of RDTSC instruction;
The device of already present time counting addition in the time counting that above-mentioned instruction is got and BIOS ROM;
When computing machine attempts to enter stand-by/sleep mode or shutdown, carry out BIOS ACPI code, send system management interrupt, the device of SMI;
In the SMI handling procedure, again send the device of RDTSC instruction;
The device of already present time counting addition in the time counting that above-mentioned RDTSC instruction of again sending is got and BIOS ROM.
4. the system that logger computer according to claim 3 is truly started shooting serviceable life is characterized in that: in the setting program of described computing machine when start or at BIOS, show the true device of starting shooting serviceable life of described computing machine before this uses.
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 true CN103425567A (en) | 2013-12-04 |
CN103425567B 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) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113590444A (en) * | 2018-07-24 | 2021-11-02 | 合肥联宝信息技术有限公司 | Method and system for recording first use time of electronic equipment |
Citations (4)
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 |
US20090193282A1 (en) * | 2008-01-30 | 2009-07-30 | Eduard Siemens | 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 |
-
2013
- 2013-08-22 CN CN201310370104.7A patent/CN103425567B/en not_active Expired - Fee Related
Patent Citations (4)
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 |
US20090193282A1 (en) * | 2008-01-30 | 2009-07-30 | Eduard Siemens | 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 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113590444A (en) * | 2018-07-24 | 2021-11-02 | 合肥联宝信息技术有限公司 | Method and system for recording first use time of electronic equipment |
CN113590444B (en) * | 2018-07-24 | 2023-08-18 | 合肥联宝信息技术有限公司 | Recording method and system for first use time of electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN103425567B (en) | 2017-03-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109739563B (en) | Terminal control method, device, system and storage medium | |
EP2581826B1 (en) | Method and device for cold starting android mobile terminal | |
US8028177B2 (en) | Method for changing power states of a computer | |
US9367446B2 (en) | Computer system and data recovery method for a computer system having an embedded controller | |
CN110069280B (en) | Electronic device and firmware updating method thereof | |
US8949638B2 (en) | Embedded controller with an internal timer | |
US20120284551A1 (en) | Deep standby method and device for embedded system | |
AU2011336388B2 (en) | Modular gating of microprocessor low-power mode | |
CN101620539A (en) | Method for start-up and shutdown and computer | |
CN102866934A (en) | Dormancy and wake-up system for embedded device based on non-volatile random access memory | |
US9619015B2 (en) | Implementing a power off state in a computing device | |
CN111506351A (en) | Deep sleep method, wake-up method and sleep and wake-up method for system on chip | |
CN102736928B (en) | Fast wake-up computer system method and computer system | |
CN103927145A (en) | System hibernating and awakening method and device based on hybrid memory | |
US7240189B2 (en) | Fast resume to normal operation of a computer in a power saving mode | |
US8725962B2 (en) | Device and method for rewriting main memory data | |
CN102810007B (en) | A kind of computer mode conversion method, device and computing machine | |
CN102541246B (en) | Standby method based on dragon chip processor platform | |
US9652259B2 (en) | Apparatus and method for managing register information in a processing system | |
CN102566738B (en) | A kind of starting-up method of server system and server system | |
CN103150288A (en) | SOC achieving quick start-up and realization method of SOC | |
CN101436097B (en) | Electronic device and wake-up method thereof | |
CN103425567A (en) | Method and system for recording real startup service life of computer | |
US9329920B2 (en) | Supervisor system resuming control | |
CN102999734B (en) | A kind of computing machine term of life limits method and system |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20170308 Termination date: 20200822 |