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 |
Ripper un cd audio pour le mettre en mp3 ogg flac ou autres formats
Voir :
Il existe plusieurs outils dont :
- grip
- ripit
- abcde
- cdparanoia
- cdrdao
Avec sound-juicer
sudo apt-get install sound-juicer sound-juicer
avec l'outil Ripit
sudo apt-get install ripit ripit
avec l'outil abcde
sudo apt-get install abcde mkcue flac eye3d lame # Exemple env CDPARANOIAOPTS="-Z" abcde -M -o flac 8
Brouillon
Trouver le lecteur audio (/dev/sr0) cdrdao scanbus
Dump exemple
cdrdao read-cd --device /dev/sr0 NOM_DU_CD_AUDIO.toc cdrdao read-cd --source-device 0,0,0 --driver generic-mmc --paranoia-mode 3 audiocd.toc
Un fichier data.bin est généré La table de contenu NOM_DU_CD_AUDIO.toc
rip 1
cdrdao read-cd --read-raw --driver generic-mmc-raw --with-cddb --datafile file.bin file.toc toc2cue file.toc file.cue flac --best --force-raw --sample-rate=44100 --channels=2 --bps=16 --endian=big --sign=signed --cuesheet=file.cue file.bin -o file.flac
rip 2
abcde -1 -M -o flac
recontruct CD
flac --decode --force-raw --endian=big --sign=signed --output-name=file.bin file.flac cdrdao write data.toc
Pb
cdparanoia III release 10.2 (September 11, 2008)
Ripping from sector 282026 (track 8 [0:00.00])
to sector 289583 (track 8 [1:40.57])
outputting to /home/jibe/abcde.720f1508/track8.wav
(== PROGRESS == [ > | 283193 00 ] == :-) 0 ==) scsi_read error: sector=284153 length=27 retry=0
Sense key: 3 ASC: 2 ASCQ: 0
Transport error: Medium reading data from medium
System error: Input/output error
scsi_read error: sector=284153 length=13 retry=1
Sense key: 3 ASC: 2 ASCQ: 0
Transport error: Medium reading data from medium
System error: Input/output error
(== PROGRESS == [ + e > | 284349 00 ] == :-P . ==)
dmesg [ 3836.507021] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 3836.507028] sr 1:0:0:0: [sr0] [ 3836.507032] Sense Key : Illegal Request [current] [ 3836.507039] Info fld=0x46ac0 [ 3836.507043] sr 1:0:0:0: [sr0] [ 3836.507052] Add. Sense: Illegal mode for this track [ 3836.507057] sr 1:0:0:0: [sr0] CDB: [ 3836.507060] Read(10): 28 00 00 04 6a c0 00 00 20 00 [ 3836.514926] sr 1:0:0:0: [sr0] [ 3836.514935] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 3836.514938] sr 1:0:0:0: [sr0] [ 3836.514940] Sense Key : Illegal Request [current] [ 3836.514943] Info fld=0x46b00 [ 3836.514944] sr 1:0:0:0: [sr0] [ 3836.514950] Add. Sense: Illegal mode for this track [ 3836.514951] sr 1:0:0:0: [sr0] CDB: [ 3836.514953] Read(10): 28 00 00 04 6b 00 00 00 20 00
Reverse SSH tunnel - SSH comme VPN
Voir :
- sshuttle
- OpenVPN
- PageKite
- ssh_tunnel
- autossh
Putty
#ssh -R 3128:192.168.56.1:3128 user@192.168.1.20 plink -R 3128:192.168.56.1:3128 -pw P@ssw0rd -batch user@192.168.1.20
Reverse proxy HTTP Headers - Disable compressed response - Nginx
Voir :
Disable the compressed response
proxy_set_header Accept-Encoding "";
Context: http, server, location
Réseau Linux tc (Traffic Control)
Introduction to Network Emulation with tc (Traffic Control) The tc command is part of the iproute package
Source : https://bencane.com/simulating-network-latency-for-testing-in-linux-environments-29daad98efcc
tc (Traffic Control) is a powerful Linux command used to control the kernel's network scheduler. It interfaces with a component known as netem (Network Emulator), which provides functionalities for emulating network conditions like latency, packet loss, and more. This tool is crucial for replicating real-world network scenarios, such as a WAN, within a controlled test environment.
Determine Current Latency: Use the ping command to measure the current latency to a remote server.
ping google.com
Calculate Additional Latency: Subtract the average current latency from your desired latency.
Desired Latency - Current Latency = Additional Latency
Apply the Latency using tc : Use the tc command to add the calculated delay to the network interface.
tc qdisc add dev eth0 root netem delay 97ms
Verify the Rule : Use the tc -s command to ensure the delay has been correctly added.
tc -s qdisc
Removing the Latency Rule
tc qdisc del dev eth0 root netem
Réseau Linux pile TCP/IP
Voir aussi :
- MPTCP, SCTP, DCCP
Voir :
- hping2
man 7 tcp
Contrack
Voir :
- /proc/net/nf_conntrack
- /proc/sys/net/nf_conntrack_max
apt-get install conntrack
Flush
conntrack -F
/proc/sys/net/ipv4/tcp_syn_retries
$ sysctl net.ipv4.tcp_syn_retries net.ipv4.tcp_syn_retries = 6
Effectively, this takes 1+2+4+8+16+32+64=127s before the connection finally aborts.
/proc/sys/net/ipv4/tcp_synack_retries
/proc/sys/net/ipv4/tcp_retries2
Voir :
Voir aussi :
- /proc/sys/net/ipv4/tcp_retries
- /proc/sys/net/ipv4/tcp_syn_retries
- /proc/sys/net/ipv4/tcp_synack_retries
Cluster
In a High Availability (HA) situation consider decreasing the setting to 3.
RFC 1122 recommends at least 100 seconds for the timeout, which corresponds to a value of at least 8. Oracle suggest a value of 3 for a RAC configuration.
Nb de retransmissions vs temps
An experiment confirms that (on a recent Linux at least) the timeout is more like 13s with the suggested net.ipv4.tcp_retries2=5
“Windows defaults to just 5 retransmissions which corresponds with a timeout of around 6 seconds.” “Five retransmissions corresponds with a timeout of around six seconds.” tcp_retries2=5 means timeout with first transmission plus 5 retransmissions: 12.6 seconds=(2^6 - 1) * 0.2. tcp_retries2=15: 924.6 seconds=(2^10 - 1) * 0.2 + (16 - 10) * 120.
Source : https://github.com/elastic/elasticsearch/issues/102788
Voir aussi : https://www.elastic.co/guide/en/elasticsearch/reference/current/system-config-tcpretries.html#_related_configuration
F_RTO
TCP keepalive
Configuring TCP/IP keepalive parameters for high availability clients (JDBC)
tcp_keepalive_probes - the number of probes that are sent and unacknowledged before the client considers the connection broken and notifies the application layer
tcp_keepalive_time - the interval between the last data packet sent and the first keepalive probe
tcp_keepalive_intvl - the interval between subsequent keepalive probes
tcp_retries2 - the maximum number of times a packet is retransmitted before giving up
echo "6" > /proc/sys/net/ipv4/tcp_keepalive_time echo "1" > /proc/sys/net/ipv4/tcp_keepalive_intvl echo "10" > /proc/sys/net/ipv4/tcp_keepalive_probes echo "3" > /proc/sys/net/ipv4/tcp_retries2
ss -o
Process / diag tools
Outils
TCP retransmissions
Voir :
- net.ipv4.tcp_early_retrans
Outils :
- tcpretrans.bt (bpftrace)
- tcpretrans perf-tools
- tcpretrans.py bpfcc-tools - iovisor/bcc
Connaitre le rto_min et le rto_max
# grep ^Tcp /proc/net/snmp | column -t | cut -c1-99 Tcp: RtoAlgorithm RtoMin RtoMax MaxConn ActiveOpens PassiveOpens AttemptFails EstabResets Tcp: 1 200 120000 -1 6834 964 161 4614
yum install bpftrace /usr/share/bcc/tools/tcpretrans
timeout 60 ./tcpretrans | nl
sar -n ETCP sar -n TCP
# netstat -s | egrep 'segments retransmited | segments send out'
107428604792 segments send out
47511527 segments retransmited
# echo "$(( 47511527 * 10000 / 107428604792 ))"
4
https://www.ibm.com/support/pages/tracking-tcp-retransmissions-linux
tcpretransmits.sh
#! /usr/bin/bash test -x /usr/sbin/tcpretrans.bt && TCPRETRANS=/usr/sbin/tcpretrans.bt test -x /usr/share/bpftrace/tools/tcpretrans.bt && TCPRETRANS=/usr/share/bpftrace/tools/tcpretrans.bt # https://github.com/brendangregg/perf-tools/blob/master/net/tcpretrans test -x ./tcpretrans.pl && TCPRETRANS=./tcpretrans.pl OUT=/tmp/tcpretransmits.log if [ -z "$TCPRETRANS" ]; then echo "It looks like 'bpftrace' is not installed" else date > $OUT netstat -s | awk '/segments sen. out$/ { R=$1; } /segments retransmit+ed$/ { printf("%.4f\n", ($1/R)*100); }' >> $OUT $TCPRETRANS | tee -a $OUT netstat -s | awk '/segments sen. out$/ { R=$1; } /segments retransmit+ed$/ { printf("%.4f\n", ($1/R)*100); }' >> $OUT fi
Resolving The Problem
TCP retransmissions are almost exclusively caused by failing network hardware, not applications or middleware. Report the failing IP pairs to a network administrator.
Autres
tcp_low_latency (Boolean; default: disabled; since Linux 2.4.21/2.6; obsolete since Linux 4.14)
net.ipv4.tcp_timestamps = 1 net.ipv4.tcp_window_scaling = 1 net.ipv4.tcp_sack = 1 net.ipv4.tcp_moderate_rcvbuf = 1
# ip route get 192.168.100.11
192.168.100.11 dev virbr1 src 192.168.100.1 uid 1000
cache
# ip route show dev virbr1
192.168.100.0/24 proto kernel scope link src 192.168.100.1
# ip route change dev virbr1 192.168.100.0/24 proto kernel scope link src 192.168.100.1 rto_min 8ms
