Commit Graph

326 Commits

Author SHA1 Message Date
christos
32377daaf2 need <sys/stat.h> 2017-01-10 21:14:51 +00:00
mrg
0537635d0c for 64 bit mips platforms where we built userland largely as n32 by
default, build a handful of tools as n64 so they work properly.

unfortunately, they're also static as dynamic n64 has a problem.

of these tools pstat is probably the lowest hanging fruit to convert
to sysctl.  systat would be close were it not for the netstat screen,
which includes netstat itself.

the rest are difficult to perhaps foolish.


the upside is that netstat, pmap and fstat all work properly now.
2016-12-23 10:19:57 +00:00
mrg
15bdea6a19 add a basic "-b" option - that outputs one display and exits.
inspired by "top -b".  still requires a curses-capable output
without some fairly significant internal restructuring.
2016-12-03 03:26:27 +00:00
christos
4667eeb169 sysctlbyname is convenient, but ain't cheap. Cache it. 2016-10-24 00:40:17 +00:00
christos
8ff995f221 allow fractional intervals 2016-10-22 22:02:55 +00:00
christos
b31382fbd7 Avoid string gymnastics in an olympic year. 2016-08-05 07:22:17 +00:00
jakllsch
ccf7078d06 Make this build with clang:
- Remove unused static const variables
 - Adjust impossibleish comparision.
2016-08-04 12:56:31 +00:00
wiz
4ff383b44d Bump date for new ifstat command. 2016-08-03 13:09:43 +00:00
scole
6f3aa0fcd4 Add $NetBSD$ tag for new files 2016-08-02 17:53:46 +00:00
scole
bd7662dc4d PR bin/51204
Add ifstat command to systat.

Imported from FreeBSD
2016-08-02 15:56:09 +00:00
dholland
a4db6377a4 NetBSD does actually support flat-panel displays. Even for systat(1).
(noted by tnn)
2016-03-12 02:39:01 +00:00
christos
ffeb8dbf4e Define _KERNTYPES for things that need it. 2016-01-23 21:22:45 +00:00
mrg
ef363e2dc9 if you change display types, the "Showing %s, refresh every %d seconds."
message is retained, and you can't get rid of it.  since it's dispalyed
in inverse, it feels like there's always an error happening (which is
really what the code has -- the above string is displayed via the error()
function.)  for several types of key press that largely are just "redraw"
operation (space, ^L, etc.), clear the error string as well.
2015-08-23 18:33:15 +00:00
dennis
7ad3371ebc Update stats-keeping in sys/kern/vfs_cache.c to remove (most)
races while allowing consistent lockless sampling of the per-cpu
statistics without atomic operations.  Update comment describing
the locking protocol to include this.

