Table des matières
- 2026:
- 2025:
13 billet(s) pour novembre 2026
| Réseaux - protocole QUIC mieux que TCP | 2026/11/17 21:26 | Jean-Baptiste |
| Notes conversion JSON YAML | 2026/11/13 11:16 | Jean-Baptiste |
| Git commit perdu | 2026/11/12 18:16 | Jean-Baptiste |
| Notes mojo lang | 2026/11/11 20:34 | Jean-Baptiste |
| Notes rust lang compilation | 2026/11/11 18:35 | Jean-Baptiste |
| Mémoire VSIZE VMSIZE SEGV lang C | 2026/11/11 15:59 | Jean-Baptiste |
| Ansible-navigator utilisation de ansible-vault | 2026/11/06 11:33 | Jean-Baptiste |
| Err Ansible - Module result deserialization failed No start of json char found | 2026/11/06 09:09 | Jean-Baptiste |
| Script Python conversion JSON vers CSV | 2026/11/06 08:14 | Jean-Baptiste |
| Filter Incoming IPv4 Packets Containing IP Options - cve-2026-98432 mitigation - Kernel TCP Use-After-Free | 2026/11/04 21:04 | Jean-Baptiste |
| Notes ZFS | 2026/11/03 18:04 | Jean-Baptiste |
| Diff image container | 2026/11/03 16:30 | Jean-Baptiste |
| Notes processus multi-thread | 2026/11/03 10:59 | Jean-Baptiste |
Serveur NFS v3 et montage client
Sur le serveur
/etc/exports
/data/plop machine1(async,rw,no_root_squash)
exportfs -rv
Si besion
chmod 1777 /data/plop
Sur le client
/etc/fstab
serveurnfs:/data/plop /import/plop nfs defaults,_netdev,nfsvers=3 0 0
rw,bg,hard,rsize=32768,wsize=32768,tcp,vers=3,timeo=600
mkdir -p /import/plop mount /import/plop
Mount options
nocto: Suppress the retrieval of new attributes when creating a file. noac: Disable all forms of attribute caching entirely. This extracts a significant performance penalty but it allows two different NFS clients to get reasonable results when both clients are actively writing to a common export on the server. noacl: Disables Access Control List (ACL) processing. vers=4.1: NFS v4.1 should be used instead of v4.0 because there is a Linux NFS client bug in v4.0 that can cause significant problems due to stale data. nofail: Don't halt boot process waiting for this mount to become available lookupcache=positive: Tells the NFS client to honor positive cache results but invalidates any negative cache results. Negative cache results cause problems with Git. Specifically, a git push can fail to register uniformly across all NFS clients. The negative cache causes the clients to 'remember' that the files did not exist previously.
Test
Supervision
Voir aussi :
- check_mk
- fsfreeze (Linux Ext3/4, ReiserFS, JFS, XFS)
Le plus simple pour monitorer NFS étant de créer un fichier de le l'effacer https://docs.netapp.com/us-en/ontap/nfs-config/test-access-client-systems-task.html
stat -f (system call statfs(2)
If the NFS mount is “stale”, then stat -f returns immediately but with a size of -1. The check detects that and results in a warning state.
mount -l | grep nfs grep nfs /proc/mounts nfsstat nfsstat --mounts mountpoint -q /mnt/foo findmnt -rno SOURCE,TARGET "$1" lsof -b ss -a | grep :nfs
mountpoint="/mnt/testnfs" #read -t1 < <(stat -t "$mountpoint" 2>&-) read -r -t1 < <(stat -t "$mountpoint" 2>&-) if [ -z "$REPLY" ] ; then echo "NFS mount stale. Removing..." fi
Remplacer uuencode/uudecode par openssl
Voir aussi :
- base58
Exemple
$ echo -n "Test" | openssl base64 VGVzdA==
$ echo "VGVzdA==" | openssl base64 -d Test
En encore
cat /usr/share/doc/systemd/LICENSE.LGPL2.1 | head -12 | gzip | openssl base64
H4sIAAsBF1cAA2VRwW7CMAy95yvecZO6ijLtwBFQQUgdQnTsMu2Qti6NVhKUuCD+ fg6MHTYrOdh+7/nJBv7Gcr1DkZdlvsUyX+fbaYHNblas5pCfr8tc/aPc4p18MM5i nGYJFlT5QfsLsslkohTm7njxZt8xHuaPsSiY2MLCE6F0LZ+1JyzcYBvNIpNgZetU 4SUTiLZfvbEoWcAs4qblDoveOZ9g5gJH+OsUGI2zbPSUPY8yYFdOFfIT+YuzBBNw JH8wzNSAHWrxA20bNCawN9XABMFWMvsQm4aCgmvBnTB7U5MNhMbVw4GsOBA86k7b vbF7GI7y1jF037szNalSH2+RKI87Qmt8YHjqSQcZf/pZ1FWeUFAI5LHcFCmwiiIh +hssiwV9UwhDXQvM+TvpeiVT+bjizVCJQ0mvLpNf/XGCjmxN6sq4V+1wqGScXCn9 VOob+cnrRwACAAA=
( cat <<EOF H4sIAAsBF1cAA2VRwW7CMAy95yvecZO6ijLtwBFQQUgdQnTsMu2Qti6NVhKUuCD+ fg6MHTYrOdh+7/nJBv7Gcr1DkZdlvsUyX+fbaYHNblas5pCfr8tc/aPc4p18MM5i nGYJFlT5QfsLsslkohTm7njxZt8xHuaPsSiY2MLCE6F0LZ+1JyzcYBvNIpNgZetU 4SUTiLZfvbEoWcAs4qblDoveOZ9g5gJH+OsUGI2zbPSUPY8yYFdOFfIT+YuzBBNw JH8wzNSAHWrxA20bNCawN9XABMFWMvsQm4aCgmvBnTB7U5MNhMbVw4GsOBA86k7b vbF7GI7y1jF037szNalSH2+RKI87Qmt8YHjqSQcZf/pZ1FWeUFAI5LHcFCmwiiIh +hssiwV9UwhDXQvM+TvpeiVT+bjizVCJQ0mvLpNf/XGCjmxN6sq4V+1wqGScXCn9 VOob+cnrRwACAAA= EOF ) | openssl base64 -d | gzip -d > plop.txt
Base64 sans line return :
Utilisez '-A' Exemple
cat plop.sh | openssl base64 | tr -d '\n' | openssl base64 -A -d
Alternatives
Base45 :
Utiliser Git pour vos logos en SVG
Voir http://w.xuv.be/projects/design_with_git
Faire du diffing graphique (oui ! pas en texte) avec Git sur des images vectorielle en SVG
compare.py
#!/usr/bin/env python import sys, os inkscape = "inkscape" local = sys.argv[1] remote = sys.argv[2] tempdir = "/home/markv/gittemp/" localpng = tempdir+"local.png" remotepng = tempdir+"remote.png" if(not (remote.endswith(".svg") and (local != "/dev/null"))): os.system("xxdiff %s %s" % (local, remote)) else: os.system(inkscape+" "+local+" --export-png="+localpng+" -w600 -h900 -C -bffffff -y1.0") os.system(inkscape+" "+remote+" --export-png="+remotepng+" -w600 -h900 -C -bffffff -y1.0") os.system("compare "+localpng+" "+remotepng+" - | display") os.remove(localpng) os.remove(remotepng)
Ajoutez dans votre .gitconfig (adapter le chemin)
~/.gitconfig
[difftool "compare"] cmd = "/home/USER/bin/compare.py $LOCAL $REMOTE - | display"
Puis par exemple
git difftool -y -t compare
Utiliser virtualenv dans un notebook iPython
Source : https://help.pythonanywhere.com/pages/IPythonNotebookVirtualenvs/
Install the ipython kernel module into your virtualenv
python3 -m venv plop cd plop source bin/activate pip install --upgrade pip pip install ipykernel #deactivate
Now run the kernel “self-install” script
python -m ipykernel install --user --name=plop
Replacing the --name parameter as appropriate.
You should now be able to see your kernel in the IPython notebook menu: Kernel -> Change kernel and be able so switch to it (you may need to refresh the page before it appears in the list). IPython will remember which kernel to use for that notebook from then on.
Utilisateur plusieurs noms même uid
#chown -h -R --from=Plop:Plop reference:reference / find / /var /home /data /opt -xdev \( -type f -o -type d \) \( -uid $(id -u Plop) -o -gid $(id -g Plop) \) -exec chown $(id -u reference):$(id -g reference) {} \; usermod -o -u $(id -u reference) -g $(id -g reference) Plop
