x11vnc and Dummy Monitor

Setup x11vnc

Install package:

$ apt install x11vnc

Set password:

$ x11vnc -storepasswd /etc/x11vnc.pass

Create x11vnc service:

$ vim /lib/systemd/system/x11vnc.service
[Unit]
Description=Start x11vnc at startup.
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared
[Install]
WantedBy=multi-user.target

Enable the service:

$ systemctl enable x11vnc.service 
$ systemctl daemon-reload

Reboot.

Setup Dummy Monitor Driver

Install package:

$ apt install xserver-xorg-video-dummy

Configure xorg.conf:

$ vim /etc/X11/xorg.conf
Section "Device"
  Identifier  "Configured Video Device"
  Driver      "dummy"
EndSection

Section "Monitor"
  Identifier "Configured Monitor"
  HorizSync 31.5-48.5
  VertRefresh 50-70
EndSection

Section "Screen"
  Identifier "Default Screen"
  Monitor "Configured Monitor"
  Device "Configured Video Device"
  DefaultDepth 24
  SubSection "Display"
    Depth 24
    Modes "1920x1080"
  EndSubSection
EndSection

Bright Cluster – HA Setup

  1. Configure failover interface in 1st Head Node
  2. Register license for HA
  3. Prepare HA configuration using command
     $ cmha-setup
  4. Go to Setup menu to prepare configuration
  5. Check Clone Failover for clone instruction
  6. Power-on second head node, let it boot to PXE
  7. Select Rescue in PXE menu
  8. Login as root
  9. Start cloning by calling
     $ /cm/cm-clone-install --failover
  10. The second head node will reboot automatically once completed
  11. Back to primary head node.
  12. In cmha-setup menu, select Finalize.
  13. Verify HA status
     $ cmha status
  14. In cmha-setup menu, configure shared storage.

 

Reverse SSH

Tested on CentOS, but should be applicable on Ubuntu as well.

  1. Add Epel repo, https://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/
  2. Install autossh
     $ yum install autossh
  3. Run autossh command with the following format
     $ autossh -M -fN <login@remoteserver> -R :localhost:22
     
     E.g.:
     $ autossh -M 20000 -fN support@remote.com -R 12021:localhost:22

Limiting CPU Usage of A Process in CentOS/RHEL 7

In HPC, we may need to protect head node from unnecessary heavy process that may cause login problem for users. One of the solutions is by using cpulimit. We can create a cronjob to monitor all processes and set certain limit for them. This is how I usually did in CentOS/RHEL 7.x.

  1. Install cpulimit package from EPEL repo.

yum install cpulimit

  1. Create a script to monitor the process. The script below is a modified version of the script in this forum. You can modify inputs of the first 3 variables: CPU_LIMIT, BLACK_PROCESSES_LIST, and WHITE_PROCESSES_LIST.

Read More …