HostOnNet Blog

Category Archives: Linux

atop – a better top

atop is command line tool like top, shows CPU, Memory and Disk usage. It highlight overloaded resources, this make it easy to identify system bottlenecks. atop come with cronjob, that connect data, can be used to analyse system performance. To


iptables -F block all ports

Today i run iptables -F on a server, that blocked access to all ports. This was a Plesk server with firewall enabled through Plesk control panel. This is because default policy is set to DROP all connections. Before you run


r1soft Failed to backup LVM/MD configuration

When using r1soft backup service, backup failed with error Failed to backup LVM/MD configuration Failed to execute command ‘lvm.static pvs -o pv_fmt,pv_uuid,dev_size,pv_name,pv_mda_free,pv_mda_size,pv_all,seg_all,pvseg_all,vg_all,lv_all –nameprefixes –noheadings –units b –nosuffix –unquoted’ This is because the /usr/sbin/r1soft/lib/lvm.static file provided with r1soft agent is not


Installing X2Go Server on Debian

To install X2Go server on Debian, add the key Now add X2Go repo by editing file For debian 9, add If you are using different debian version, replace stretch with name of your debian version. You can find this with


Check if a command was successful

When you execute a program in linux command prompt or bash script, program return an exit code on completion. Return value is available in special variable $? When a program execute successfully, it return 0. For example Here first command


lspci

lspci list all PCI device on your system. On CentOS, lspci is part of package pciutils To list all PCI devices on your system, run To get detailed listing of devices, run Another useful command is lsusb, that list all


grub2-install

grub need to be installed on boot sector of a hard disk. So always use device name like /dev/sda, don’t use partition name like /dev/sda1 See grub


efibootmgr

verbose result see Check if your Server booted using UEFI


Check if your Server booted using UEFI

To check if your system is using UEFI boot, you can use following method. Method 1: efibootmgr On CentOS 7, efibootmgr is provided by package efibootmgr. This server is using UEFI Here is a server that is not booted with


ddos

To see list of IP connect to port 80 of your web server, run Blocking DDoS with CSF Set CT_LIMIT to 30, set it back to 100 after attack stop. Set SYNFLOOD to 1, set it back to 0 after