start /w msiexec /x {PRO-DU-C-T-CODE} /l*v C:\debug.log /qn REBOOT=R
Find orphan nginx/Apache configs left by Plesk
comm -23 <(for i in /etc/nginx/plesk.conf.d/webmails/*.conf; do basename "${i%_*}"; done | sort) <(plesk bin site -l | idn | sort) comm -23 <(for i in /etc/nginx/plesk.conf.d/vhosts/*.conf; do basename "${i::-5}"; done | sort) <(plesk bin site -l | idn | sort) comm -23 <(for i in /etc/nginx/plesk.conf.d/ip_default/*.conf; do basename "${i::-5}"; done | sort) <(plesk bin site -l | idn | sort) comm -23 <(for i in /etc/nginx/plesk.conf.d/forwarding/*.conf; do basename "${i%_*}"; done | sort) <(plesk bin site -l | idn | sort)
comm -23 <(for i in /etc/apache2/plesk.conf.d/webmails/*.conf; do basename "${i%_*}"; done | sort) <(plesk bin site -l | idn | sort) comm -23 <(for i in /etc/apache2/plesk.conf.d/vhosts/*.conf; do basename "${i::-5}"; done | sort) <(plesk bin site -l | idn | sort) comm -23 <(for i in /etc/apache2/plesk.conf.d/ip_default/*.conf; do basename "${i::-5}"; done | sort) <(plesk bin site -l | idn | sort) comm -23 <(for i in /etc/apache2/plesk.conf.d/forwarding/*.conf; do basename "${i%_*}"; done | sort) <(plesk bin site -l | idn | sort)
Run strace with the more verbose output
strace -ttvvfFs4096 -o file_to_write_log command /-ppid
Update traffic control settings
Update traffic control settings for SolusVM node
php /usr/local/solusvm/includes/trafficloader.php --mode=all --debug=1
Show traffic control settings for interface
tc class show dev kvmID
OVZ, show resources for CT
- With headers
sed -nr "1,2p;/${CTID}:/,+23p" /proc/user_beancounters
- In human-readable format
vzubc
Upload file to FTP using cURL
curl -vv -T --user username:password ftp://example.com/
List all scheduled tasks using PowerShell
Get-ScheduledTask -TaskPath "\" | % { $Task = "" | Select Task, Description, Enabled, Application, Arguments; $TaskInfo = [xml](Export-ScheduledTask $_); $Task.Task = $_.TaskName; $Task.Description = $_.Description; $Task.Enabled = $TaskInfo.Task.Settings.Enabled; $Task.Application = $TaskInfo.Task.Actions.Exec.Command; $Task.Arguments = $TaskInfo.Task.Actions.Exec.Arguments; $Task } | FL
Testing mail using cURL
List messages in the INBOX over IMAP(S):
curl -k -v --url 'imaps://mail.example.com:993' --user 'admin@example.com:setup' --request "EXAMINE INBOX"
Send a message over SMTP+STARTTLS:
curl -k -v --url 'smtp://mail.example.com:25' --user 'admin@example.com:setup' --ssl-reqd --mail-from 'admin@example.com' --mail-rcpt 'admin@example.org' --upload-file message
Automatically rebind MySQL server to local/all interfaces
plesk sbin mysqlmng --bind-address local
plesk sbin mysqlmng --bind-address all
Bind and connect to TCP socket using PowerShell
- Bind
$Listener = [System.Net.Sockets.TcpListener]443 $Listener.Start() while($true) { $client = $Listener.AcceptTcpClient() Write-Host "Connection received!" $client.Close() }
- Connect
(New-Object Net.Sockets.TcpClient).Connect('192.0.2.1', 443)