diff options
author | simokawa <simokawa@FreeBSD.org> | 2004-02-20 10:59:46 +0000 |
---|---|---|
committer | simokawa <simokawa@FreeBSD.org> | 2004-02-20 10:59:46 +0000 |
commit | 7ba479f8386b4828f95fc01c4b5da58fbc7d9168 (patch) | |
tree | a9f86a1f40250fe52e52f676f67e2a8585438fd0 /usr.sbin | |
parent | 2c4f32657572db29701324422c8aa756386d773c (diff) | |
download | FreeBSD-src-7ba479f8386b4828f95fc01c4b5da58fbc7d9168.zip FreeBSD-src-7ba479f8386b4828f95fc01c4b5da58fbc7d9168.tar.gz |
Normalize polling interval while the target is offline.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/dconschat/dconschat.8 | 9 | ||||
-rw-r--r-- | usr.sbin/dconschat/dconschat.c | 11 |
2 files changed, 13 insertions, 7 deletions
diff --git a/usr.sbin/dconschat/dconschat.8 b/usr.sbin/dconschat/dconschat.8 index 2289cc2..4f17d30 100644 --- a/usr.sbin/dconschat/dconschat.8 +++ b/usr.sbin/dconschat/dconschat.8 @@ -179,7 +179,9 @@ To quit the session, type CR + '~' + '.' in the console port. Using gdb port is almost the same as remote gdb over serial line except using TCP/IP instead of /dev/cu*. See "On-line Kernel Debugging Using Remote GDB" -section of The FreeBSD Developers Handbook. +section of The FreeBSD Developers Handbook and +.Xr gdb 4 +for detail. .Bd -literal -offset indent % gdb -k kernel.debug (kgdb) target remote :12345 @@ -200,8 +202,8 @@ If you want access to the console using telnet, try the following: .Ed .Pp You may want to keep logging console output of several machines. Conserve-com -in the ports collection should help you. Insert the following lines -in the conserver.cf +in the ports collection may help you. Insert the following lines +in the conserver.cf. .Bd -literal -offset indent console local { master localhost; @@ -229,6 +231,7 @@ console remote { .Xr ddb 4 , .Xr firewire 4 , .Xr fwohci 4 , +.Xr gdb 4 , .Xr fwcontrol 8 .Sh AUTHORS .An Hidetoshi Shimokawa Aq simokawa@FreeBSD.org diff --git a/usr.sbin/dconschat/dconschat.c b/usr.sbin/dconschat/dconschat.c index c3a89db..9c8b89d 100644 --- a/usr.sbin/dconschat/dconschat.c +++ b/usr.sbin/dconschat/dconschat.c @@ -63,7 +63,8 @@ #include <sys/errno.h> -#define DCONS_POLL_HZ 100 +#define DCONS_POLL_HZ 100 +#define DCONS_POLL_OFFLINE 2 /* sec */ #define RETRY 3 @@ -75,6 +76,7 @@ int verbose = 0; int tc_set = 0; +int poll_hz = DCONS_POLL_HZ; #define IS_CONSOLE(p) ((p)->port == 0) #define IS_GDB(p) ((p)->port == 1) @@ -765,10 +767,11 @@ dconschat_start_session(struct dcons_state *dc) int counter = 0; while (1) { - if ((dc->flags & F_READY) == 0 && (++counter % 200) == 0) + if ((dc->flags & F_READY) == 0 && + (++counter % (poll_hz * DCONS_POLL_OFFLINE)) == 0) dconschat_fetch_header(dc); if ((dc->flags & F_READY) != 0) - dconschat_proc_dcons(dc); + dconschat_proc_dcons(dc); dconschat_proc_socket(dc); } return (0); @@ -808,7 +811,7 @@ main(int argc, char **argv) struct fw_eui64 eui; char devname[256], *core = NULL, *system = NULL; int i, ch, error; - int unit=0, wildcard=0, poll_hz = DCONS_POLL_HZ; + int unit=0, wildcard=0; int port[DCONS_NPORT]; u_int64_t target = 0; |