Monthly Archives: April 2015

lxc vs lxd

Features of LXD are:

Secure by design (unprivileged containers, resource restrictions and much more)
Scalable (from containers on your laptop to thousand of compute nodes)
Intuitive (simple, clear API and crisp command line experience)
Image based (no more distribution templates, only good, trusted images)
Live migration

Ubuntu 14.04 no Wireless (UNCLAIMED)

If after no finished update no wifi in your network mannager, you need:

sudo lshw -C network

*-network UNCLAIMED
description: Network controller
product: RT3290 Wireless 802.11n 1T/1R PCIe
vendor: Ralink corp.
physical id: 0
bus info: pci@0000:02:00.0
version: 00
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: latency=0
resources: memory:f7d10000-f7d1ffff

Fix.

sudo modprobe rt2800pci
sudo echo “modprobe rt2800pci” >> /etc/modules

*-network
description: Wireless interface
product: RT3290 Wireless 802.11n 1T/1R PCIe
vendor: Ralink corp.
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlan0
version: 00
serial: bc:85:56:11:43:e1
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=rt2800pci driverversion=3.13.0-49-generic firmware=0.37 ip=10.42.0.177 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
resources: irq:17 memory:f7d10000-f7d1ffff

sudo apt-get update
sudo apt-get upgrade

esx cheat sheet

How to get ESXi version information?

~ # esxcli system version get
Product: VMware ESXi
Version: 5.5.0
Build: Releasebuild-1623387
Update: 1

How to get the uuid?

~ # esxcli system uuid get
53bf0f5e-5b22-8964-2574-000c29f89b93

How to get the hostname ?

~ # esxcli system hostname get
Domain Name: ganesh.com
Fully Qualified Domain Name: esx1.ganesh.com
Host Name: esx1

How to check the Load on server ? we can also use “uptime” for same

~ # esxcli system process stats load get
Load1Minute: 0.02
Load15Minutes: 0.03
Load5Minutes: 0.02

How Many processes are running on ESXi ?

~ # esxcli system process stats running get
Running Processes: 405

How to get the boot device information for ESXi?

~ # esxcli system boot device get
Boot Filesystem UUID: 5bba5c75-aadf80d0-d554-c0ac58729550
Boot NIC:
Stateless Boot NIC:

How to see the coredump device used to capture dump ?

~ # esxcli system coredump file list
Path Active Configured Size
——————————————————————————————————- —— ———- ———
/vmfs/volumes/53c033b3-b6a7b6f3-e8bf-000c29f89b93/vmkdump/564D3C1B-1B4F-DD7B-61A7-737834F89B93.dumpfile true true 119537664

How to see the coredump partition information ?

~ # esxcli system coredump partition list
Name Path Active Configured
————————————————————————– ———————————————————————————————- —— ———-
t10.ATA_____VMware_Virtual_IDE_Hard_Drive___________00000000000000000001:7 /vmfs/devices/disks/t10.ATA_____VMware_Virtual_IDE_Hard_Drive___________00000000000000000001:7 true true

How to list the loaded module? Partial output is shown.

~ # esxcli system module list
Name Is Loaded Is Enabled
—————————– ——— ———-
vmkernel true true
chardevs true true
user true true
vmkapi_socket true true
procfs true true
procMisc true true

How to see the information related to particular Module ?

~ # esxcli system module get -m swapobj
Module: swapobj
Module File: /usr/lib/vmware/vmkmod/swapobj
License: VMware
Version:
Signed Status: VMware Signed
Signature Issuer: VMware, Inc.
Signature Digest: 7308 1040 f1ab 8d96 07c0 0a51 eef7 3fd4 a836 01a1 0341 fc15 21bd 97da ce61 6073
Signature FingerPrint: cb44 247a 1614 cea1 2079 362d ec86 9d0e
Provided Namespaces: com.vmware.swapobj@0
Required Namespaces: com.vmware.vmkapi@v2_2_0_0, com.vmware.vmkapi.incompat@v2_2_0_0, com.vmware.vmklinkmpi@0, [email protected]

How to see the log rotation policies ?

~ # esxcli system syslog config get
Default Network Retry Timeout: 180
Local Log Output: /scratch/log
Local Log Output Is Configured: false
Local Log Output Is Persistent: true
Local Logging Default Rotation Size: 1024
Local Logging Default Rotations: 8
Log To Unique Subdirectory: false
Remote Host:

How to see special purpose file systems?

~ # esxcli system visorfs ramdisk list
Ramdisk Name System Include in Coredumps Reserved Maximum Used Peak Used Free Reserved Free Maximum Inodes Allocated Inodes Used Inodes Mount Point
———— —— ——————– ——— ———- ——– ——— —- ————- ————– —————- ———– —————————
root true true 32768 KiB 32768 KiB 460 KiB 468 KiB 98 % 98 % 8192 4096 3559 /
etc true true 28672 KiB 28672 KiB 180 KiB 212 KiB 99 % 99 % 4096 1024 463 /etc
tmp false false 2048 KiB 196608 KiB 8 KiB 232 KiB 99 % 99 % 8192 256 4 /tmp
hostdstats false false 0 KiB 84992 KiB 1784 KiB 1784 KiB 97 % 0 % 8192 32 4 /var/lib/vmware/hostd/stats

