Thứ Tư, 14 tháng 6, 2017

Quản lý và giới hạn CPU trên từng process trên Ubuntu






Bước 1: Cài công cụ CPUTool

Code:
$ sudo apt install cputool
Bước 2: giới hạn CPU dựa trên ID của tiến trình

Code:
# cputool --cpu-limit 50 -p 8275
Nghĩa là: giới hạn 50% CPU cho tiến trình có ID là 8275

Bước 3: Để giới hạn CPU của một nhóm các tiến trình liên quan

Tìm các tiến trình liên quan đến ứng dụng

Code:
# pidof apache2
9592 3643 3642 3641 3640 3638 3637 1780
Giới hạn CPU nhóm các tiến trình

Code:
# cputool --cpu-limit 20 -P 1780
Bước 4: Cấu hình chạy rsync khi load máy chủ nhỏ hơn 3.5

Code:
# cputool --load-limit 3.5 --rsync -av /home/tecmint /backup/`date +%Y-%m-%d`/

Các cách phòng chống WANNACRY ransomware




Cách 1. Cập nhật Windows
Đây là điều đầu tiên các bạn cần làm đối với máy tính hay VPS/Server của mình. Trong một số trường hợp, việc cập nhật tốn quá nhiều thời gian và có thể gây ra lỗi do mất kết nối. Các bạn có thể tải các bản cập nhật đặc biệt theo các đường dẫn dưới đây.
Windows Server 2003, Windows Server 2003, Datacenter Edition (x64 system for Windows Server 2003 security update custom support)
http://download.windowsupdate.com/c/csa/csa/secu/2017/02/windowsserver2003-kb4012598-x64-custom-cht_23a0e14eee3320955b6153ed7fab2dd069d39874.exe
Windows Server 2003, Windows Server 2003, Datacenter Edition, Windows Server 2003 Security Update Custom Support) 
http://download.windowsupdate.com/c/csa/csa/secu/2017/02/windowsserver2003-kb4012598-x86-custom-Cht_71a7359d308c8bda7638b4dc4ea305e7e22cc4c2.exe
Cách 2. Tắt SMB trong Windows
Để tắt SMB trong Windows các bạn có thể sử dụng 1 trong 2 cách sau đây
Sử dụng Power Shell với quyền Administrator
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 -Force
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB2 -Type DWORD -Value 0 -Force
Sử dụng CMD với quyền Administrator
sc.exe config lanmanworkstation depend= bowser/mrxsmb20/nsi
sc.exe config mrxsmb10 start= disabled
sc.exe config lanmanworkstation depend= bowser/mrxsmb10/nsi
sc.exe config mrxsmb20 start= disabled
Sau khi thực hiện xong các bạn nên restart lại máy để cập nhật cấu hình.
Cách 3. Cài đặt Anti Ransomware của Bitdefender
Đây là bản miễn phí, các bạn có thể tải về tại https://www.bitdefender.com/solutions/anti-ransomware-tool.html

Thứ Hai, 12 tháng 6, 2017

Nâng cấp Virtuozzo Automator

Bước 1: Nâng cấp Virtuozzo Automator Management Panel, ta ssh vào máy ảo container đang chạy Virtuozzo Automator và gõ lệnh sau: 

Code:
# yum groupupdate "VA Management Node" "VA Control Center"
Bước 2: Nâng cấp Virtuozzo Automator Agent, ta thực hiện trên từng máy chủ Hardware node

Code:
# yum groupupdate "VA Agent"