Re: svn commit: r326073 - head/usr.bin/systat

2017-11-24 Thread Bruce Evans
On Fri, 24 Nov 2017, Konstantin Belousov wrote: On Sat, Nov 25, 2017 at 12:14:10AM +1100, Bruce Evans wrote: * ... Hmm, I couldn't find any arch with even a compile-time variable PAGE_SIZE. It is currently just unportable in theory to use hard-coded PAGE_SIZE or macros that use it. sparc64 use

Re: svn commit: r326073 - head/usr.bin/systat

2017-11-24 Thread Bruce Evans
On Fri, 24 Nov 2017, Konstantin Belousov wrote: On Fri, Nov 24, 2017 at 08:15:06PM +1100, Bruce Evans wrote: On Thu, 23 Nov 2017, Konstantin Belousov wrote: * ... #define pgtok(p)((uintmax_t)(p) * pageKilo) Amusingly there is already MD macro in machine/param.h with the same name and

Re: svn commit: r326073 - head/usr.bin/systat

2017-11-24 Thread Konstantin Belousov
On Sat, Nov 25, 2017 at 12:14:10AM +1100, Bruce Evans wrote: > On Fri, 24 Nov 2017, Konstantin Belousov wrote: > > > On Fri, Nov 24, 2017 at 08:15:06PM +1100, Bruce Evans wrote: > >> On Thu, 23 Nov 2017, Konstantin Belousov wrote: > >* ... > #define pgtok(p)((uintmax_t)(p) * pageKilo

Re: svn commit: r326073 - head/usr.bin/systat

2017-11-24 Thread Konstantin Belousov
On Fri, Nov 24, 2017 at 08:15:06PM +1100, Bruce Evans wrote: > On Thu, 23 Nov 2017, Konstantin Belousov wrote: > > > On Fri, Nov 24, 2017 at 12:10:09AM +1100, Bruce Evans wrote: > >> On Thu, 23 Nov 2017, Konstantin Belousov wrote: > >* ... > >>> Below is the cast to uintmax_t and unsigned format f

Re: svn commit: r326073 - head/usr.bin/systat

2017-11-24 Thread Bruce Evans
On Thu, 23 Nov 2017, Konstantin Belousov wrote: On Fri, Nov 24, 2017 at 12:10:09AM +1100, Bruce Evans wrote: On Thu, 23 Nov 2017, Konstantin Belousov wrote: * ... Below is the cast to uintmax_t and unsigned format for sysctl(8). This adds style bugs by expanding lines from length 79 to 81.

Re: svn commit: r326073 - head/usr.bin/systat

2017-11-23 Thread Konstantin Belousov
On Fri, Nov 24, 2017 at 12:10:09AM +1100, Bruce Evans wrote: > On Thu, 23 Nov 2017, Konstantin Belousov wrote: > > > On Thu, Nov 23, 2017 at 04:24:13AM +1100, Bruce Evans wrote: > >> sysctl/sysctl.c: > >>sysctl(8) has bogus support for prettyprinting struct vmtotal (sysctl > >>shouldn't ha

Re: svn commit: r326073 - head/usr.bin/systat

2017-11-23 Thread Bruce Evans
On Thu, 23 Nov 2017, Konstantin Belousov wrote: On Thu, Nov 23, 2017 at 04:24:13AM +1100, Bruce Evans wrote: sysctl/sysctl.c: sysctl(8) has bogus support for prettyprinting struct vmtotal (sysctl shouldn't have any prettyprinting, especially not for structs that have specialized progra

Re: svn commit: r326073 - head/usr.bin/systat

2017-11-22 Thread Konstantin Belousov
On Thu, Nov 23, 2017 at 04:24:13AM +1100, Bruce Evans wrote: > sysctl/sysctl.c: >sysctl(8) has bogus support for prettyprinting struct vmtotal (sysctl >shouldn't have any prettyprinting, especially not for structs that have >specialized programs to print them and much more). This uses

Re: svn commit: r326073 - head/usr.bin/systat

2017-11-22 Thread Bruce Evans
On Wed, 22 Nov 2017, Konstantin Belousov wrote: On Wed, Nov 22, 2017 at 08:59:21AM +1100, Bruce Evans wrote: On Tue, 21 Nov 2017, Konstantin Belousov wrote: Log: systat: use and correctly display 64bit counters. ... Using unsigned types gives sign extension bugs as usual. In old versions .

Re: svn commit: r326073 - head/usr.bin/systat

2017-11-22 Thread Konstantin Belousov
On Wed, Nov 22, 2017 at 08:59:21AM +1100, Bruce Evans wrote: > On Tue, 21 Nov 2017, Konstantin Belousov wrote: > > > Log: > > systat: use and correctly display 64bit counters. > > > > Following struct vmtotal changes, make systat use and correctly > > display 64-bit counters. Switch to humaniz

Re: svn commit: r326073 - head/usr.bin/systat

2017-11-21 Thread Bruce Evans
On Tue, 21 Nov 2017, Konstantin Belousov wrote: Log: systat: use and correctly display 64bit counters. Following struct vmtotal changes, make systat use and correctly display 64-bit counters. Switch to humanize_number(3) to overcome homegrown arithmetics limits in pretty printing large num