|
|
|
@ -223,7 +223,7 @@ void KSample::readSample()
|
|
|
|
|
"different file format than expected.\n"
|
|
|
|
|
"Maybe your version of the proc filesystem is "
|
|
|
|
|
"incompatible with supported versions. "
|
|
|
|
|
"Please contact the developer at http://bugs.kde.org/ who will try to sort this out.").arg(MEMINFO_NAME));
|
|
|
|
|
"Please contact the developer at http://bugs.trinitydesktop.org/ who will try to sort this out.").arg(MEMINFO_NAME));
|
|
|
|
|
l++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -309,7 +309,7 @@ void KSample::readSample()
|
|
|
|
|
fatal(i18n("Unable to find any entries for CPU statistics "
|
|
|
|
|
"in the 'kstat' library. Are you running a non-standard "
|
|
|
|
|
"version of Solaris?\n"
|
|
|
|
|
"Please contact the maintainer via http://bugs.kde.org/ who will try to sort this out."));
|
|
|
|
|
"Please contact the maintainer via http://bugs.trinitydesktop.org/ who will try to sort this out."));
|
|
|
|
|
|
|
|
|
|
sample.user = sample.nice = sample.kernel = sample.iowait = sample.idle = 0;
|
|
|
|
|
sample.stotal = sample.sfree = 0;
|
|
|
|
@ -324,7 +324,7 @@ void KSample::readSample()
|
|
|
|
|
kstat_read(kc, ksp, &cstat) == -1) // and read into buffer
|
|
|
|
|
fatal(i18n("Unable to read the CPU statistics entry "
|
|
|
|
|
"from the 'kstat' library. The diagnostics are '%1'.\n"
|
|
|
|
|
"Please contact the maintainer via http://bugs.kde.org/ who will try to sort this out.").arg(strerror(errno)));
|
|
|
|
|
"Please contact the maintainer via http://bugs.trinitydesktop.org/ who will try to sort this out.").arg(strerror(errno)));
|
|
|
|
|
|
|
|
|
|
// fields are: idle user kernel iowait (no nice info?)
|
|
|
|
|
sample.user += cstat.cpu_sysinfo.cpu[1] / sample.cpus;
|
|
|
|
@ -338,7 +338,7 @@ void KSample::readSample()
|
|
|
|
|
fatal(i18n("The number of CPUs appears to have changed at "
|
|
|
|
|
"very short notice, or the 'kstat' library returns "
|
|
|
|
|
"inconsistent results (%1 vs. %2 CPUs).\n"
|
|
|
|
|
"Please contact the maintainer via http://bugs.kde.org/ who will try to sort this out.").arg(sample.cpus).arg(cpus));
|
|
|
|
|
"Please contact the maintainer via http://bugs.trinitydesktop.org/ who will try to sort this out.").arg(sample.cpus).arg(cpus));
|
|
|
|
|
|
|
|
|
|
// availrmem = pages of core for user-proc ( == physmem - kernelmem)
|
|
|
|
|
// freemem = no of free pages
|
|
|
|
@ -350,7 +350,7 @@ void KSample::readSample()
|
|
|
|
|
fatal(i18n("Unable to read the memory statistics entry "
|
|
|
|
|
"from the 'kstat' library. The diagnostics are '%1'\n"
|
|
|
|
|
"You might want to contact the maintainer at "
|
|
|
|
|
"http://bugs.kde.org/ who will try to sort this out.").arg(strerror(errno)));
|
|
|
|
|
"http://bugs.trinitydesktop.org/ who will try to sort this out.").arg(strerror(errno)));
|
|
|
|
|
|
|
|
|
|
int i;
|
|
|
|
|
unsigned long physmem = 0, freemem = 0, availrmem = 0;
|
|
|
|
@ -378,7 +378,7 @@ void KSample::readSample()
|
|
|
|
|
if ((swapentries = swapctl(SC_GETNSWP, 0)) == -1)
|
|
|
|
|
fatal(i18n("Unable to determine the number of "
|
|
|
|
|
"swap spaces. The diagnostics are '%1'.\n"
|
|
|
|
|
"Please contact the maintainer at http://bugs.kde.org/ who will try to sort this out.").arg(strerror(errno)));
|
|
|
|
|
"Please contact the maintainer at http://bugs.trinitydesktop.org/ who will try to sort this out.").arg(strerror(errno)));
|
|
|
|
|
|
|
|
|
|
if (swapentries != 0) {
|
|
|
|
|
// 2* to get some space for padding??
|
|
|
|
@ -388,7 +388,7 @@ void KSample::readSample()
|
|
|
|
|
fatal(i18n("KTimeMon ran out of memory while "
|
|
|
|
|
"trying to determine the swap usage.\n"
|
|
|
|
|
"Attempted to allocate %1 bytes of memory (2 * %2 + %3 * %4).\n"
|
|
|
|
|
"Please contact the maintainer at http://bugs.kde.org/ who will try to sort this out.")
|
|
|
|
|
"Please contact the maintainer at http://bugs.trinitydesktop.org/ who will try to sort this out.")
|
|
|
|
|
.arg(2 * sizeof(int) + swapentries * sizeof(struct swapent))
|
|
|
|
|
.arg(sizeof(int)).arg(swapentries).arg(sizeof(struct swapent)));
|
|
|
|
|
|
|
|
|
@ -399,7 +399,7 @@ void KSample::readSample()
|
|
|
|
|
if ((swapentries = swapctl(SC_LIST, stbl)) == -1)
|
|
|
|
|
fatal(i18n("Unable to determine the swap usage.\n"
|
|
|
|
|
"The diagnostics are '%1'.\n"
|
|
|
|
|
"Please contact the maintainer at http://bugs.kde.org/ who will try to sort this out.").arg(strerror(errno)));
|
|
|
|
|
"Please contact the maintainer at http://bugs.trinitydesktop.org/ who will try to sort this out.").arg(strerror(errno)));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!warned && swapentries != stbl->swt_n) {
|
|
|
|
@ -407,7 +407,7 @@ void KSample::readSample()
|
|
|
|
|
nonfatal(i18n("Information was requested for "
|
|
|
|
|
"%1 swap spaces, but only %2 swap entries were returned.\n"
|
|
|
|
|
"KTimeMon will attempt to continue.\n"
|
|
|
|
|
"Please contact the maintainer at http://bugs.kde.org/ who will try to sort this out.").arg(stbl->swt_n).arg(swapentries));
|
|
|
|
|
"Please contact the maintainer at http://bugs.trinitydesktop.org/ who will try to sort this out.").arg(stbl->swt_n).arg(swapentries));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < swapentries; i++) {
|
|
|
|
|