Archive

Author Archive

vmware vsphere esxi vicfg esxcli localcli PowerCLI

May 21st, 2013 No comments
vicfg-<esxcfg- deprecated> and other vCLI commands, include ESXCLI<from the server with vCLI package installed OR from the vMA virtual machine OR through vcenter server<-vihost parameter>>
esxcli<better use vCLI or PowerCLI instead. directly from esxi shell<console> OR from the server with vCLI package installed OR from the vMA virtual machine OR from vsphere PowerCLI prompt by using Get-EsxCli> OR through vcenter server<-vihost parameter>
localcli <localcli commands are equivalent to ESXCLI commands, but bypass hostd. The localcli commands are only for situations when hostd is unavailable and cannot be restarted. After you run a localcli command, you must restart hostd. Run ESXCLI commands after the restart. If you use a localcli command in other situations, an inconsistent system state and potential failure can result.>
PowerCLI cmdlets<windows powershell>
Some examples:
vicfg-hostops <conn_options> –operation shutdown –force
vicfg-hostops <conn_options> –operation shutdown –cluster <my_cluster>
vmware-cmd –config esxhome.cfg -l
vmware-cmd –config esxhome.cfg ‘/vmfs/volumes/505f5efb-38f8b83f-e1ce-1c6f65d2477b/OracleLinux/OracleLinux.vmx’ getuptime
esxcli [options] {namespace}+ {cmd} [cmd options]
esxcli –config esxhome.cfg network ip interface list
esxcli –config esxhome.cfg fcoe adapter list
esxcli –config esxhome.cfg storage nfs add -H <hostname> -s <sharepoint> -v <volumename>
esxcli –config esxhome.cfg –formatter=csv network ip interface list
esxcli –config esxhome.cfg –reason <reason> system shutdown poweroff <must be in maintenance mode>
esxcli –config esxhome.cfg –reason <reason> system shutdown reboot
esxcli <conn_options> system maintenanceMode set –enable true
Categories: VMware Cloud Tags:

oracle ocfs2 cluster filesystem best practise

May 21st, 2013 No comments
  • To check current settings of o2cb, check files under /sys/kernel/config/cluster/ocfs2/
  • To set new value for o2cb:

service o2cb unload
service o2cb configure

heartbeat dead threshold 151 #Iterations before a node is considered dead
network idle timeout 120000 #Time in ms before a network connection is considered dead
network keepalive delay 5000 #Max time in ms before a keepalive packet is sent
network reconnect delay 5000 #Min time in ms between connection attempts

service o2cb load

service o2cb status #will show new configuration if OVS in server pool; or it will show offline

PS:

o2cb – Default cluster stack for the OCFS2 file system, it includes
  • a node manager (o2nm) to keep track of the nodes in the cluster,
  • a heartbeat agent (o2hb) to detect live nodes
  • a network agent (o2net) for intra-cluster node communication
  • a distributed lock manager (o2dlm) to keep track of lock resources
  • All these components are in-kernel.
  • It also includes an in-memory file system, dlmfs, to allow userspace to access the in-kernel dlm
  • main conf files: /etc/ocfs2/cluster.conf, /etc/sysconfig/o2cb
  • more info here https://oss.oracle.com/projects/ocfs2-tools/dist/documentation/v1.4/o2cb.html
Categories: Clouding, HA, HA & HPC, Oracle Cloud Tags:

SaaS, PaaS, IaaS cloud differences in three illustrations

May 21st, 2013 No comments
SaaS

SaaS

PaaS

PaaS

 

IaaS

IaaS

Categories: Clouding Tags: , ,

xen note

May 21st, 2013 No comments
cat /proc/cpuinfo |egrep -i ‘vmx|svm|hvm’ #whether supported by CPU
xm info|grep hvm #xen, whether OS support HVM
xm block-attach guestdomain file://path/to/dsl-2.0RC2.iso  /dev/hdc ro #then mount it on guest
/etc/xen/xend-config.sxp
brctl show #bridge
service xendomains start #to startup VMs under /etc/xen/auto
xm sched-credit -d <domain> -c <cap>/-w <weight>#Get/set credit scheduler parameters
Categories: Clouding Tags:

resolved – change xen vm root password

May 21st, 2013 No comments

You can change Virtual Machine(xen) root password with following ways:

losetup -f #to check the next usable loop device
losetup <output of losetup -f> System.img #associate loop devices with regular file System.img. Read/Write to /dev/loop<x> will be redirected to System.img
fdisk -l /dev/loop0
  • If there’re multiple partitions:
kpartx -av /dev/loop0
#vgchange -a y <VGroup> #if LVM is implemented in Virtual Machine, do this to activate all known volume groups in the system
mount /dev/mapper/<partition name of /etc> /mnt
  • If there’s only one root partition:

#vgchange -a y <VGroup> #if LVM is implemented in Virtual Machine, do this to activate all known volume groups in the system

mount /dev/loop0 /mnt

After mounting, you can change root password now:

vi /mnt/etc/rc.local #echo password | passwd –stdin root
umount /mnt
vgchange -a y <VGroup> #if LVM is implemented in Virtual Machine, do this to de-activate all known volume groups in the system
kpartx -d /dev/loop0
losetup  -d /dev/loop0
vi /etc/rc.local #comment out “echo welcome1 | passwd –stdin root”
After all these steps, boot up the VM using xm create vm.cfg, and you’ll find password for root has been changed.
Categories: Clouding, Oracle Cloud Tags:

cpu hyperthreading vs dual core

May 14th, 2013 No comments

Note: This is from http://www.richweb.com/cpu_info

A hyperthreaded processor has the same number of function units as an older, non-hyperthreaded processor. It just has two execution contexts, so it can maybe achieve better function unit utilization by letting more than one program execute concurrently. On the other hand, if you’re running two programs which compete for the same function units, there is no advantage at all to having both running “concurrently.” When one is running, the other is necessarily waiting on the same function units.

