Age | Commit message (Collapse) | Author |
|
OK deraadt
|
|
The values should be displayed as-is and not normalized based on
the sleep interval. From Anindya Mukherjee
|
|
fails to report the path that the failure occured on. Suggested by
deraadt@ after some tech discussion.
Work done and verified by Ashton Fagg <ashton@fagg.id.au>
ok deraadt@ semarie@ claudio@
|
|
Both usleep() and ualarm() are obsolete and were removed from POSIX.
OK deraadt@
|
|
Specifically this effects ^G, help and order.
While here also document the 'h' character.
Initial inspiration and diff from Anindya Mukherjee (anindya49 <at> hotmail
<dot> com)
OK bluhm@
|
|
to avoid leaking the current help text.
from Anindya Mukherjee
|
|
the user when an invalid value is entered instead of silently falling back
to the default 5s.
While here I also capped the upper limit to UINT32_MAX / 1000000 to prevent
useconds_t overflow. This hard limits us to 4294s, instead of the current
soft limit which just make systat go berserk if you go over it.
Reported and original diff by Nick Gasson nick <at> nickg <dot> me <dot> uk
OK cheloha@
Tweaks and OK bluhm@
|
|
-fno-common
ok deraadt@
|
|
|
|
"makes sense" jmatthew@
|
|
NOTES stays unused unless pf.conf(5) contains "set loginterface ..." in
which case it merely amends what can otherwise be part of the NAME column.
Merge the constant NOTES values for conditional counters into their NAME
values to make the "pf" view look a little nicer and less empty by default;
this also saves screen estate for possible future changes, e.g. we could
increase column widths.
OK tobhe
|
|
used by the processor chip. Although we have a SENSOR_WATTHOUR sensor
type its units are not really suitable for this sensor. So add a
SENSOR_ENERGY type that uses micro Joules as its unit.
ok deraadt@
|
|
OK jmc
|
|
Suspending systat with ^Z is done by the shell iff job control is enabled,
not systat itself.
Try "set +m" to disable job control or start systat in a terminal without a
shell, e.g. "xterm -e systat", to confirm ^Z doing nothing in these cases.
OK jmc
|
|
useful if you're looking at a nic with a lot of different rings.
|
|
In pf(4), the pf_status.since timestamp is set with time_uptime(9).
This is a low-res snapshot of nanouptime(9). nanouptime(9) is used to
implement CLOCK_BOOTTIME for clock_gettime(2). It is not used to
implement CLOCK_UPTIME, though. The names are misleading.
Switch to CLOCK_BOOTTIME in places in userspace where we use
pf_status.since so we are working with the right clock.
Technically CLOCK_MONOTONIC is equivalent, but we shouldn't use that
here. CLOCK_MONOTONIC is not necessarily the "time since boot": the
standard says its absolute value is meaningless.
ok patrick@ bluhm@
|
|
Prompted by a question from schwarze@
ok deraadt@, schwarze@, visa@
|
|
found with mandoc -Tlint
|
|
patch from <clematis at insiberia dot net>
|
|
Change several instances, most of them to the usual -width Ds.
|
|
OK stsp@ and bluhm@
|
|
|
|
This is the userland portion. OK deraadt@ sashan@
|
|
in these 3 related programs (they borrow parts of each other using .PATH)
Hopefully no regressions, ktrace checks by myself and mestre
|
|
ok millert@ kurt@
code suggested by otto@
|
|
|
|
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
|
|
users.
OK deraadt@, sashan@
|
|
ok beck deraadt
|
|
by default qdrops and errors are combined in a number of failures.
the qdrops and errors can be viewed separately by using 'd' and 'e'
respectively, or the combined view again with 'f'.
ok claudio@ deraadt@
|
|
|
|
pfioc_src_nodes to size_t. This avoids integer truncation by casts
to unsigned. As the types of DIOCGETSTATES and DIOCGETSRCNODES
ioctl(2) arguments change, pfctl(8) and systat(1) should be updated
together with the kernel. Calculate number of pf(4) states as
size_t in userland.
OK sashan@ deraadt@
|
|
reported by Bryan Linton
|
|
ok millert mpi
|
|
Change distance sensor type to be displayed as meters with 3 decimals
instead of millimeters.
ok mpi@ kettenis@
|
|
Because of hw.smt we need a way to determine whether a given CPU is "online"
or "offline" from userspace. KERN_CPTIME2 is an array, and so cannot be
cleanly extended for this purpose, so add a new sysctl(2) KERN_CPUSTATS
with an extensible struct. At the moment it's just KERN_CPTIME2 with a
flags member, but it can grow as needed.
KERN_CPUSTATS appears to have been defined by BSDi long ago, but there are
few (if any) packages in the wild still using the symbol so breakage in ports
should be near zero. No other system inherited the symbol from BSDi, either.
Then, use the new sysctl(2) in systat(1) and top(1):
- systat(1) draws placeholder marks ('-') instead of percentages for
offline CPUs in the cpu view.
- systat(1) omits offline CPU ticks when drawing the "big bar" in
the vmstat view. The upshot is that the bar isn't half idle when
half your logical CPUs are disabled.
- top(1) does not draw lines for offline CPUs; if CPUs toggle on or
offline in interactive mode we redraw the display to expand/reduce
space for the new/missing CPUs. This is consistent with what some
top(1) implementations do on Linux.
- top(1) omits offline CPUs from the totals when CPU totals are
combined into a single line (the '-1' flag).
Originally prompted by deraadt@. Discussed endlessly with deraadt@,
ketennis@, and sthen@. Tested by jmc@ and jca@. Earlier versions also
discussed with jca@. Earlier versions tested by jmc@, tb@, and many
others.
docs ok jmc@, kernel bits ok ketennis@, everything ok sthen@,
"Is your stuff in yet?" deraadt@
|
|
ok kettenis deraadt
|
|
This lets userspace distinguish between idle CPUs and those that are
not schedulable because hw.smt=0.
A subsequent commit probably needs to add documentation for this
to sysctl.2 (and perhaps elsewhere) after the dust settles.
Also included here are changes to systat(1) and top(1) that account
for the ENODEV case and adjust behavior accordingly:
- systat(1)'s cpu view prints placeholder marks ('-') instead of
percentages for each state if the given CPU is offline.
- systat(1)'s vmstat view checks for offline CPUs when computing the
machine state total and excludes them, so the CPU usage graph
only represents the states for online CPUs.
- top(1) does not draw CPU rows for offline CPUs when the view is
redrawn. If CPUs "go offline", percentages for each state are
replaced by placeholder marks ('-'); the view will need to be
redrawn to remove these rows. If CPUs "go online" the view will
need to be redrawn to show these new CPUs. In "combined CPU" mode,
the count and the state totals only represent online CPUs.
Ports using KERN_CPTIME2 will need to be updated. The changes
described above to make systat(1) and top(1) aware of the ENODEV
case *and* gracefully handle a changing HW_NCPUONLINE while the
application is running are not necessarily appropriate for each
and every port.
The changes described above are so extensive in part to demonstrate
one way a program *might* be made robust to changing CPU availability.
In particular, changing hw.smt after boot is an extremely rare event,
and this needs to be weighed when updating ports.
The logic needed to account for the KERN_CPTIME2 ENODEV case is
very roughly:
if (sysctl(...) == -1) {
if (errno != ENODEV) {
/* Actual error occurred. */
} else {
/* CPU is offline. */
}
} else {
/* CPU is online and CPU states were set by sysctl(2). */
}
Prompted by deraadt@. Basic idea for ENODEV from kettenis@. Discussed at
length with kettenis@. Additional testing by tb@.
No complaints from hackers@ after a week.
ok kettenis@, "I think you should commit [now]" deraadt@
|
|
returning const char *.
|
|
Noted by jca, thanks.
OK jca claudio
|
|
from Marcus MERIGHI; OK deraadt@ jmc@
|
|
from marcus merighi
ok benno
|
|
displayed lines. Makes vmstat view in tall windows easier to read.
ok sthen@
|
|
removing unused uvmexp fields. Reduces number of lines as well.
|
|
|
|
unusedNN.
Missing man page bits pointed out by
jmc@. Ports source scan by sthen@.
ok deraadt@ guenther@
|
|
OK krw@
|
|
|
|
Feedbacks, tweaks, ok bluhm@
|
|
a busy machine would look idle. As %Nic does not fit in the columns,
add it to %Usr. Introduce @ for spinning time to keep the characters
people are used to. Put %Spn between %Int and %Sys like in top.
OK visa@ mpi@
|