]> granicus.if.org Git - pgbadger/commitdiff
Add command line option --pid-dir to be able to run two pgbadger at the same time
authorDarold Gilles <gilles@darold.net>
Thu, 14 Jan 2016 21:17:33 +0000 (22:17 +0100)
committerDarold Gilles <gilles@darold.net>
Thu, 14 Jan 2016 21:17:33 +0000 (22:17 +0100)
by setting an alternate path to the directory where the pid file will be written.

README
doc/pgBadger.pod
pgbadger

diff --git a/README b/README
index 215f9cf2dd6cdd3aef098e13e2c071e426845e89..39be9a7a6d7e2368794babeee9b66a948e084fb9 100644 (file)
--- a/README
+++ b/README
@@ -132,6 +132,9 @@ SYNOPSIS
         --journalctl command   : command to use to replace PostgreSQL logfile by
                                  a call to journalctl. Basically it might be:
                                     journalctl -u postgresql-9.5
+        --pid-dir dirpath      : set the path of the directory where the pid file
+                                 will be written to be able to run two pgbadger at
+                                 the same time.
 
     pgBadger is able to parse a remote log file using a passwordless ssh
     connection. Use the -r or --remote-host to set the host ip address or
index 893ca3de51f2286cec1a0060283cd5e37ff90229..3c498464567c4812ae284fc1dc627bd268572184 100644 (file)
@@ -134,7 +134,9 @@ Options:
     --journalctl command   : command to use to replace PostgreSQL logfile by
                             a call to journalctl. Basically it might be:
                                journalctl -u postgresql-9.5
-
+    --pid-dir dirpath      : set the path of the directory where the pid file
+                             will be written to be able to run two pgbadger at
+                             the same time.
 
 pgBadger is able to parse a remote log file using a passwordless ssh connection.
 Use the -r or --remote-host to set the host ip address or hostname. There's also
index a640252482a6d9ca846ce96ddd47beae97100e5c..a26da2a49fa684e5c9d76dcdf4f7b082ee657dbe 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -424,6 +424,7 @@ my $result = GetOptions(
        'log-duration!'            => \$log_duration,
        'enable-checksum!'         => \$enable_checksum,
        'journalctl=s'             => \$journalctl_cmd,
+       'pid-dir=s'                => \$PID_DIR,
 );
 die "FATAL: use pgbadger --help\n" if (not $result);
 
@@ -1832,7 +1833,9 @@ Options:
     --journalctl command   : command to use to replace PostgreSQL logfile by
                             a call to journalctl. Basically it might be:
                                journalctl -u postgresql-9.5
-
+    --pid-dir dirpath      : set the path of the directory where the pid file
+                             will be written to be able to run two pgbadger at
+                            the same time.
 
 pgBadger is able to parse a remote log file using a passwordless ssh connection.
 Use the -r or --remote-host to set the host ip address or hostname. There's also