A dual core processor literally has two times as many function units as a single-core processor, and can really run two programs concurrently, with no competition for function units.

A dual core processor is built so that both cores share the same level 2 cache. A dual processor (separate physical cpus) system differs in that each cpu will have its own level 2 cache. This may sound like an advantage, and in some situations it can be but in many cases new research and testing shows that the shared cache can be faster when the cpus are sharing the same or very similar tasks.

In general Hyperthreading is considered older technology and is no longer supported in newer cpus. Hyperthreading can provide a marginal (10%) for some server workloads like mysql, but dual core technology has essentially replaced hyperthreading in newer systems.

A dual core cpu running at 3.0Ghz should be faster then a dual cpu (separate core) system running at 3.0Ghz due to the ability to share the cache at higher bus speeds.

The examples below details how we determine what kind of cpu(s) are present.

The kernel data Linux exposes in /proc/cpuinfo will show each logical cpu with a unique processor number. A logical cpu can be a hyperthreading sibling, a shared core in a dual or quad core, or a separate physical cpu. We must look at the siblings, cpu cores and core id to tell the difference.

If the number of cores = the number of siblings for a given physical processor, then hyperthreading is OFF.

/bin/cat /proc/cpuinfo | /bin/egrep ‘processor|model name|cache size|core|sibling|physical’

 

Example 1: Single processor, 1 core, no Hyperthreading

processor	: 0
model name	: AMD Duron(tm) processor
cache size	: 64 KB

 

Example 2: Single processor, 1 core, Hyperthreading is enabled.

Notice how we have 2 siblings, but only 1 core. The physical cpu id is the same for both: 0.

processor	: 0
model name	: Intel(R) Pentium(R) 4 CPU 2.80GHz
cache size	: 1024 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 1
processor	: 1
model name	: Intel(R) Pentium(R) 4 CPU 2.80GHz
cache size	: 1024 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 1

 

Example 3. Single socket Quad Core

Notice how each processor has its own core id. The number of siblings matches the number of cores so there are no Hyperthreading siblings. Also notice the huge l2 cache – 6 MB. That makes sense though, when considering 4 cores share that l2 cache.

processor	: 0
model name	: Intel(R) Xeon(R) CPU           E5410  @ 2.33GHz
cache size	: 6144 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 4
processor	: 1
model name	: Intel(R) Xeon(R) CPU           E5410  @ 2.33GHz
cache size	: 6144 KB
physical id	: 0
siblings	: 4
core id		: 1
cpu cores	: 4
processor	: 2
model name	: Intel(R) Xeon(R) CPU           E5410  @ 2.33GHz
cache size	: 6144 KB
physical id	: 0
siblings	: 4
core id		: 2
cpu cores	: 4
processor	: 3
model name	: Intel(R) Xeon(R) CPU           E5410  @ 2.33GHz
cache size	: 6144 KB
physical id	: 0
siblings	: 4
core id		: 3
cpu cores	: 4

 

Example 3a. Single socket Dual Core

Again, each processor has its own core so this is a dual core system.

 

processor	: 0
model name	: Intel(R) Pentium(R) D CPU 3.00GHz
cache size	: 2048 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 2
processor	: 1
model name	: Intel(R) Pentium(R) D CPU 3.00GHz
cache size	: 2048 KB
physical id	: 0
siblings	: 2
core id		: 1
cpu cores	: 2

 

Example 4. Dual Single core CPU, Hyperthreading ENABLED

This example shows that processer 0 and 2 share the same physical cpu and 1 and 3 share the same physical cpu. The number of siblings is twice the number of cores, which is another clue that this is a system with hyperthreading enabled.

 

processor	: 0
model name	: Intel(R) Xeon(TM) CPU 3.60GHz
cache size	: 1024 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 1
processor	: 1
model name	: Intel(R) Xeon(TM) CPU 3.60GHz
cache size	: 1024 KB
physical id	: 3
siblings	: 2
core id		: 0
cpu cores	: 1
processor	: 2
model name	: Intel(R) Xeon(TM) CPU 3.60GHz
cache size	: 1024 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 1
processor	: 3
model name	: Intel(R) Xeon(TM) CPU 3.60GHz
cache size	: 1024 KB
physical id	: 3
siblings	: 2
core id		: 0
cpu cores	: 1

 

Example 5. Dual CPU Dual Core No hyperthreading

Of the 5 examples this should be the most capable system processor-wise. There are a total of 4 cores; 2 cores in 2 separate socketed physical cpus. Each core shares the 4MB cache with its sibling core. The higher clock rate (3.0 Ghz vs 2.3Ghz) should offer slightly better performance than example 3.

 

processor	: 0
model name	: Intel(R) Xeon(R) CPU            5160  @ 3.00GHz
cache size	: 4096 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 2
processor	: 1
model name	: Intel(R) Xeon(R) CPU            5160  @ 3.00GHz
cache size	: 4096 KB
physical id	: 0
siblings	: 2
core id		: 1
cpu cores	: 2
processor	: 2
model name	: Intel(R) Xeon(R) CPU            5160  @ 3.00GHz
cache size	: 4096 KB
physical id	: 3
siblings	: 2
core id		: 0
cpu cores	: 2
processor	: 3
model name	: Intel(R) Xeon(R) CPU            5160  @ 3.00GHz
cache size	: 4096 KB
physical id	: 3
siblings	: 2
core id		: 1
cpu cores	: 2

PS:
For explanation about flags in linux /proc/cpuinfo, you can refer to following:
http://blog.incase.de/index.php/cpu-feature-flags-and-their-meanings/
Categories: Kernel, Linux Tags: