[systemd-commits] 3 commits - man/coredumpctl.xml src/journal src/shared
Lennart Poettering
lennart at kemper.freedesktop.org
Thu Jun 19 08:36:50 PDT 2014
man/coredumpctl.xml | 44 ++++++++++++++++++++++++++++++++------------
src/journal/coredumpctl.c | 19 ++++++++++---------
src/shared/time-util.h | 1 +
3 files changed, 43 insertions(+), 21 deletions(-)
New commits:
commit eca8701ae7adb7a89badc37d4233ea450436f14c
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu Jun 19 17:36:39 2014 +0200
man: document new coredumpctl commands
diff --git a/man/coredumpctl.xml b/man/coredumpctl.xml
index 159fabb..5ea865e 100644
--- a/man/coredumpctl.xml
+++ b/man/coredumpctl.xml
@@ -72,6 +72,22 @@
<variablelist>
<varlistentry>
+ <term><option>--no-legend</option></term>
+
+ <listitem><para>Do not print the column headers.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-1</option></term>
+
+ <listitem><para>Show information of a
+ single coredump only, instead of
+ listing all known coredumps.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-F</option></term>
<term><option>--field=</option></term>
@@ -89,16 +105,10 @@
<option>FILE</option>.</para></listitem>
</varlistentry>
- <varlistentry>
- <term><option>--no-legend</option></term>
-
- <listitem><para>Do not print the column headers.
- </para></listitem>
- </varlistentry>
-
<xi:include href="standard-options.xml" xpointer="help" />
<xi:include href="standard-options.xml" xpointer="version" />
<xi:include href="standard-options.xml" xpointer="no-pager" />
+
</variablelist>
<para>The following commands are understood:</para>
@@ -107,8 +117,19 @@
<varlistentry>
<term><command>list</command></term>
- <listitem><para>List coredumps captured in the journal
- matching specified characteristics.</para></listitem>
+ <listitem><para>List coredumps
+ captured in the journal matching
+ specified characteristics. If no
+ command is specified this is the
+ implied default.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><command>info</command></term>
+
+ <listitem><para>Show detailed
+ information about coredumps captured
+ in the journal.</para></listitem>
</varlistentry>
<varlistentry>
@@ -122,7 +143,6 @@
</para></listitem>
</varlistentry>
-
<varlistentry>
<term><command>gdb</command></term>
@@ -139,7 +159,7 @@
<refsect1>
<title>Matching</title>
- <para>Match can be:</para>
+ <para>A match can be:</para>
<variablelist>
<varlistentry>
@@ -173,7 +193,7 @@
<listitem><para>General journalctl predicates
(see <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
- Must contain an equals sign.
+ Must contain an equal sign.
</para></listitem>
</varlistentry>
</variablelist>
commit 31a020ced371fcf2a30c795c0f8ed1361e70904d
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu Jun 19 17:36:22 2014 +0200
coredumpctl: add missing entries to --help
diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
index 325f62f..541dda0 100644
--- a/src/journal/coredumpctl.c
+++ b/src/journal/coredumpctl.c
@@ -85,15 +85,16 @@ static int help(void) {
printf("%s [OPTIONS...]\n\n"
"List or retrieve coredumps from the journal.\n\n"
"Flags:\n"
- " -o --output=FILE Write output to FILE\n"
+ " -h --help Show this help\n"
+ " --version Print version string\n"
" --no-pager Do not pipe output into a pager\n"
- " --no-legend Do not print the column headers.\n\n"
+ " --no-legend Do not print the column headers.\n"
+ " -1 Show information about most recent entry only\n"
+ " -F --field=FIELD List all values a certain field takes\n"
+ " -o --output=FILE Write output to FILE\n\n"
"Commands:\n"
- " -h --help Show this help\n"
- " --version Print version string\n"
- " -F --field=FIELD List all values a certain field takes\n"
- " list [MATCHES...] List available coredumps\n"
+ " list [MATCHES...] List available coredumps (default)\n"
" info [MATCHES...] Show detailed information about one or more coredumps\n"
" dump [MATCHES...] Print first matching coredump to stdout\n"
" gdb [MATCHES...] Start gdb for the first matching coredump\n"
commit c3f841063db371b9824b9f91df96a66dfbd24f83
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu Jun 19 17:29:39 2014 +0200
coredumpctl: fix columns sizing for timestamp
diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
index 7314683..325f62f 100644
--- a/src/journal/coredumpctl.c
+++ b/src/journal/coredumpctl.c
@@ -383,15 +383,15 @@ static int print_list(FILE* file, sd_journal *j, int had_legend) {
if (!had_legend && !arg_no_legend)
fprintf(file, "%-*s %*s %*s %*s %*s %s\n",
- FORMAT_TIMESTAMP_MAX-1, "TIME",
+ FORMAT_TIMESTAMP_WIDTH, "TIME",
6, "PID",
5, "UID",
5, "GID",
3, "SIG",
"EXE");
- fprintf(file, "%*s %*s %*s %*s %*s %s\n",
- FORMAT_TIMESTAMP_MAX-1, buf,
+ fprintf(file, "%-*s %*s %*s %*s %*s %s\n",
+ FORMAT_TIMESTAMP_WIDTH, buf,
6, strna(pid),
5, strna(uid),
5, strna(gid),
diff --git a/src/shared/time-util.h b/src/shared/time-util.h
index f68c095..34ba6c1 100644
--- a/src/shared/time-util.h
+++ b/src/shared/time-util.h
@@ -58,6 +58,7 @@ typedef struct dual_timestamp {
#define NSEC_PER_YEAR ((usec_t) (31557600ULL*NSEC_PER_SEC))
#define FORMAT_TIMESTAMP_MAX ((4*4+1)+11+9+4+1) /* weekdays can be unicode */
+#define FORMAT_TIMESTAMP_WIDTH 28 /* when outputting, assume this width */
#define FORMAT_TIMESTAMP_RELATIVE_MAX 256
#define FORMAT_TIMESPAN_MAX 64
More information about the systemd-commits
mailing list