Method and apparatus for collecting data of computing apparatus
Provided are a method and device for collecting data of a computing device. The method of collecting data of a computing device includes, in response to a reset of the computing device, determining whether the reset corresponds to a warm reset, based on the reset corresponding to the warm reset, loading error dump data, generating and storing extended error dump data based on the error dump data, and loading a kernel, and initializing the error dump data, wherein the error dump data is recorded in volatile memory, and the extended error dump data is stored in non-volatile memory.
1 . A method of collecting data of a computing device, the method comprising:
in response to a reset of the computing device, determining whether the reset corresponds to a warm reset;
based on the reset corresponding to the warm reset, loading error dump data;
generating extended error dump data based on the error dump data, storing the generated extended error dump data, and loading a kernel; and
initializing the error dump data,
wherein the error dump data is data that has been recorded in volatile memory, and
the extended error dump data is stored in non-volatile memory, and
the method further comprising:
based on a new reset occurring,
determining whether the new reset is a scheduled reset;
based on the new reset being the scheduled reset, generating and recording the error dump data without a call trace, and based on the new reset being an unscheduled reset, identifying whether the call trace is feasible; and
based on the call trace being feasible, generating and recording the error dump data based on the call trace, and
wherein whether the reset corresponds to the warm reset is determined by verifying validity of data in a reserved region of the volatile memory, and
wherein the validity of the data in the reserved region of the volatile memory is verified based on a key value of preserved data.
2 . The method of claim 1 , wherein the storing of the extended error dump data comprises storing a log from a bootloader.
3 . The method of claim 1 , further comprising:
determining whether the reset corresponds to a cold reset; and
in response to the reset corresponding to the cold reset, generating the error dump data based on a cause of the reset, a date of the reset, a time of the reset, and temperature information.
4 . The method of claim 1 , wherein whether the reset corresponds to the warm reset is determined by verifying validity of data in a reserved region of the volatile memory.
5 . The method of claim 3 , wherein whether the reset is the cold reset is determined based on a reset-reason-register.
6 . The method of claim 1 , further comprising:
based on a snap trigger, which is for obtaining a state of the computing device, receiving the snap trigger;
in response to the snap trigger, generating and recording the error dump data based on the state of the computing device; and
generating and storing the extended error dump data based on the error dump data.
7 . A device for collecting data of a computing device, the device comprising:
memory storing at least one program; and
a processor configured to execute the at least one program to,
in response to a reset of the computing device, determine whether the reset corresponds to a warm reset,
based on the reset corresponding to the warm reset, load error dump data,
generate extended error dump data based on the error dump data, store the generated extended error dump data, and load a kernel, and
initialize the error dump data,
wherein the error dump data is data that has been recorded in volatile memory, and
the extended error dump data is stored in non-volatile memory, and
the processor further configured to, based on a new reset occurring,
determine whether the new reset is a scheduled reset,
based on the new reset being the scheduled reset, generate and record the error dump data without a call trace, and based on the new reset being an unscheduled reset, identify whether the call trace is feasible, and
based on the call trace being feasible, generate and record the error dump data based on the call trace, and
wherein whether the reset corresponds to the warm reset is determined by verifying validity of data in a reserved region of the volatile memory, and
wherein whether the validity of the data in the reserved region of the volatile memory is verified based on a key value of preserved data.
8 . A non-transitory computer-readable recording medium having recorded thereon a program for causing a computer to execute the method of claim 1 .