November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

How do I calculate %CPU in my own libvirt programs?

How do I calculate %CPU in my own libvirt programs?

 

Virt-top FAQ ( http://people.redhat.com/~rjones/virt-top/faq.html#calccpu )

Simple %CPU usage for a domain is calculated by sampling virDomainGetInfoperiodically and looking at the virDomainInfo cpuTime field. This 64 bit field counts nanoseconds of CPU time used by the domain since the domain booted. Let t be the […]

Speed up scp file transfer

Speed up scp file transfer Speed up scp file transfer 20/05/2008 Syed Atif Ali Whats the fastest encryption to transfer files with SCP ?

Description : Many times it is required to transfer files across machines on the same network , all machinesbeing on the same network and behind proxy its useless to transfer them […]

[CentOS 7.0] Change network interface name (eno* to eth0)

[CentOS 7.0] Change network interface name (eno* to eth0) Step1) # vim /etc/udev/rules.d/70-persistent-net.rules ———————————————————————– # PCI device 0x14e4:0x1680 (tg3) SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:0c:29:7b:d8:06“, ATTR{dev_id}==”0x0″, ATTR{type}==”1″, KERNEL==”eno16777736“, NAME=”eth0” ———————————————————————– or ———————————————————————– # PCI device 0x14e4:0x1680 (tg3) SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:0c:29:7b:d8:06“, ATTR{dev_id}==”0x0″, ATTR{type}==”1″, KERNEL==”eno*“, NAME=”eth0” ———————————————————————– Step2) # mv /etc/sysconfig/network-scripts/ifcfg-eno16777736 /etc/sysconfig/network-scripts/ifcfg-eth0

Step3) # vim /etc/sysconfig/network-scripts/ifcfg-eth0 ———————————————————————– HWADDR=”00:0C:29:7B:D8:06″ […]

[CentOS 7.0] Change the default “enxx” network device to old “eth0” on CentOS 7

[CentOS 7.0] Change the default “enxx” network device to old “eth0” on CentOS 7 The easiest way to restore the old way Kernel/modules/udev rename your ethernet interfaces is supplying these kernel parameters to CentOS 7:

net.ifnames=0 biosdevname=0

To do so follow this steps:

Edit /etc/default/grub At the end of GRUB_CMDLINE_LINUX line append “net.ifnames=0 biosdevname=0” Save […]

[CentOS 7.0] Configure Networking

[CentOS 7.0] Configure Networking [1] Set static IP address to the server. ( Replace the section ‘ifcfg-***’ to your own interface name )

# install the package below which includes ifconfig, netstat and so on first

[root@dlp ~]#yum -y install net-tools

[root@dlp ~]#vi /etc/sysconfig/network-scripts/ifcfg-eno16777736

HWADDR=”00:0C:29:CD:9C:2D” TYPE=”Ethernet”

# change BOOTPROTO=”none” DEFROUTE=”yes” PEERDNS=”yes” PEERROUTES=”yes” IPV4_FAILURE_FATAL=”no” IPV6INIT=”yes” IPV6_AUTOCONF=”yes” […]

[CentOS 7.0] Change RunLevel

[CentOS 7.0] Change RunLevel [1] RunLevel is set with linking to /etc/systemd/system/default.target. For example, the default setting without GUI is like follows.

# show current setting [root@dlp ~]#systemctl get-default multi-user.target

[root@dlp ~]#ll /etc/systemd/system/default.target lrwxrwxrwx. 1 root root 37 Jul 9 06:04 /etc/systemd/system/default.target -> /lib/systemd/system/multi-user.target

[2] For example, if you’d like to change the RunLevel to […]

CentOS 7.0 server installation configuration vsftp

CentOS 7.0 server installation configuration vsftp

First, configure the firewall to open the ports needed to FTP server

CentOS 7.0 is the default firewall as a firewall, here to iptables firewall. 1, closed firewall:

systemctl stop firewalld.service # Stop firewall

systemctl disable firewalld.service # prohibit firewall boot

2. Install iptables firewall

yum install iptables-services # […]

Centos7 on an HP G5 DL380

Starting with RHEL/EL7 the drivers for the raid controller card, the P400i, are no longer loaded in by default. When you go to install Centos 7 on one of these you will likely see that it doesn’t detect your LD.

When you boot up and go into the install, press tab to get to your […]

MYSQL mariadb CENTOS 7

MYSQL CENTOS 7

wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm rpm -ivh mysql-community-release-el7-5.noarch.rpm yum update yum install mysql-server

systemctl start mysqld

[root@clusterserver1 ~]# systemctl start mysqld [root@clusterserver1 ~]# systemctl enable mysqld [root@clusterserver1 ~]# systemctl status mysqld

[root@clusterserver1 ~]# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

[…]

XFS CENTOS 7

Last login: Mon Sep 5 22:48:00 2016 from 192.168.1.1 clusterserver1 without LVM Create an “clusterserver1” file system We have “/dev/sdb” as a free hard drive :

[root@clusterserver1 ~]# lsblk -f NAME FSTYPE LABEL UUID MOUNTPOINT fd0 sda ??sda1 clusterserver1 aba69d25-b3de-4d89-ba25-e50a8dcf10eb /boot ??sda2 LVM2_member EE31dY-Ubnm-LwCA-8J9J-vK9B-XNzz-OZSt75 ??centos-swap swap 2e1fb731-0f59-4d10-9f2f-e302a671de57 [SWAP] ??centos-root clusterserver1 8e1d8c59-5cd0-4716-92dd-de7c1417dc74 / sdb sr0 iso9660 […]