Skip to content

Commit 41ae56f

Browse files
authored
Log host architecture at start-up (#2135)
1 parent a8eed51 commit 41ae56f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

collector/collector.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ int main(int argc, char** argv) {
143143
CLOG(INFO) << "Collector Version: " << GetCollectorVersion();
144144
CLOG(INFO) << "OS: " << host_info.GetDistro();
145145
CLOG(INFO) << "Kernel Version: " << host_info.GetKernelVersion().GetRelease();
146+
CLOG(INFO) << "Architecture: " << host_info.GetKernelVersion().GetMachine();
146147

147148
initialChecks();
148149

collector/lib/HostInfo.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ struct KernelVersion {
117117
return release;
118118
}
119119

120+
// Same output as calling `uname -m` in the shell
121+
const std::string& GetMachine() {
122+
return machine;
123+
}
124+
120125
// the kernel version
121126
int kernel;
122127
// the kernel major version

0 commit comments

Comments
 (0)