******************************************HARDWARE*****************************************

How to list the CPU information related to ESXi?

~ # esxcli hardware cpu global get
CPU Packages: 1
CPU Cores: 2
CPU Threads: 2
Hyperthreading Active: false
Hyperthreading Supported: false
Hyperthreading Enabled: true
HV Support: 3
HV Replay Capable: false
HV Replay Disabled Reasons: incompatible CPU

How to list the details information related to each core ?

~ # esxcli hardware cpu list
CPU:0
Id: 0
Package Id: 0
Family: 6
Model: 60
Type: 0
Stepping: 3
Brand: GenuineIntel
Core Speed: 3400060000
Bus Speed: 66000000
APIC ID: 0x0
Node: 0
L2 Cache Size: 262144
L2 Cache Associativity: 8
L2 Cache Line Size: 64
L2 Cache CPU Count: 2
L3 Cache Size: 8388608
L3 Cache Associativity: 16
L3 Cache Line Size: 64
L3 Cache CPU Count: 2

CPU:1
Id: 1
Package Id: 0
Family: 6
Model: 60
Type: 0
Stepping: 3
Brand: GenuineIntel
Core Speed: 3400060000
Bus Speed: 66000000
APIC ID: 0x1
Node: 0
L2 Cache Size: 262144
L2 Cache Associativity: 8
L2 Cache Line Size: 64
L2 Cache CPU Count: 2
L3 Cache Size: 8388608
L3 Cache Associativity: 16
L3 Cache Line Size: 64
L3 Cache CPU Count: 2

How to check the physical memory present ?

~ # esxcli hardware memory get
Physical Memory: 4294430720 Bytes
Reliable Memory: 0 Bytes
NUMA Node Count: 1

How to Check the Hardware Clock ?

~ # esxcli hardware clock get
2014-07-15T18:30:34Z

How to list PCI devices connected ?

~ # esxcli hardware pci list | more
000:000:00.0
Address: 000:000:00.0
Segment: 0x0000
Bus: 0x00
Slot: 0x00

Most useful command to check the serial number of physical server and other related information to HW.

~ # smbiosDump.

TIME_WAIT

TIME_WAIT is normal. It’s a state after a socket has closed, used by the kernel to keep track of packets which may have got lost and turned up late to the party. A high number of TIME_WAIT connections is a symptom of getting lots of short lived connections, not nothing to worry about.

linux high load, no cpu load

wget http://aspersa.googlecode.com/svn/trunk/iodump
echo 1 > /proc/sys/vm/block_dump
while true; do sleep 1; dmesg -c; done | perl iodump

^C# Caught SIGINT.
TASK PID TOTAL READ WRITE DIRTY DEVICES
jbd2/md1-8 495 75 0 75 0 md1
md1_raid1 467 20 0 20 0 sda2, sdb2
flush-9:1 1246 16 0 16 0 md1

Whats next?

yum install smartmontools
smartctl -a /dev/sda
smartctl -a /dev/sdb

If you find:
197 Current_Pending_Sector 0x0022 100 100 000 Old_age Always – 103

Its time to replace HDD disk.

vEMan – VMware ESX/ESXi Manager

Features

Support vEMan development for v2.0: http://www.gofundme.com/vEMan
Nice GUI for Linux users 😉
Professional Support available!
Deploy OVF from a website to your ESX
Deploy OVF/VMX from local disk to your ESX
Show a list of all your online, suspended and offline VM’s on your ESX
Supporting Ressource Pools
VM-Management: Console (Enable,Disable,Open)
VM-Management: Snapshots (Show,Revert to,Remove,Create,Rename)
VM-Management: Power (Stop,Shutdown,Reboot,Start,Suspend, Resume)
VM-Management: VM status (online/suspended/offline,CPU/MEM usage and many more)
VM-Management: Delete a VM
ESX-Information: Global CPU & MEM usage, ESX version and many more
ESX-Management: add user, change user passwords, change user roles, ..
Planned (v1.0): Simple VM Editor (change CPU count and RAM, Rename VM)
Planned (v2.0): Rewrite vEMan in Python, Using pySphere library instead of VMware SDK
Planned (undecided): Browse datastorages
Planned (undecided): Upload file to a specific datastorage
Support vEMan development for v2.0: http://www.gofundme.com/vEMan

InnoDB: Error: space id and page no stored in the page

vi /etc/my.cnf
innodb_force_recovery=1

service mysql start

Eror can look like this:

InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 139256.
InnoDB: You may have to recover from a backup.
InnoDB: It is also possible that your operating
InnoDB: system has corrupted its own file cache
InnoDB: and rebooting your computer removes the
InnoDB: error.
InnoDB: If the corrupt page is an index page
InnoDB: you can also try to fix the corruption
InnoDB: by dumping, dropping, and reimporting
InnoDB: the corrupt table. You can use CHECK
InnoDB: TABLE to scan your table for corruption.
InnoDB: See also http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.