summaryrefslogtreecommitdiffstats
path: root/usr.bin/kdump/kdump.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/kdump/kdump.c')
-rw-r--r--usr.bin/kdump/kdump.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c
index ec54ece..397f97c 100644
--- a/usr.bin/kdump/kdump.c
+++ b/usr.bin/kdump/kdump.c
@@ -97,7 +97,7 @@ main(int argc, char *argv[])
(void) setlocale(LC_CTYPE, "");
- while ((ch = getopt(argc,argv,"f:dlm:np:RTt:")) != -1)
+ while ((ch = getopt(argc,argv,"f:dlm:np:ERTt:")) != -1)
switch((char)ch) {
case 'f':
tracefile = optarg;
@@ -117,6 +117,9 @@ main(int argc, char *argv[])
case 'p':
pid = atoi(optarg);
break;
+ case 'E':
+ timestamp = 3; /* elapsed timestamp */
+ break;
case 'R':
timestamp = 2; /* relative timestamp */
break;
@@ -249,6 +252,11 @@ dumpheader(struct ktr_header *kth)
(void)printf("%6d %-8.*s ", kth->ktr_pid, MAXCOMLEN, kth->ktr_comm);
if (timestamp) {
+ if (timestamp == 3) {
+ if (prevtime.tv_sec == 0)
+ prevtime = kth->ktr_time;
+ timevalsub(&kth->ktr_time, &prevtime);
+ }
if (timestamp == 2) {
temp = kth->ktr_time;
timevalsub(&kth->ktr_time, &prevtime);
OpenPOWER on IntegriCloud