These files were fumble-fingered out of the last commit.
2014-12-24 20:01:21 +00:00
njoly
e75f143af6 Remove fagile test which ensured that first namelist element (was
X_NCHSTATS) had a known type. Make disk stats available again for
vmstat display.
2014-06-20 07:08:15 +00:00
joerg
10aed88aaf GC X_NCHSTATS 2014-06-14 20:10:42 +00:00
joerg
deae2c9ba3 Always use_sysctl in preparation of removing all kvm code. 2014-06-03 22:22:41 +00:00
joerg
94adc2671a Provide sysctl for namecache statistics. 2014-06-03 21:16:15 +00:00
jdc
3db3d1f929 Restore lost break. 2014-03-08 20:51:20 +00:00
dsl
dc210c7fbd Remove some pointless inclusions os sys/user.h 2014-02-19 20:42:14 +00:00
mlelstv
ffb41b3a17 Fix fallout from circleq->tailq transition. 2013-11-24 13:13:12 +00:00
bad
8fd869ab61 Make :drives, :display, :ignore accept fnmatch(3) patterns to specify drives.
Bump man page date.
2013-10-18 22:42:31 +00:00
christos
6e28978d84 fix unused variable warnings 2013-10-18 20:47:06 +00:00
bad
87f2ce05f1 No David, '\?' is not the del character. Broken in rev 1.21.
XXX pullup-5, pullup-6.
2013-10-14 22:23:22 +00:00
christos
5c26317391 bufmem is unsigned. 2012-11-23 15:35:57 +00:00
pgoyette
a5f70a7bc1 Fix format string to resolve build break 2012-11-23 06:44:38 +00:00
christos
0f21b86617 use more sysctl 2012-11-23 03:47:36 +00:00
christos
06cfe04c08 fix wrong sysctl 2012-11-23 03:46:35 +00:00
christos
9a3978f67e use more sysctl 2012-11-23 03:37:27 +00:00
christos
abc21e6c39 use sysctl 2012-11-23 03:33:05 +00:00
christos
2696762d5f mbufs display was broken since the time we moved to percpu stats. 2012-11-23 01:43:10 +00:00
christos
f17f1ddf91 PR/47222: Manuel Bouyer: Fix syscall display to show something reasonable. 2012-11-23 00:05:18 +00:00
wiz
3957bea1ef Fix whitespace nits. Suggested by Bug Hunting. 2012-03-22 07:58:16 +00:00
drochner
86deb82572 kill ipsec support which hasn't been working for a long time
(neither for KAME nor for FAST_IPSEC)
2012-01-06 14:08:08 +00:00
joerg
96c339267b Consistently use __dead and __printflike. 2011-09-06 18:31:44 +00:00
christos
08c8290bd9 eliminate non-literal format strings. 2011-08-17 13:26:49 +00:00
njoly
ea02939c73 Add per process cache values to the total name translations count. 2010-04-30 16:21:05 +00:00
njoly
e7ebb0154e In vmstat display, add one more column to output memory values. Avoid
overflow with more than 100GB.
2010-04-30 13:49:22 +00:00
he
76d4444c78 When using -lcurses, you also need -lterminfo.
This fixes the build for sun2, and also builds with LDSTATIC=-static,
since archive libraries don't record inter-library dependencies.
2010-02-06 23:45:24 +00:00
dsl
ff86378d52 Allow display intervals > 25 seconds.
Fixes PR/36999
I did contemplate chaging curses - but the code is replicated and warped.
2009-11-04 21:46:24 +00:00
dsl
57843c1579 Correctly count number of chars output so that help isn't blank if the
terminal is too narrow.
Not ideal since the last command isn't shown on 80 column terminals.
2009-11-01 22:08:14 +00:00
wiz
467a0fa1ae Bump date for uarea swap-out removal. 2009-10-21 22:18:37 +00:00
rmind
40cf6f3659 Remove uarea swap-out functionality:
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
wiz
d5ecf43f6a Fix problems with SIGWINCH. From Paul Ripke in PR 42161. 2009-10-21 13:56:36 +00:00
apb
3e4a7fe1fe Don't assume that two identical-looking string literals will have the
same address and will therefore be comparable with the == operator.
Instead, use a const variable.
Inspired by PR 41255 from Kurt Lidl.
2009-07-14 21:08:31 +00:00
lukem
c1ceae17f0 Enable WARNS=4 by default for usr.bin, except for:
awk  bdes  checknr  compile_et  error  gss  hxtool  kgetcred  kinit
	klist  ldd  less  lex  locale  login  m4  man  menuc  mk_cmds
	mklocale  msgc  openssl  rpcgen  rpcinfo  sdiff  spell  ssh
	string2key  telnet  tn3270  verify_krb5_conf  xlint
2009-04-14 22:15:16 +00:00
lukem
e7a39c4fb6 Fix -Wsign-compare issues 2009-04-13 23:20:27 +00:00
mrg
fcc023545e - add new RLIMIT_AS (aka RLIMIT_VMEM) resource that limits the total
address space available to processes.  this limit exists in most other
modern unix variants, and like most of them, our defaults are unlimited.
remove the old mmap / rlimit.datasize hack.

- adds the VMCMD_STACK flag to all the stack-creation vmcmd callers.
it is currently unused, but was added a few years ago.

- add a pair of new process size values to kinfo_proc2{}. one is the
total size of the process memory map, and the other is the total size
adjusted for unused stack space (since most processes have a lot of
this...)

- patch sh, and csh to notice RLIMIT_AS.  (in some cases, the alias
RLIMIT_VMEM was already present and used if availble.)

- patch ps, top and systat to notice the new k_vm_vsize member of
kinfo_proc2{}.

- update irix, svr4, svr4_32, linux and osf1 emulations to support
this information.  (freebsd could be done, but that it's best left
as part of the full-update of compat/freebsd.)


this addresses PR 7897.  it also gives correct memory usage values,
which have never been entirely correct (since mmap), and have been
very incorrect since jemalloc() was enabled.

tested on i386 and sparc64, build tested on several other platforms.

thanks to many folks for feedback and testing but most espcially
chuq and yamt for critical suggestions that lead to this patch not
having a special ugliness i wasn't happy with anyway :-)
2009-03-29 01:02:48 +00:00
joerg
8929e0dce4 Don't workaround ancient macro argument limit with .Xo/.Xc. 2009-03-11 13:58:29 +00:00
njoly
90a93774af In vmstat display, increase software interrupt count output from 5 to
6 columns.
2009-03-09 19:48:02 +00:00