From 24481680084c08a267049e1040340ba0c4033bcd Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Tue, 17 Aug 2021 18:03:00 +0200 Subject: [PATCH] evolinux-base: Add swap column to htop and top --- evolinux-base/files/htoprc | 2 ++ evolinux-base/files/topdefaultrc | 15 +++++++++++++++ evolinux-base/tasks/htop.yml | 6 ++++++ evolinux-base/tasks/main.yml | 4 ++++ evolinux-base/tasks/top.yml | 7 +++++++ 5 files changed, 34 insertions(+) create mode 100644 evolinux-base/files/htoprc create mode 100644 evolinux-base/files/topdefaultrc create mode 100644 evolinux-base/tasks/htop.yml create mode 100644 evolinux-base/tasks/top.yml diff --git a/evolinux-base/files/htoprc b/evolinux-base/files/htoprc new file mode 100644 index 00000000..c3380903 --- /dev/null +++ b/evolinux-base/files/htoprc @@ -0,0 +1,2 @@ +# Force the SWAP column to the right of the CPU one +fields=0 48 17 18 38 39 40 119 2 46 47 49 1 diff --git a/evolinux-base/files/topdefaultrc b/evolinux-base/files/topdefaultrc new file mode 100644 index 00000000..b49be289 --- /dev/null +++ b/evolinux-base/files/topdefaultrc @@ -0,0 +1,15 @@ +top's Config File (Linux processes with windows) +Id:j, Mode_altscr=0, Mode_irixps=1, Delay_time=3.0, Curwin=0 +Def fieldscur=ķ&')*+,-./012568>?ABCFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz + winflags=193844, sortindx=18, maxtasks=0, graph_cpus=0, graph_mems=0, double_up=0, combine_cpus=0 + summclr=1, msgsclr=1, headclr=3, taskclr=1 +Job fieldscur=(Ļ@<)*+,-./012568>?ABCFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz + winflags=193844, sortindx=0, maxtasks=0, graph_cpus=0, graph_mems=0, double_up=0, combine_cpus=0 + summclr=6, msgsclr=6, headclr=7, taskclr=6 +Mem fieldscur=?@ABCFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz + winflags=193844, sortindx=3, maxtasks=0, graph_cpus=0, graph_mems=0, double_up=0, combine_cpus=0 + summclr=3, msgsclr=3, headclr=2, taskclr=3 +Fixed_widest=0, Summ_mscale=1, Task_mscale=0, Zero_suppress=0 diff --git a/evolinux-base/tasks/htop.yml b/evolinux-base/tasks/htop.yml new file mode 100644 index 00000000..eeb59beb --- /dev/null +++ b/evolinux-base/tasks/htop.yml @@ -0,0 +1,6 @@ +--- +- name: Deploy htop configuration + copy: + src: htoprc + dest: /etc/htoprc + mode: "0644" diff --git a/evolinux-base/tasks/main.yml b/evolinux-base/tasks/main.yml index 2da87162..b64badd6 100644 --- a/evolinux-base/tasks/main.yml +++ b/evolinux-base/tasks/main.yml @@ -129,3 +129,7 @@ include_role: name: evolix/generate-ldif when: evolinux_generateldif_include | bool + +- include: top.yml + +- include: htop.yml diff --git a/evolinux-base/tasks/top.yml b/evolinux-base/tasks/top.yml new file mode 100644 index 00000000..12eff20c --- /dev/null +++ b/evolinux-base/tasks/top.yml @@ -0,0 +1,7 @@ +--- +- name: Deploy top configuration file + copy: + # The config format is unredable; ATM it only add the SWAP column + src: htoprc + dest: /etc/topdefaultrc + mode: "0644"