Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

report: split up osVersion and machine values #25755

Merged
merged 1 commit into from
Jan 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions src/node_report.cc
Original file line number Diff line number Diff line change
Expand Up @@ -426,22 +426,20 @@ static void PrintVersionInformation(JSONWriter* writer) {
if (uname(&os_info) >= 0) {
#ifdef _AIX
buf << os_info.sysname << " " << os_info.version << "." << os_info.release;
writer->json_keyvalue("osVersion", buf.str());
buf.flush();
#else
buf << os_info.sysname << " " << os_info.release << " " << os_info.version;
#endif /* _AIX */
writer->json_keyvalue("osVersion", buf.str());
buf.flush();
#endif
buf.str("");
buf << os_info.nodename << " " << os_info.machine;
writer->json_keyvalue("machine", buf.str());

const char* (*libc_version)();
*(reinterpret_cast<void**>(&libc_version)) =
dlsym(RTLD_DEFAULT, "gnu_get_libc_version");
if (libc_version != nullptr) {
writer->json_keyvalue("glibc", (*libc_version)());
}
buf << os_info.nodename << " " << os_info.machine;
writer->json_keyvalue("machine", buf.str());
buf.flush();
}
#endif
}
Expand Down