鉴于livepatch客户端是专有的,我没有完整的答案。
也就是说,客户端(/snap/canonical-livepatch/*/canonical-livepatchd
)是用Go编写的。使用Delve进行调试,下面是一些信息:
(dlv) bt
0 0x00000000006ad140 in main.(*client).check
at /home/c/Canonical/go/livepatch/src/github.com/CanonicalLtd/livepatch-client/parts/canonical-livepatch/build/daemon/client.go:212
1 0x00000000006acfeb in main.(*client).Check
at /home/c/Canonical/go/livepatch/src/github.com/CanonicalLtd/livepatch-client/parts/canonical-livepatch/build/daemon/client.go:200
2 0x00000000006b8415 in main.refresh
at /home/c/Canonical/go/livepatch/src/github.com/CanonicalLtd/livepatch-client/parts/canonical-livepatch/build/daemon/refresh.go:60
3 0x00000000006bf957 in main.newDaemon.func1
at /home/c/Canonical/go/livepatch/src/github.com/CanonicalLtd/livepatch-client/parts/canonical-livepatch/build/daemon/daemon.go:76
4 0x00000000006b86a3 in main.(*refreshLoop).loop
at /home/c/Canonical/go/livepatch/src/github.com/CanonicalLtd/livepatch-client/parts/canonical-livepatch/build/daemon/refresh.go:120
5 0x00000000006c0bfd in main.(*service).Start.func1
at /home/c/Canonical/go/livepatch/src/github.com/CanonicalLtd/livepatch-client/parts/canonical-livepatch/build/daemon/service.go:151
6 0x0000000000457b31 in runtime.goexit
at /home/c/.gobrew/versions/1.10/src/runtime/asm_amd64.s:2361
(dlv) locals
rendered.cap = 0
rendered.len = 0
rendered.ptr = *uint8 nil
status = main.ClientStatus {ClientVersion: "8.0.1", MachineId: "bfcf169468f641528ac653c41ff1797d", MachineToken: "",...+7 more}
(dlv) print status
main.ClientStatus {
ClientVersion: "8.0.1",
MachineId: "bfcf169468f641528ac653c41ff1797d",
MachineToken: "",
Architecture: "x86_64",
CpuModel: "Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz",
LastCheck: time.Time {
wall: 0,
ext: 0,
loc: *time.Location nil,},
BootTime: time.Time {
wall: 0,
ext: 63662149770,
loc: *(*time.Location)(0x963f60),},
ApplyTime: time.Time {
wall: 0,
ext: 0,
loc: *time.Location nil,},
Uptime: 3472,
Kernels: []main.KernelStatus len: 1, cap: 1, [
(*main.KernelStatus)(0xc4201883c0),
],}
status
变量中的字段是:
- 客户端版本
- 机器ID(来自的值
/etc/machine-id
)
- 机器令牌(Ubuntu One令牌?)
- CPU模型和(OS?)架构
- 最后检查时间
- 启动时间(启动时间?)
- 应用时间(??-可能是何时应用上一次更新?)
- 正常运行时间
- 内核列表
引导时间和正常运行时间可以视为包含在统计信息和性能指标中。
同样,这是一个起点。随心所欲,并希望其他人可以提供更多确定的信息。
我如何确定传输更多的信号不会突然改变?
你不能 源代码不可用,快照会自动刷新,IIRC。