sudo powermetrics sudo powermetrics --samplers smc **** SMC sensors **** CPU Thermal level: 0 GPU Thermal level: 22 IO Thermal level: 22 Fan: 498.836 rpm CPU die temperature: 55.23 C GPU die temperature: 77.00 C CPU Plimit: 0.00 GPU Plimit (Int): 0.00 GPU3 Plimit (Ext2): 0.00
mac : commad line : RemoteManagement kickstart
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users admin -privs -all -restart -agent -menu
linux : /var/crash/ : disk full Hint
du -msh /var/crash/* rm /var/crash/????
mlocate : disk full & disable Hint
ps aux | grep updatedb killall updatedb ls -alh /var/lib/mlocate/ -rw-r----- 1 root slocate 30G mlocate.db.xxxxxx rm -f /var/lib/mlocate/mlocate.db.xxxxxx ll /etc/cron.daily/mlocate mkdir /etc/cron.daily/out mv /etc/cron.daily/mlocate /etc/cron.daily/out
Fedora 3X : resin.service regist Hint : systemctl daemon-reload & chkconfig
# cd # wget https://caucho.com/download/rpm-6.8/4.0.63/x86_64/resin-4.0.63-1.x86_64.rpm # rpm -ivh resin-pro-4.0.63-1.x86_64.rpm # systemctl daemon-reload # systemctl enable resin.service resin.service is not a native service, redirecting to systemd-sysv-install. Executing: /usr/lib/systemd/systemd-sysv-install enable resin Failed to execute /usr/lib/systemd/systemd-sysv-install: # yum install chkconfig -y # systemctl enable resin.service resin.service is not a native service, redirecting to systemd-sysv-install. […]
mac : ms office updater disable Hint
launchctl print gui/$(id -u) | grep microsoftlaunchctl disable gui/$(id -u)/com.microsoft.update.agent launchctl print-disabled gui/$(id -u) | grep microsoft launchctl stop com.microsoft.update.agent launchctl remove com.microsoft.update.agent sudo launchctl stop com.microsoft.update.agent sudo launchctl remove com.microsoft.update.agent sudo launchctl stop com.microsoft.autoupdate.helper sudo launchctl remove com.microsoft.autoupdate.helper
Linux : split big log file by size or date Hint
split -b 1GB test.log < test.log head -n $(cat test.log | grep -m1 -n "2021-07-11" -a | cut -d: -f1) | tail -n +$(cat test.log | grep -m1 -n "2021-07-10" -a | cut -d: -f1) > test.log.20210710 awk 'NR >= 10 && NR <= 100' test.log >new.log.100
MariaDB 10.5 : shrink ibdata after innodb_file_per_table = ON Hint
systemctl stop mariadb mv /var/lib/mysql/ibdata* /backup/ mv /var/lib/mysql/ib_logfile* /backup/ systemctl start mariadb
rsync relative Hint
rsync -avR --relative --address=192.168.1.42 192.168.1.46::all/test/db/./install/test.txt /backup install/ install/test.txt Result [192.168.1.46] /test/db/./install/test.txt [192.168.1.42] /backup/install/test.txt
Fedora : autossh Hint
yum install autossh -y autossh -M 0 -o ServerAliveInterval=30 -p22 -L 33061:127.0.0.1:3306 -N test@remote.com