Fedora - checking graphical session type (Wayland or Xorg)

Published on Author admin

How to check graphical session type (Wayland or Xorg) on Fedora system. At first, use following command to get current session ID: loginctl Next, use bellow command to check graphical session type: loginctl show-session ID -p Type where ID is session ID from previous command output. Example (where session ID = 1): $ loginctl  … Continue reading Fedora - checking graphical session type (Wayland or Xorg)

Linux - load new kernel with kexec - faster than reboot

Published on Author admin

Load new Linux kernel with kexec - method faster than reboot. Just run below script using sudo or as a root. Script is also available at: https://github.com/openterprise/scripts/blob/master/kexec.sh #!/bin/bash latestkernel=`ls -t /boot/vmlinuz-* | sed "s/\/boot\/vmlinuz-//g" | head -n1` echo "kernel current: $(uname -r)" echo "kernel target:  ${latestkernel}" echo "" echo "Arming kexec..." #kexec -l /boot/vmlinuz-${latestkernel} --initrd=/boot/initramfs-${latestkernel}.img… Continue reading Linux - load new kernel with kexec - faster than reboot

Capturing network traffic to/from virtual machine running on VMware ESXi host

Published on Author admin

How to capture network traffic from/to virtual machine running on VMware ESXi host. This method uses pktcap-uw tool which is available in ESXi 5.5 and later. First enable SSH on your VMware ESXi host. Connect to ESXi host via SSH. List running virtual machines and check World-ID: esxcli network vm list Assuming that our VM… Continue reading Capturing network traffic to/from virtual machine running on VMware ESXi host

AWS S3 backup script

Published on Author admin

Start with updating AWS CLI tool: pip3 install awscli --upgrade --user Script for backing up data into your AWS S3 bucket: #!/bin/bash pathtobackup='/home/USERNAME/data/' pathtoarchivefile='/home/USERNAME' filenameprefix='backup-nextcloud' secret='secretpassword' awsbucket='awsbucket-name' date=`date --iso-8601` archivefilename=$filenameprefix-$date.7z echo echo "Performing backup of $pathtobackup to s3://$awsbucket/$archivefilename" echo echo `date -Is` echo "Compressing $pathtobackup to $pathtoarchivefile/$archivefilename" echo 7za a $pathtoarchivefile/$archivefilename $pathtobackup -p$secret echo echo… Continue reading AWS S3 backup script