summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/vmon.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vmon.c b/src/vmon.c
index 7d0a5f7..59f89ad 100644
--- a/src/vmon.c
+++ b/src/vmon.c
@@ -345,6 +345,11 @@ static char * arg_interpolate(const vmon_t *vmon, const char *arg)
fprintf(memfp, "%s", vmon->output_dir);
break;
+ case 'P': /* getpid() of vmon, convenient for triggering png snapshots on SIGUSR1 */
+ /* XXX: note this assumes arg_interpolate() occurs pre-fork, true ATM */
+ fprintf(memfp, "%li", (long)getpid());
+ break;
+
case '%': /* literal % */
fputc(c, memfp);
break;
© All Rights Reserved