Thursday, May 20, 2021

jbd2 causing a lot of disk access

Symptom: jbd2 very active in iotop:

  221 be/3 root        0.00 B/s   60.87 K/s  0.00 % 38.90 % [jbd2/sda2-8]

This can happen if you changed a lot of files on your hard disk, but activity will go lower over time.
To disable the updatedb cron that uses jbd2 also, you can do:
sudo chmod -x /etc/cron.daily/mlocate
You can also change the commit frequency in /etc/fstab (but jbd2 will happen anyway, but less frequently)

 root@arau3:~# more /etc/fstab 

# /etc/fstab: static file system information.

#

# Use 'blkid' to print the universally unique identifier for a

# device; this may be used with UUID= as a more robust way to name devices

# that works even if disks are added and removed. See fstab(5).

#

# <file system> <mount point>   <type>  <options>       <dump>  <pass>

# / was on /dev/sda2 during installation

UUID=d6852e87-0e39-44a1-a431-6f23456f1250 /               ext4    commit=60,errors=remount-ro 0      

 1

Monday, May 3, 2021

atom editor

My packages:

    - pretty-json

Insert a carriage return:

    - switch to regexp mode and put \n in the "replace" zone

Select a rectangle

  - If you want to select a rectangular region in atom all you have to do is first set the horizontal dimension by selecting some text, then set the vertical dimension by holding CTL-SHIFT and then pressing the up or down arrow. 

Alternatively you can do this the other way around and set the vertical dimension first with CTL-SHIFT, then let go of CTL but keep holding SHIFT and then use the right or left arrow to select the horizontal dimension.

.

HTML link pointing to a HTML anchor

HTML Anchor:

<a name="overview.description">

you can point to this anchor within the HTML:

<a href="#overview.description">Description</a>

or through a URL link:

https://lucene.apache.org/core/7_7_1/core/overview-summary.html#overview.description


Sunday, April 11, 2021

Re-install Windows 10 on Asus

Asus R457UV

re-installer Windows via clé USB.  (disque dur remplacé par exemple). Besoin du user bios admin. Si un user admin bios a deja ete installé et que l'on ne se souvient pas du mot de passe, il faut reprogrammer l"EEPROM sur la carte mere sur ce modele.

https://www.forum-des-portables-asus.fr/forums/resources/changement-et-ou-reprogrammation-de-leeprom.208/

La clé Windows est en dur sur la carte mere Asus. Elle n'est plus fournie ni à l'utilisateur ni au constructeur. C'est la politique de Windows pour éviter les fraudes.


Télécharger l’image ISO de Windows 10 depuis le lien ci-dessous mais il faut choisir la langue, la version et l’architecture qui correspondent au système préinstallé, c’est-à-dire, si vous possédez un Windows 10 Home 64bits français, il faut sélectionner Français au niveau du champ « langue », Windows 10 Home dans le champ « Version » et 64 bits dans « architecture »
1. Bios / Security / Secure Boot Control = Disabled
2. Bios / Boot / Fast Boot = Disabled
3. Bios / Boot / Launch CSM = Enabled
4. F10 + Yes
5. Bios / Boot / Boot Option Priority = Clé USB
6. F10 + Yes


[concernant ce paragraphe, je n'ai pas pu remettre le BIOS comme avant. Je suis resté en Bios "CSM enabled". Quand je passe en CSM disabled, le disque dur n'est plus detecté]
L'ordinateur va booter sur la clé USB. Une fois l'installation du système (Windows 10) est terminée, Il faut revenir dans le BIOS et remettre toutes les options changées plus haut comme au début et surtout Bios / Boot / Boot Option Priority = Windows Boot manager et F10 + Yes, l'ordinateur va démarrer sur le système.
A la fin de l'installation, le système va récupérer automatiquement la clé lors de la première connexion internet pour la récupération des différentes mises à jour Windows.

Windows 10 famille 64 bits

Monday, May 25, 2020

Docker on mac


  • https://docs.docker.com/docker-for-mac/
  • you can install rancher desktop that configures what is necessary on the machine
  • start the "docker desktop" app from the finder
  • no free "docker licence"  for companies > 250 people
    • https://apple.stackexchange.com/questions/435962/running-docker-daemon-on-apple-silicon-without-docker-desktop 
    • docker desktop includes

    • brew install docker
    • brew install docker-machine
    • brew install --cask virtualbox. (not sure if we need this)
    • docker pull elasticsearch:7.7.1

    • brew list
    •     . docker
    •     . docker-machine

    • docker info
    •     Client:
    •      Context:    default
    •      Debug Mode: false
    •      Plugins:
    •       buildx: Docker Buildx (Docker Inc., v0.8.2)
    •       compose: Docker Compose (Docker Inc., v2.6.1)
    •       extension: Manages Docker extensions (Docker Inc., v0.2.7)
    •       sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
    •       scan: Docker Scan (Docker Inc., v0.17.0)

    •     Server:
    •      Containers: 23
    •       Running: 1
    •       Paused: 0
    •       Stopped: 22
    •      Images: 57

Monday, May 6, 2019

Multiple git accounts

Using multiple ssh keys for multiple gits:
https://gist.github.com/jexchan/2351996
Add the ssh keys on github

Some possible "git config --list" options are "--local" and "--global"
If you don't specify --global, it takes the local config by default.

To display the actual  “git config” do:
git config --list
git config user.name
git config user.email

Before you commit, you need to be sure you are using the correct one.
You can set it by doing:
git config user.name "abc"
git config user.email "abc@abc.com"

The local config will be saved in .git/config
The global config is saved in ~/.gitconfig

"url" must be a git@something  in .git/config, should not be https. If it is https, use:
“git remote set-url origin git@github.com:me/gg-linux.git”
It will change your .git/config

_______ git clone
to display default config:
  • git config --global --list
Even if the keys are on github, you may want to use a specific name/email
  • You can use
    • git clone XX -c user.name=toto -c user.email=toto@toto.com (this will set .git/config)
  • or
    • git config --global user.name "xxx"
    • git config --global user.mail "xxx"
    • git clone git@github.com:youruser/myj-gh     (need ssh keys)
______________ Just using ~/.ssh$ more config 

Host *.internal 10.*
identityfile ~/.ssh/id_rsa

Host *github.com
identityfile ~/.ssh/id_rsa_github

Tuesday, April 16, 2019

Google services empty the battery

Android is up to date.
Google Services is making continuous network access and empty the battery. It stops when network is disabled.

solution: register for the Google Services beta program. That's the only way to update/change Google Services
.