1.1 --- a/src/os/bsd/vm/os_bsd.cpp Tue May 15 15:16:14 2012 -0700 1.2 +++ b/src/os/bsd/vm/os_bsd.cpp Thu May 10 15:44:19 2012 +0200 1.3 @@ -2340,93 +2340,21 @@ 1.4 #endif 1.5 } 1.6 1.7 +void os::print_os_info_brief(outputStream* st) { 1.8 + st->print("Bsd"); 1.9 + 1.10 + os::Posix::print_uname_info(st); 1.11 +} 1.12 1.13 void os::print_os_info(outputStream* st) { 1.14 st->print("OS:"); 1.15 - 1.16 - // Try to identify popular distros. 1.17 - // Most Bsd distributions have /etc/XXX-release file, which contains 1.18 - // the OS version string. Some have more than one /etc/XXX-release file 1.19 - // (e.g. Mandrake has both /etc/mandrake-release and /etc/redhat-release.), 1.20 - // so the order is important. 1.21 - if (!_print_ascii_file("/etc/mandrake-release", st) && 1.22 - !_print_ascii_file("/etc/sun-release", st) && 1.23 - !_print_ascii_file("/etc/redhat-release", st) && 1.24 - !_print_ascii_file("/etc/SuSE-release", st) && 1.25 - !_print_ascii_file("/etc/turbobsd-release", st) && 1.26 - !_print_ascii_file("/etc/gentoo-release", st) && 1.27 - !_print_ascii_file("/etc/debian_version", st) && 1.28 - !_print_ascii_file("/etc/ltib-release", st) && 1.29 - !_print_ascii_file("/etc/angstrom-version", st)) { 1.30 - st->print("Bsd"); 1.31 - } 1.32 - st->cr(); 1.33 - 1.34 - // kernel 1.35 - st->print("uname:"); 1.36 - struct utsname name; 1.37 - uname(&name); 1.38 - st->print(name.sysname); st->print(" "); 1.39 - st->print(name.release); st->print(" "); 1.40 - st->print(name.version); st->print(" "); 1.41 - st->print(name.machine); 1.42 - st->cr(); 1.43 - 1.44 -#ifndef _ALLBSD_SOURCE 1.45 - // Print warning if unsafe chroot environment detected 1.46 - if (unsafe_chroot_detected) { 1.47 - st->print("WARNING!! "); 1.48 - st->print_cr(unstable_chroot_error); 1.49 - } 1.50 - 1.51 - // libc, pthread 1.52 - st->print("libc:"); 1.53 - st->print(os::Bsd::glibc_version()); st->print(" "); 1.54 - st->print(os::Bsd::libpthread_version()); st->print(" "); 1.55 - if (os::Bsd::is_BsdThreads()) { 1.56 - st->print("(%s stack)", os::Bsd::is_floating_stack() ? "floating" : "fixed"); 1.57 - } 1.58 - st->cr(); 1.59 -#endif 1.60 - 1.61 - // rlimit 1.62 - st->print("rlimit:"); 1.63 - struct rlimit rlim; 1.64 - 1.65 - st->print(" STACK "); 1.66 - getrlimit(RLIMIT_STACK, &rlim); 1.67 - if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); 1.68 - else st->print("%uk", rlim.rlim_cur >> 10); 1.69 - 1.70 - st->print(", CORE "); 1.71 - getrlimit(RLIMIT_CORE, &rlim); 1.72 - if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); 1.73 - else st->print("%uk", rlim.rlim_cur >> 10); 1.74 - 1.75 - st->print(", NPROC "); 1.76 - getrlimit(RLIMIT_NPROC, &rlim); 1.77 - if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); 1.78 - else st->print("%d", rlim.rlim_cur); 1.79 - 1.80 - st->print(", NOFILE "); 1.81 - getrlimit(RLIMIT_NOFILE, &rlim); 1.82 - if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); 1.83 - else st->print("%d", rlim.rlim_cur); 1.84 - 1.85 -#ifndef _ALLBSD_SOURCE 1.86 - st->print(", AS "); 1.87 - getrlimit(RLIMIT_AS, &rlim); 1.88 - if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); 1.89 - else st->print("%uk", rlim.rlim_cur >> 10); 1.90 - st->cr(); 1.91 - 1.92 - // load average 1.93 - st->print("load average:"); 1.94 - double loadavg[3]; 1.95 - os::loadavg(loadavg, 3); 1.96 - st->print("%0.02f %0.02f %0.02f", loadavg[0], loadavg[1], loadavg[2]); 1.97 - st->cr(); 1.98 -#endif 1.99 + st->print("Bsd"); 1.100 + 1.101 + os::Posix::print_uname_info(st); 1.102 + 1.103 + os::Posix::print_rlimit_info(st); 1.104 + 1.105 + os::Posix::print_load_average(st); 1.106 } 1.107 1.108 void os::pd_print_cpu_info(outputStream* st) {