This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $auPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" | |
| New-Item -Path $auPath -Force | Out-Null | |
| Set-ItemProperty -Path $auPath -Name "NoAutoUpdate" -Value 1 -Type DWord | |
| Set-ItemProperty -Path $auPath -Name "AUOptions" -Value 2 -Type DWord | |
| Set-ItemProperty -Path $auPath -Name "NoAutoRebootWithLoggedOnUsers" -Value 1 -Type DWord | |
| $wuPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" | |
| New-Item -Path $wuPath -Force | Out-Null | |
| Set-ItemProperty -Path $wuPath -Name "DeferFeatureUpdatesPeriodInDays" -Value 365 -Type DWord | |
| Set-ItemProperty -Path $wuPath -Name "DeferQualityUpdatesPeriodInDays" -Value 30 -Type DWord |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rsync -ax --delete --numeric-ids --info=progress2 <SRC> <DST> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # mix | |
| fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=fiotest --filename=testfio --bs=4k --iodepth=64 --size=8G --readwrite=randrw --rwmixread=75 | |
| # write | |
| fio --name=randwrite --ioengine=libaio --iodepth=1 --rw=randwrite --bs=4k --direct=1 --size=1G --numjobs=1 --runtime=60 --time_based --group_reporting | |
| # read | |
| fio --name=test --ioengine=sync --iodepth=1 --rw=randread --bs=4k --numjobs=1 --size=1G --runtime=30s --time_based |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # On client | |
| ss -K dst <SERVER_IP> dport = 2049 | |
| # On server | |
| iptables -I INPUT -s <CLIENT_IP> -p tcp -m tcp --sport 828 --dport 2049 -j REJECT --reject-with tcp-reset; sleep 60; iptables -D INPUT -s <CLIENT_IP> -p tcp -m tcp --sport 828 --dport 2049 -j REJECT --reject-with tcp-reset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ps -eo pid,comm,stat,wchan | grep ' D ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| while :; do date; sysctl -n vfs.numvnodes kern.maxvnodes vfs.wantfreevnodes; sleep 3; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| touch /share/test.txt | |
| service rpcbind stop | |
| service nfslock stop | |
| rm -rf /var/lib/nfs/statd/sm/* | |
| rm -rf /var/lib/nfs/statd/sm.bak/* | |
| umount /share -f | |
| service rpcbind stop | |
| service nfslock stop | |
| umount /share -f | |
| lsof | grep /users/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| runas /user:DOMAIN\ttest cmd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ifModule mod_headers.c> | |
| Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" env=HTTPS | |
| Header set X-XSS-Protection "1; mode=block" | |
| Header set X-Content-Type-Options nosniff | |
| Header set X-Frame-Options DENY | |
| Header add Content-Security-Policy "default-src * data: blob: filesystem: about: ws: wss: 'unsafe-inline' 'unsafe-eval' 'unsafe-dynamic'; script-src * data: blob: 'unsafe-inline' 'unsafe-eval'; connect-src * data: blob: 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src * data: blob: ; style-src * data: blob: 'unsafe-inline'; font-src * data: blob: 'unsafe-inline';" | |
| </ifModule> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| uname -a | |
| lsb_release -a | |
| lscpu | grep "MHz". | |
| sudo dmidecode -t processor | grep "Speed" | |
| lshw -c cpu | egrep "capacity|size" | |
| sudo lshw -c cpu | egrep "capacity|size" | |
| head /sys/devices/system/cpu/cpu0/cpufreq/scaling_* | |
| yum install -y powertop | |
| powertop |
NewerOlder