[go: up one dir, main page]

File: tpm2_readclock.1.md

package info (click to toggle)
tpm2-tools 5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,396 kB
  • sloc: ansic: 35,984; sh: 12,809; xml: 8,089; makefile: 569
file content (58 lines) | stat: -rw-r--r-- 1,643 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
% tpm2_readclock(1) tpm2-tools | General Commands Manual

# NAME

**tpm2_readclock**(1) - Retrieves the time information from the TPM.

# SYNOPSIS

**tpm2_readclock** [*OPTIONS*]

# DESCRIPTION

**tpm2_readclock**(1) -Reads the current TPMS\_TIME\_INFO structure from the
TPM. The structure contains the current setting of Time, Clock, resetCount, and
restartCount. The structure is output as YAML to stdout. The YAML output is
defined as:

```yaml
time: 13673142     # 64 bit value of time since last _TPM_Init or TPM2_Startup
                   # in ms.
clock_info:
  clock: 13673142  # 64 bit value of time TPM has been powered on in ms.
  reset_count: 0   # 32 bit value of the number of TPM Resets since the last
                   # TPM2_Clear.
  restart_count: 0 # 32 bit value of the number of times that TPM2_Shutdown or
                   # _TPM_Hash_Start have occurred since the last TPM Reset or
                   # TPM2_Clear.
  safe: yes        # boolean yes|no value that no value of Clock greater than
                   # the current value of Clock has been previously reported by
                   # the TPM.
```

This tool takes no arguments and no tool specific options.

## References

[common options](common/options.md) collection of common options that provide
information many users may expect.

[common tcti options](common/tcti.md) collection of options used to configure
the various known TCTI modules.

# EXAMPLES

## Read the clock
```bash
tpm2_readclock
time: 13673142
clock_info:
  clock: 13673142
  reset_count: 0
  restart_count: 0
  safe: yes
```

[returns](common/returns.md)

[footer](common/footer.md)