domingo, 13 de octubre de 2019

Actualizando PyCharm Community en Fedora 30

PyCharm está instalado con flatpak. Se ejecuta desde el entorno del usuario.

Cuando hay una actualización no se puede actualizar porque el usuario no tiene acceso al directorio donde está instalado.

El comando para lanzar PyCharm desde el entorno del usuario es:
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=pycharm-desktop com.jetbrains.PyCharm-Community

PyCharm se puede actualizar directamente desde la aplicación pero necesita que lo ejecutemos como root.

Para poder lanzar PyCharm como root, he añadido mi usuario al group wheel y editado con visudo el archivo /etc/sudoers para quitar el comentario a la línea:
%wheel ALL=(ALL) ALL

Después se incluye el usario en el grupo wheel y reiniciamos:
#usermod -a -G wheel usuario
#reboot
Tras reiniciar, hay que ejecutar PyCharm como root usando el comando sudo:

sudo ~/.local/share/flatpak/app/com.jetbrains.PyCharm-Community/x86_64/stable/84cb7490ad1a6235db4d377e9bd37beba690788c5cc1bbe34721082299cba1e2/files/pycharm/bin/pycharm.sh

Para actualizar, ir al menú Help, y seleccionar la opción Check for Updates...

domingo, 8 de septiembre de 2019

Creando particiones en un disco de 4TB con parted

Se van a crear dos particiones, una de 512GB y otra usando el resto de espacio disponible.

# parted /dev/sde
GNU Parted 3.2
Using /dev/sde
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
Model: ATA WDC WD40EFRX-68W (scsi)
Disk /dev/sde: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags: 

Number  Start  End     Size    File system  Flags
 1      0.00B  4001GB  4001GB  xfs

(parted) mklabel gpt                                                  
Warning: The existing disk label on /dev/sde will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? yes                                                               
(parted) unit TB                                                          
(parted) mkpart primary 0.0GB 512.0GB
(parted) print                                                            
Model: ATA WDC WD40EFRX-68W (scsi)
Disk /dev/sde: 4.00TB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name     Flags
 1      0.00TB  0.51TB  0.51TB               primary

(parted) quit                                                             
Information: You may need to update /etc/fstab.
# parted /dev/sde
GNU Parted 3.2
Using /dev/sde
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
Model: ATA WDC WD40EFRX-68W (scsi)
Disk /dev/sde: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size   File system  Name        Flags
 1      1049kB  512GB  512GB               WDred4TBn1
# parted --align optimal /dev/sde
GNU Parted 3.2
Using /dev/sde
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: ATA WDC WD40EFRX-68W (scsi)
Disk /dev/sde: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size   File system  Name        Flags
 1      1049kB  512GB  512GB               WDred4TBn1

(parted) align-check opt 1
1 aligned
(parted) unit tb
(parted) mkpart primary 512.0GB
End? 4.0TB                                                                
(parted) print                                                            
Model: ATA WDC WD40EFRX-68W (scsi)
Disk /dev/sde: 4.00TB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name        Flags
 1      0.00TB  0.51TB  0.51TB               WDred4TBn1
 2      0.51TB  4.00TB  3.49TB               primary

(parted) name 2 WDred4TBn2                                                
(parted) print                                                            
Model: ATA WDC WD40EFRX-68W (scsi)
Disk /dev/sde: 4.00TB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name        Flags
 1      0.00TB  0.51TB  0.51TB               WDred4TBn1
 2      0.51TB  4.00TB  3.49TB               WDred4TBn2

(parted) align-check                                                      
alignment type(min/opt)  [optimal]/minimal? opt                           
Partition number? 2                                                       
2 aligned
(parted) align-check opt 1
1 aligned
(parted) quit

lunes, 3 de junio de 2019

Velocidad de la conexion a Internet

He recibido un correo avisando de que le proveedor de Internet (UnityMedia) va a realizar trabajos supuestamente para mejoras en la red.

El día 3 de Junio, las pruebas de velocidad obtienen el siguiente resultado:

