blog
Table des matières
- 2026:
- 2025:
4 billet(s) pour juillet 2026
| Procédure simple augmentation de la SWAP | 2026/07/17 15:49 | Jean-Baptiste |
| Exemple git clone avec Ansible | 2026/07/16 14:47 | Jean-Baptiste |
| Windows exe - Comparaison de fichiers binaires | 2026/07/16 10:25 | Jean-Baptiste |
| Pb git | 2026/07/01 17:36 | Jean-Baptiste |
Test ping et win_ping cibles Ansible rapport CSV
Voir aussi :
#!/usr/bin/ansible-playbook --- - name: Test ping hosts: all ignore_unreachable: true gather_facts: false tasks: - name: Set_fact - fichier_csv - random run_once: true set_fact: fichier_csv: "/tmp/ping_result_{{ rand }}.csv" vars: rand: "{{ range(10000, 99999) | random }}" - name: Ansible win_ping ignore_errors: true win_ping: register: r_ping when: os | lower == 'windows' - name: Ansible ping ignore_errors: true ping: register: r_ping when: os | lower != 'windows' - name: setfacts hostname set_fact: field_hostname: "{{ inventory_hostname }}" - name: Create CSV test ping OK delegate_to: localhost lineinfile: path: "{{ fichier_csv }}" create: true mode: "0640" line: >- {{ field_hostname }}; {%- if r_ping.ping is defined -%} {{ r_ping.ping + ';' }} {%- else -%} ; {{ r_ping.msg | replace(';', ',') | regex_replace('\n', ' ') | regex_replace('\r', ' ') + ';' }} {%- endif -%} when: r_ping.ping is defined or r_ping.msg is defined - name: block delegate_to: localhost run_once: true block: - name: find csv register: reg_find_csv find: paths: /tmp/ patterns: "ping_result_*.csv" - name: set_fact - csv_found set_fact: csv_found: "{{ csv_found | d([]) + reg_find_csv.files | map(attribute='path') | list }}" - name: Send mail run_once: true delegate_to: localhost mail: host: smtp.acme.local port: 25 to: me@acme.local subject: CSV ping attach: "{{ csv_found }}" body: >- See attachement.
Test de perf IO disque
Voir :
Voir :
- atop
- stress-ng
- iozone3
stress-ng --all 0 --maximize --aggressive
iostat -hx 5 iostat -xmt 1
Linux : tester les performances I/O
hdparm -t -T /dev/sda dd bs=8192 count=$((4096 * 128)) if=/dev/zero of=test conv=fdatasync bonnie++ -d /mnt -r 8000 -u toto
#time -p dd if=/dev/zero of=/tmp/test1.img bs=1M count=500 oflag=dsync #time -p dd if=/dev/zero of=/tmp/test1.img bs=500M count=1 oflag=dsync time -p dd if=/dev/zero of=/tmp/test1.img bs=8192 count=$((8192 * 64)) oflag=dsync
sudo apt-get install sysbench # --file-test-mode=STRING test mode {seqwr, seqrewr, seqrd, rndrd, rndwr, rndrw} sysbench --test=fileio --file-test-mode=seqwr run sysbench --test=fileio --file-total-size=4G prepare sysbench --test=fileio --file-total-size=4G --file-test-mode=rndrd --max-time=5 run sysbench --test=fileio --file-total-size=4G --file-test-mode=rndwr --max-time=5 run sysbench --test=fileio --file-total-size=4G cleanup
Disk Read-Ahead
blockdev --report blockdev --getra /dev/sda blockdev --setra 256 /dev/sdc cat /sys/block/sda/queue/read_ahead_kb
fio
Source https://www.geekarea.fr/wordpress/?p=769
apt-get install fio
cat > plop.fio << EOF [global] bs=64k direct=1 rw=randrw ioengine=libaio iodepth=2 zonesize=256m zoneskip=2g write_bw_log=str [/dev/vdb] EOF fio plop.fio
Linux IO scheduler
# cat /sys/block/sda/queue/scheduler noop deadline [cfq]
/etc/default/grub
# GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator=noop"
IOWAIT
Test de perf IO réseau
Voir :
- qperf
iperf
Voir Mesures reseau_linux_pile_tcp_ip_rto_min_scripts
Sur le client et le serveur
yum install iperf
Sur le serveur
iperf3 -s
Sur le client
iperf3 -c server_ip
qperf
qperf permet de mesurer la bande passante et la latence De plus il supporte les protocole : TCP/IP, RDMA, UDP, SCTP
Install
yum install qperf
Serveur
qperf
Client
Bande passante
qperf -ip 19766 -t 60 --use_bits_per_sec <server hostname or ip address> tcp_bw
Latence
qperf -vvs <server_hostname_or_ip_address> tcp_lat
Test connexion IMAP
Vérification qu'aucun mot de passe de sera échangé en clair
$ telnet imap.acme.fr 143 1 CAPABILITY 2 LOGIN "user" "pass" * BAD [ALERT] Plaintext authentication not allowed without SSL/TLS, but your client did it anyway. If anyone was listening, the password was exposed. 2 NO [PRIVACYREQUIRED] Plaintext authentication disallowed on non-secure (SSL/TLS) connections.
Connexion IMAP (starttls)
$ openssl s_client -starttls imap -connect imap.acme.fr:143 -crlf 1 LOGIN "user" "pass" 2 LIST "INBOX" "*" 3 LIST "*" "*" 4 SELECT inbox 5 LIST "INBOX" "*Archive*" 6 FETCH 1243:* FLAGS 7 LIST "" "INBOX.%"
34 SEARCH DELETED
* SEARCH
* 1162 FETCH (FLAGS (\Seen NonJunk))
34 OK Search completed (0.000 secs).
35 FETCH 1162 FULL
* 1162 FETCH (FLAGS (\Seen NonJunk) INTERNALDATE "21-May-2015 18:10:03 +0200" RFC822.SIZE 986 ENVELOPE ("Thu, 21 May 2015 18:10:03 +0200 (CEST)" "Postfix SMTP server: errors from unknown[142.54.162.199]" (("Mail Delivery System" NIL "MAILER-DAEMON" "smtp.acme.fr")) (("Mail Delivery System" NIL "MAILER-DAEMON" "smtp.acme.fr")) (("Mail Delivery System" NIL "MAILER-DAEMON" "smtp.acme.fr")) (("Postmaster" NIL "postmaster" "acme.fr")) NIL NIL NIL "<20150521161003.489C72AB1D@smtp.acme.fr>") BODY ("text" "plain" ("charset" "us-ascii") NIL NIL "7bit" 508 20))
35 OK Fetch completed.
37 SEARCH DELETED SINCE 22-may-2015
38 LOGOUT
tag login user@gmail.com password tag LIST "" "*" TAG DELETE Trash tag create Trash tag create Trash.T SEARCH FROM "info@commerbank.com" BEFORE 1-Nov-2009
blog.txt · Dernière modification : de 127.0.0.1
