Created
November 17, 2019 06:34
-
-
Save mingderwang/2fd238bac4871f75e3ed31386256b3f3 to your computer and use it in GitHub Desktop.
to run ansible on server itself to test performance and spec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
sudo: yes | |
tasks: | |
# gathering fact on remote server. | |
- name: Collect only facts returned by facter | |
setup: | |
gather_subset: | |
- 'virtual' | |
register: version | |
- debug: var=version | |
- name: performance test 1 - top | |
shell: top -bcn 1 -w888 | |
- name: performance test 2 - iostat | |
shell: iostat -tkdx 1 10 | |
- name: 系統負載請用以下的命令 | |
shell: sar -ud 1 10 | |
- name: show system storage | |
shell: cat /etc/fstab && df -k |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment