Merge of RedHatGov/product-demos (#56)
Co-authored-by: MKletz <michael.kletz.27@gmail.com> Co-authored-by: Ajay Chenampara <ajay.chenampara@gmail.com> Co-authored-by: dlemons-redhat <69318976+dlemons-redhat@users.noreply.github.com> Co-authored-by: Nicolas Leiva <nicolasleiva@gmail.com> Co-authored-by: benblasco <42140583+benblasco@users.noreply.github.com> Co-authored-by: Benjamin Blasco <bblasco@redhat.com> Co-authored-by: calvingsmith <4283930+calvingsmith@users.noreply.github.com> Co-authored-by: Calvin Smith <calvingsmith@users.noreply.github.com> Co-authored-by: Hicham Mourad <43329991+HichamMourad@users.noreply.github.com>
This commit is contained in:
@@ -1,29 +1,29 @@
|
||||
---
|
||||
- name: gather debug info
|
||||
hosts: "{{ HOSTS }}"
|
||||
become: yes
|
||||
- name: Gather debug info
|
||||
hosts: "{{ _hosts | default(omit) }}"
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Gather recent vmstat info
|
||||
command: /bin/vmstat 1 5
|
||||
- name: Gather recent vmstat info # noqa: no-changed-when
|
||||
ansible.builtin.command: /bin/vmstat 1 5
|
||||
register: vmstat
|
||||
|
||||
- name: Gather top CPU hogs
|
||||
command: ps -eo user,pid,size,pcpu,cmd --sort=-pcpu
|
||||
|
||||
- name: Gather top CPU hogs # noqa: no-changed-when
|
||||
ansible.builtin.command: ps -eo user,pid,size,pcpu,cmd --sort=-pcpu
|
||||
register: pscpu
|
||||
|
||||
- name: Gather top memory hogs
|
||||
command: ps -eo user,pid,size,pcpu,cmd --sort=-size
|
||||
|
||||
- name: Gather top memory hogs # noqa: no-changed-when
|
||||
ansible.builtin.command: ps -eo user,pid,size,pcpu,cmd --sort=-size
|
||||
register: pssize
|
||||
|
||||
|
||||
- name: Swap + wait states
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
var: vmstat.stdout_lines
|
||||
|
||||
|
||||
- name: Top 3 CPU hogs
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
var: pscpu.stdout_lines[:4]
|
||||
|
||||
|
||||
- name: Top 3 memory hogs
|
||||
debug:
|
||||
var: pssize.stdout_lines[:4]
|
||||
ansible.builtin.debug:
|
||||
var: pssize.stdout_lines[:4]
|
||||
|
||||
Reference in New Issue
Block a user