Thursday, June 3, 2021

Powersave profile

 yum install kernel-tools -y

cpupower frequency-info

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

cat /proc/cpuinfo | grep '^[c]pu MHz' |awk {'print $4'} |sort -r -u |head -n 5

cpupower frequency-set -g powersave

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

cat /proc/cpuinfo | grep '^[c]pu MHz' |awk {'print $4'} |sort -r -u |head -n 5

Wednesday, June 2, 2021

Ubuntu Migrating over from systemd-networkd to NetworkManager

https://www.configserverfirewall.com/ubuntu-linux/ubuntu-network-manager/

https://jbit.net/NetworkManager_Strictly_Unmanaged/

Sunday, March 28, 2021

Want to delete all Thumbs.db recusively?

In a power shell run..

# to view

Get-ChildItem -Path . -Include Thumbs.db -Recurse -Name -Force

# to delete

Get-ChildItem -Path . -Include Thumbs.db -Recurse -Name -Force | Remove-Item -Force

Friday, March 12, 2021

Fedora 33 install latest kernel from koji

dnf install koji
koji list-builds --package=kernel --after="2021-03-01"
koji download-build --arch=x86_64 kernel-5.11.5-50.fc33
dnf update kernel-*.rpm


#source
#https://fedoraproject.org/wiki/Test_Day:2021-03-08_Kernel_5.11_Test_Week

Fedora 32 -> 33 Upgrade

dnf upgrade -y --refresh
dnf install -y dnf-plugin-system-upgrade
dnf system-upgrade download --releasever=33

dnf system-upgrade reboot

dnf system-upgrade clean
dnf clean packages



#source
#https://www.linuxjournal.com/content/how-upgrade-fedora-32-fedora-33-cli-graphical-methods

Same faster way to generate ramdom data and store into a file

openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" -nosalt < /dev/zero > /tmp/randomfile.bin


#source, idea
#https://dev.to/thojest/comment/ilfi

Thursday, March 4, 2021

Fedora 32/33 time not synced

... this is now done via Chrony...

 

timedatectl
              Local time: Thu 2021-03-04 13:15:06 EST
           Universal time: Thu 2021-03-04 18:15:06 UTC
                 RTC time: Thu 2021-03-04 18:14:27
                Time zone: America/New_York (EST, -0500)
System clock synchronized: no
              NTP service: active
          RTC in local TZ: no


systemctl status systemd-timesyncd
systemd-timesyncd.service - Network Time Synchronization
     Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; disabled; vendor preset: disabled)
     Active: inactive (dead)
       Docs: man:systemd-timesyncd.service(8)

systemctl start systemd-timesyncd
systemctl enable systemd-timesyncd
hwclock --systohc


timedatectl

              Local time: Thu 2021-03-04 13:16:06 EST
           Universal time: Thu 2021-03-04 18:16:06 UTC
                 RTC time: Thu 2021-03-04 18:16:27
                Time zone: America/New_York (EST, -0500)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

Tuesday, January 5, 2021

Specific drive IO stats grouped per time

> dstat -tdD total,sde 60
----system---- --dsk/sde----dsk/total-
            time     | read  writ       : read  writ
05-01 10:32:47 |                      :
05-01 10:33:47 | 9896k  112k : 630M  833M
05-01 10:34:00 |    11M     0   : 660M  994M

Friday, October 30, 2020

Check the open files limit and current for a process

> for p in $(pidof java); do printf "$p: "; ls -l /proc/$p/fd |wc -l; done
54055: 93
54008: 9


> for p in $(pidof java); do printf "$p: "; cat /proc/$p/limits |grep open; done
54055: Max open files            65536                65536                files
54008: Max open files            65536                65536                files

Friday, October 9, 2020

Compiler flags

want to find compiler flags supported by your CPU?

gcc -v -E -x c /dev/null -o /dev/null -march=native 2>&1 | grep /cc1

Saturday, August 8, 2020

LVM Raid10 on 4 HD with SSD cache

sdc/sdd are SSD, sde through sdh are 3TB HDD

vgcreate data_sata1 /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh


lvcreate --type raid10 -m 1 -i 2 --stripesize 1024k -l100%free -n plots data_sata1 /dev/sde /dev/sdf /dev/sdg /dev/sdh


lvcreate --type raid1 -m 1 -l 100%free -n cache data_sata1 /dev/sdc /dev/sdd

lvconvert --type cache --cachevol cache --cachemode writeback --chunksize 1024 data_sata1/plots

mkfs.xfs /dev/mapper/data_sata1-plots

Wednesday, July 29, 2020

LVM Looking up stripes and stripesize of logical volumes

lvs -o+lv_layout,stripes,stripesize
  LV    VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Layout     #Str Stripe
  data  fedora_node-2 -wi-ao---- 400.00g                                                     linear        1     0
  data  fedora_node-2 -wi-ao---- 400.00g                                                     linear        1     0
  root  fedora_node-2 -wi-ao---- <33.45g                                                     linear        1     0
  root  fedora_node-2 -wi-ao---- <33.45g                                                     linear        1     0
  swap  fedora_node-2 -wi-ao----  15.73g                                                     linear        1     0
  plots scratch_nvme1 rwi-aor---  <1.82t                                                     raid,raid0    2  1.00m
  plots scratch_sata1 rwi-aor---   2.91t                                                     raid,raid0    4  1.00m
  plots scratch_sata2 rwi-aor---  <1.46t                                                     raid,raid0    4  1.00m