El resultado desde la linea de comandos no devuelve un resultado significativamente mejor, se repite la medida cinco veces:
$ speedtest-cli
Retrieving speedtest.net configuration...
Testing from Unitymedia (**.***.***.***)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by 23media GmbH (********) [2.33 km]: 30.901 ms
Testing download speed................................................................................
Download: 17.86 Mbit/s
Testing upload speed....................................................................................................
Upload: 2.60 Mbit/s

$ speedtest-cli
Retrieving speedtest.net configuration...
Testing from Unitymedia (**.***.***.***)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by 23media GmbH (********) [2.33 km]: 31.848 ms
Testing download speed................................................................................
Download: 14.88 Mbit/s
Testing upload speed....................................................................................................
Upload: 2.45 Mbit/s

$ speedtest-cli
Retrieving speedtest.net configuration...
Testing from Unitymedia (**.***.***.***)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Vodafone Kabel Deutschland (********) [2.33 km]: 32.165 ms
Testing download speed................................................................................
Download: 22.19 Mbit/s
Testing upload speed....................................................................................................
Upload: 5.91 Mbit/s

$ speedtest-cli
Retrieving speedtest.net configuration...
Testing from Unitymedia (**.***.***.***)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by MK Netzdienste (********) [2.33 km]: 31.193 ms
Testing download speed................................................................................
Download: 24.35 Mbit/s
Testing upload speed....................................................................................................
Upload: 2.49 Mbit/s

$ speedtest-cli
Retrieving speedtest.net configuration...
Testing from Unitymedia (62.143.152.133)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Vodafone Kabel Deutschland (Frankfurt) [2.33 km]: 34.471 ms
Testing download speed................................................................................
Download: 19.58 Mbit/s
Testing upload speed....................................................................................................
Upload: 5.99 Mbit/s


Actualizado a fecha 31 Jul 2019:
No parece que hayan mejorado respecto a la velocidad:
$ speedtest-cli
Retrieving speedtest.net configuration...
Testing from Unitymedia (62.143.152.133)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Vodafone DE (Frankfurt) [1.52 km]: 35.338 ms
Testing download speed................................................................................
Download: 14.53 Mbit/s
Testing upload speed......................................................................................................
Upload: 5.92 Mbit/s

$ speedtest-cli
Retrieving speedtest.net configuration...
Testing from Unitymedia (62.143.152.133)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by fdcservers.net (Frankfurt) [1.52 km]: 33.2 ms
Testing download speed................................................................................
Download: 17.24 Mbit/s
Testing upload speed......................................................................................................
Upload: 6.29 Mbit/s

domingo, 2 de junio de 2019

Cambiando la ubicación del archivo journal

He cambiado la ubicación de journal porque al intentar acceder al log de algún arranque anterior al actual aparece el siguiente error:
journalctl -b -1
Specifying boot ID or boot offset has no effect, no persistent journal was found.

mkdir -p /var/log/journal
systemd-tmpfiles --create --prefix /var/log/journal
[/usr/lib/tmpfiles.d/mdadm.conf:1] Line references path below legacy directory /var/run/, updating /var/run/mdadm → /run/mdadm; please update the tmpfiles.d/ drop-in file accordingly.
[/usr/lib/tmpfiles.d/pptp.conf:1] Line references path below legacy directory /var/run/, updating /var/run/pptp → /run/pptp; please update the tmpfiles.d/ drop-in file accordingly.
systemctl restart systemd-journald

Ahora el journal se crean en una nueva ubicación:
ll /var/log/journal/
total 0
drwxr-sr-x+ 2 root systemd-journal 28 Jun  2 19:09 9a85483ca35740a8a3e7537687fe062a

Después de reiniciar, al listar los arranques almacenados aparecen mas de uno:
journalctl --list-boots
-1 ee4accf1fe6c408e94ad96fe8988080a Sun 2019-06-02 18:57:40 CEST—Sun 2019-06-02 19:19:24 CEST
 0 976f76e67e6244ab83eeb18dbd77ed62 Sun 2019-06-02 19:30:27 CEST—Sun 2019-06-02 19:36:14 CEST

Esta solución se aplica según lo indicado aquí.

sábado, 13 de abril de 2019