joerg
deae2c9ba3
Always use_sysctl in preparation of removing all kvm code.
2014-06-03 22:22:41 +00:00
christos
0f21b86617
use more sysctl
2012-11-23 03:47:36 +00:00
joerg
96c339267b
Consistently use __dead and __printflike.
2011-09-06 18:31:44 +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
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
98e5374ccb
Remove the \n and tabs from the __COPYRIGHT() strings.
...
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
thorpej
f2bff8adc3
Use sysctl to fetch network statistics unless a memory file is specified
...
on the command line.
2008-04-10 17:14:25 +00:00
christos
5665eef11f
don't call curses from a signal handler!
2007-12-31 00:22:13 +00:00
christos
8a3920f2c8
use c99 initializers
...
consistently terminate nlist arrays with NULL not ""
2006-10-22 16:43:24 +00:00
dsl
019733f61e
WARNS=3
2005-02-26 22:12:33 +00:00
dsl
cf09d2b1ce
Add (unsigned char) cast to ctype functions
...
Although, IIRC, there is another PR on all commands being converted to
lower case.
2004-11-04 07:18:47 +00:00
mycroft
eb8fd502d1
Using timeout() to control refresh gets rid of a whole pile of signal-related
...
lossage.
Making ungetch() signal-safe, as ncurses seems to, would be better, though.
2004-07-03 18:54:47 +00:00
mycroft
30aaa9067a
Use KEY_RESIZE. Might as well have something in our source tree that does.
2004-07-03 18:31:36 +00:00
agc
89aaa1bb64
Move UCB-licensed code from 4-clause to 3-clause licence.
...
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
jdolecek
ecb9302c7f
if kvm_nlist() fails, nlisterr() would be called before the screen
...
curses context would be initialized; just use errx() instead in this case
this fixes coredump for cases like 'systat -N /netbsd.gz', reported by Walt
on port-i386
in nlisterr(), wait a while (5 seconds currently) before exiting, so that
it would be actually possible to actually see the error
2003-08-03 12:14:58 +00:00
dsl
aaba6e7d29
No need to resizeterm() if size not changed.
...
On 'fg' just restore old screen contents.
2003-07-05 08:05:51 +00:00
dsl
31cb6aba03
Reinstate our STOP handler before curses installs its one.
...
Ensures that both handlers are executed on subsequent stops.
2003-05-28 20:17:14 +00:00
dsl
d616c663f8
Resize windows on SIGWINCH and restart from SIGTSTP
...
(approved by christos)
2003-02-10 23:59:48 +00:00
blymn
1318761243
Change deprecated curses function to new equivalent.
2001-12-06 12:40:51 +00:00
matt
74f8c3cccd
Fetch maxslp from the kernel. Only use USPACE if it's defined.
2001-07-14 07:09:11 +00:00
simonb
828483a73e
Remove extern variables and functions now declared in dkstats.h.
...
While here, remove 77 (!) unneed #includes.
2000-12-01 02:19:43 +00:00
hubertf
e80cff4760
Add "all" mode to systat to cycle between all modes,
...
sort of like VMS' "MONITOR ALL"-command.
Code was submitted by Jarkko Teppo <jate@uwasa.fi> in PR 10851,
cleaned up and added 'turns' handling by me.
2000-08-25 04:48:56 +00:00
ad
fc3915475d
- Add boot',
run', time' and
zero' commands to all IP displays. These work
...
as in the `vmstat' display mode. The default mode is now `time', not `boot'.
- ANSIfy.
- s@kre\(@vmstat\(@.
- __RCSID() police.
- Tweak inet.icmp display visual a little.
2000-07-05 11:03:20 +00:00
mycroft
981f9b7d7b
Use hline() and variants in a bunch of places.
2000-06-04 18:29:13 +00:00
jwise
ad285dbfbe
Two UI changes:
...
a.) restore the capability to enter a substring of a mode or command
name. Pointed out by Soren Jorvang.
b.) (capital) Q now exits systat immediately
2000-04-11 01:01:26 +00:00
itojun
96a8bc922e
add command line -n flag, which is same as "netstat numbers".
...
without it, we can't disable name resolution before the resolution starts.
2000-01-07 04:47:23 +00:00
jwise
5a69f1bd85
Block alarm signals while displaying -- there's no reason to allow recursive
...
display at all.
1999-12-20 21:04:41 +00:00
jwise
81ed25dba3
Knee-jerk snprintf()-ism.
1999-12-20 17:08:52 +00:00
jwise
4c0fbd4c92
Two things:
...
1.) fix a bug which caused coredumps when starting with no mode arguments
2.) move to table-lookup for mode-specific command parsing as well.
all command matching is now table-driven.
1999-12-20 03:45:01 +00:00
jwise
30af11dbd4
Sigh... this is the missing part of last night's final commit -- perform
...
the same simplification on mode parsing for the command line as for user
commands.
My apologies to anyone who tried to build systat this morning.
1999-12-16 17:15:48 +00:00
jwise
06f376613f
Rototill global command matching -- switch from ad-hoc tomfoolery to a
...
table lookup. This will make prefix matching and so on easier.
Expect a similar change for mode-specific commands before too long.
While there, rename some structures with misleading names.
Watch this space for more changes soon.
1999-12-16 04:02:22 +00:00
soren
6fc41af333
Sync usage() with man page.
1999-11-11 03:06:04 +00:00
ross
ef4ee3d458
Functional LP64 and type sanity fixes.
1999-04-24 23:36:36 +00:00
drochner
b2058e2f38
Fix handling of privileges - the gid was given up before dkinit()
...
was called.
Pass the gid to use for KVM access explicitely to dkinit(), the caller
decides whether to call setgid(getgid()) or not.
1998-07-19 17:47:07 +00:00
mrg
47abaab886
- KNF
...
- use snprintf
- don't overwrite the keyboard buffer (and make this sized on
the window size).
1998-07-12 05:59:00 +00:00
mrg
2beab49a06
- use an array MAXHOSTNAMELEN+1 size to hold hostnames
...
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
1998-07-06 06:45:41 +00:00
lukem
9ccb9cd874
fix .Nm usage, deprecate register, getopt returns -1 not EOF, s/[br]*/[ms]*/
1997-10-19 23:36:20 +00:00
mrg
5941399374
- some KNF.
...
- use __RCSID().
- WARNS=1
1997-07-21 07:04:56 +00:00
explorer
a030e0a1ae
Message buffer passed to kvm_openfiles() should _POSIX2_LINE_MAX long; PR#3266
1997-03-03 22:12:19 +00:00
scottr
823c2433dc
Freshen up a bit:
...
- Replace deprecated sigblock() with sigprocmask()
- Redraw the current display if SIGWINCH is caught
- Style police
1996-12-13 19:26:18 +00:00
thorpej
1eaf5ee379
New userland code to read the statistics kept by the NetBSD generic
...
disk framework, from John M. Vinopal <banshee@gabriella.resort.com>
1996-05-10 23:16:30 +00:00
jtc
cac62b2d65
Be pedantic, main() returns int in C.
1996-03-21 17:56:15 +00:00
jtc
86f36c2670
Print error message and exit if TERM is not set.
...
From PR #1015 .
1995-05-06 06:25:07 +00:00
cgd
5cac5e9c7c
various includes, casts, and cleanups...
1995-04-29 05:54:42 +00:00
mycroft
05fc3892b3
Use err*(3)/warn*(3).
1995-03-22 15:25:56 +00:00
mycroft
73ab328b89
Don't core dump on an illegal display type. Display a more specific error
...
message for an ambiguous type.
1995-03-22 15:20:31 +00:00
jtc
2f3cb7ae7d
Changed to conform to NetBSD's new RCS Id convention.
1995-01-20 08:51:48 +00:00
jtc
12749a2a84
imported from 44lite
1995-01-20 08:30:50 +00:00