Sunday, July 17, 2022

Find flags with which a file was opened

 lsof +fg /chia/scratch/disk01/subspace/plot3/plot-index-to-offset/000017.sst
COMMAND      PID         USER   FD   TYPE FILE-FLAG DEVICE SIZE/OFF        NODE NAME
subspace- 134267 srv_subspace  273r   REG     LG,CX  254,6 67377874 45101533594 /chia/scratch/disk01/subspace/plot3/plot-index-to-offset/000017.sst

 

# man lsof |grep "Flag in C code" -A 21
                          Abbrev.   Flag in C code (see open(2))

                          W         O_WRONLY
                          RW        O_RDWR
                          CR        O_CREAT
                          EXCL      O_EXCL
                          NTTY      O_NOCTTY
                          TR        O_TRUNC
                          AP        O_APPEND
                          ND        O_NDELAY
                          SYN       O_SYNC
                          ASYN      O_ASYNC
                          DIR       O_DIRECT
                          DTY       O_DIRECTORY
                          NFLK      O_NOFOLLOW
                          NATM      O_NOATIME
                          DSYN      O_DSYNC
                          RSYN      O_RSYNC
                          LG        O_LARGEFILE
                          CX        O_CLOEXEC
                          TMPF      O_TMPFILE

Wednesday, June 15, 2022

Blacklist Nouveau to install NVIDIA native GPU drivers

 

  • Create the /usr/lib/modprobe.d/blacklist-nouveau.conf file and add the following information to the file.

    blacklist nouveau

    options nouveau modeset=0

  • Re-generate initramfs.

    $sudo dracut --force

     

     

     

    https://support.huawei.com/enterprise/en/doc/EDOC1100165479/93fe5683/how-to-disable-the-nouveau-driver-for-different-linux-systems

Saturday, March 5, 2022

FFMPEG on Fedora 34

dnf install \
https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

dnf update

dnf search ffmpeg

dnf install ffmpeg

 

https://www.cyberciti.biz/faq/how-to-install-ffmpeg-on-fedora-linux-using-dnf/

Sunday, December 26, 2021

Connect iPhone to Fedora

> install ifuse libimobiledevice-utils usbmuxd -y
> usbmuxd -f -v
> idevicepair pair      (you need to accept on your phone to trust)
> ifuse /mnt

TADA :-)

 

https://www.dedoimedo.com/computers/linux-iphone-6s-ios-11.html

 

 

Wednesday, October 13, 2021

Use Intel pstate instead of acpi cpufreq driver

 GRUB_CMDLINE_LINUX_DEFAULT="intel_pstate=enable quiet splash"

https://www.kernel.org/doc/html/latest/admin-guide/pm/intel_pstate.html

Monday, July 19, 2021

Add dummy NIC as service

echo "MACADDR=56:12:b6:2a:aa:34" > /etc/sysconfig/dummy

vim /etc/systemd/system/dummy@.service 

# Remember to run `systemctl daemon-reload` after creating or editing this file.

[Unit]
Description=Dummy network interface for %i
After=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/sysconfig/%i-dummy
ExecStartPre=/sbin/ip link add %i-dummy address ${MACADDR} type dummy

[Install]
WantedBy=multi-user.target
 
systemctl daemon-reload
systemctl enable dummy@foo.service
systemctl start dummy@foo.service


source:  https://jamielinux.com/docs/libvirt-networking-handbook/appendix/dummy-interface-on-fedora.html

Monday, July 12, 2021

Fedora find all non-ascii characters in a file

grep -n -P "[^\x00-\x7F]" -R --include="*.py" chia/


chia/full_node/full_node.py:910:            f"⏲️  Finished signage point {request.index_from_challenge}/"
chia/full_node/full_node.py:970:            f"🌱 Updated peak to height {record.height}, weight {record.weight}, "
chia/full_node/full_node.py:1361:                f"🍀 ️Farmed unfinished_block {block_hash}, SP: {block.reward_chain_block.signage_point_index}, "
chia/full_node/full_node.py:1576:                    f"⏲️  Finished sub slot, SP {self.constants.NUM_SPS_SUB_SLOT}/{self.constants.NUM_SPS_SUB_SLOT}, "
chia/wallet/wallet_blockchain.py:261:                self.log.info(f"💰 Updated wallet peak to height {block_record.height}, weight {block_record.weight}, ")

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