Add "-s" argument to kdump to suppress the display of I/O data.
MFC after: 1 week
This commit is contained in:
parent
b2f9e51241
commit
df0c8868b1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=152331
@ -40,7 +40,7 @@
|
||||
.Nd display kernel trace data
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl dEnlHRT
|
||||
.Op Fl dEnlHRsT
|
||||
.Op Fl f Ar trfile
|
||||
.Op Fl m Ar maxdata
|
||||
.Op Fl p Ar pid
|
||||
@ -96,6 +96,8 @@ This may be useful when there are multiple processes recorded in the
|
||||
same trace file.
|
||||
.It Fl R
|
||||
Display relative timestamps (time since previous entry).
|
||||
.It Fl s
|
||||
Suppress display of I/O data.
|
||||
.It Fl T
|
||||
Display absolute timestamps for each entry (seconds since epoch).
|
||||
.It Fl t Ar cnisuw
|
||||
|
@ -81,7 +81,7 @@ void ktruser(int, unsigned char *);
|
||||
void usage(void);
|
||||
const char *ioctlname(u_long);
|
||||
|
||||
int timestamp, decimal, fancy = 1, tail, threads, maxdata;
|
||||
int timestamp, decimal, fancy = 1, suppressdata, tail, threads, maxdata;
|
||||
const char *tracefile = DEF_TRACEFILE;
|
||||
struct ktr_header ktr_header;
|
||||
|
||||
@ -98,7 +98,7 @@ main(int argc, char *argv[])
|
||||
|
||||
(void) setlocale(LC_CTYPE, "");
|
||||
|
||||
while ((ch = getopt(argc,argv,"f:dElm:np:HRTt:")) != -1)
|
||||
while ((ch = getopt(argc,argv,"f:dElm:np:HRsTt:")) != -1)
|
||||
switch((char)ch) {
|
||||
case 'f':
|
||||
tracefile = optarg;
|
||||
@ -118,6 +118,9 @@ main(int argc, char *argv[])
|
||||
case 'p':
|
||||
pid = atoi(optarg);
|
||||
break;
|
||||
case 's':
|
||||
suppressdata = 1;
|
||||
break;
|
||||
case 'E':
|
||||
timestamp = 3; /* elapsed timestamp */
|
||||
break;
|
||||
@ -538,6 +541,8 @@ ktrgenio(struct ktr_genio *ktr, int len)
|
||||
printf("fd %d %s %d byte%s\n", ktr->ktr_fd,
|
||||
ktr->ktr_rw == UIO_READ ? "read" : "wrote", datalen,
|
||||
datalen == 1 ? "" : "s");
|
||||
if (suppressdata)
|
||||
return;
|
||||
if (maxdata && datalen > maxdata)
|
||||
datalen = maxdata;
|
||||
|
||||
@ -599,6 +604,6 @@ void
|
||||
usage(void)
|
||||
{
|
||||
(void)fprintf(stderr,
|
||||
"usage: kdump [-dEnlHRT] [-f trfile] [-m maxdata] [-p pid] [-t [cnisuw]]\n");
|
||||
"usage: kdump [-dEnlHRsT] [-f trfile] [-m maxdata] [-p pid] [-t [cnisuw]]\n");
|
||||
exit(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user