Request for testing - top 3.8b1 in the base system
pluknet
pluknet at gmail.com
Tue Oct 21 09:52:21 PDT 2008
2008/9/29 Jaakko Heinonen <jh at saunalahti.fi>:
> On 2008-09-28, Edwin Groothuis wrote:
>> > Swap: 3000M Total, 181M Used, 2819M Free, 6% Inuse
>> > sysctlnametomib: No such file or directory
>> >
>> > And no processes.
>>
>> I didn't expect it not to work on 6.x, I will play around with it
>> tomorrow to see if it makes sense.
>
> According to svn log kern.cp_times sysctl was added in r174070 and MFCd
> after 6.3/7.0 release.
>
As a simple workaround:
Index: top/freebsd-top-3.8b1-A/usr.bin/top/machine.c
===================================================================
--- top/freebsd-top-3.8b1-A/usr.bin/top/machine.c (revision 5702)
+++ top/freebsd-top-3.8b1-A/usr.bin/top/machine.c (working copy)
@@ -513,6 +513,12 @@
while (mp->name != NULL)
{
len = MAXMIBLEN;
+#if __FreeBSD_version < 604000
+ if (!strcmp(mp->name, "kern.cp_times")) {
+ mp++;
+ continue;
+ }
+#endif
if (sysctlnametomib(mp->name, mp->mib, &len) == -1)
{
message_error(" sysctlnametomib: %s", strerror(errno));
--
wbr,
pluknet
More information about the freebsd-stable
mailing list