Search This Blog

Showing posts with label commands. Show all posts
Showing posts with label commands. Show all posts

Saturday, April 7, 2012

ESXi Troubleshooting






Find runing VM WWID: vm-support -x 
Restart Management agent = services.sh restart
ESX Version: vmware -v


Checking Logs
------------------


tail -f /var/log/message
cat /var/log/messages | grep -i reservation
ls -tr /var/log/messages* | xargs grep -il reservation
cat /var/log/messages | grep -i power-on
/usr/sbin/vmdumper -l
cat /var/log/messages | grep -i abort
grep -ih scsi /var/log/messages | cut -c 50 | sort | uniq | sort -m
cat /var/log/messages | grep -ih vob
logger [m1]
$ sed -n '/m1/,/m2/p' /var/log/message
head -20 /var/log/message | tail -5 


Fail the volume / rescan
-----------------------
esxcfg-advcfg -g /VMFS3/FailVolumeOpenIfAPD
esxcfg-advcfg -s 1 /VMFS3/FailVolumeOpenIfAPD
esxcfg-rescan vmhba2


---------------------------------------------
VMA
--------------------------------------------


vilogger
vifp
vifptarget
savesession.pl


----------------------------------
Find NIC driver version
----------------------------------

esxcfg-nics -l
ethtool -i vmnic10


===================================
Putty
===================================
http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter3.html
Copy : Select the text
Paste: Right click
copy a word : double click
copy successive words: double click hold and drag
copy a line : triple click
copy sequence of lines: triple-click and drag
extend selection: middle click
rectangle selection: hold alt


PLogs\&H-&Y&M&D-&T.log

Sunday, December 25, 2011

Unix

=======================
Installation
=======================

Boot Loader
---------------
nano /boot/grub/grub.cfg
cut / paste (^k and ^u) menu entries in right order
set-grub-default 0
update-grub

---------------

grub commands
---------------
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hda1
initrd /boot/initrd
boot

=======================

================
File System
================
Recrusing Listing:     ls -R
All Files:                   ls -A
Files only:                 ls -l | grep ^-
Directory only:         ls -D
Sort by Filesize:        ls -S
Sort by Time            ls -t
Sory by Extension   ls -X
Find                         grep


Change owner
chown -R k:k /store

Change permission
chmod -R 777 /store

Find disk space
df -h /store
du -hc /store

$ sed -n '/WORD1/,/WORD2/p' /path/to/file


Compress
-----------
tar
sudo tar -xvf


Disk utilities
----------------
sudo apt-get gparted
sudo gparted

Find Disk details
sudo fdisk -l

Check Disk
fsck /dev/sda1
================

================
Programs
================
Updates
sudo apt-get updates

--------
uTorrent
--------
http://www.howopensource.com/2011/08/install-utorrent-in-ubuntu-fedora/
-------------------
cp /opt/
sudo tar -xvf
sudo rm -rf
sudo chmod 777
sudo ln -s
utserver -settingspath
http://localhost:8080/gui

------------------------
Lib
------------------------
ldd

================


================
System 
================

CPU info
cat /proc/cpuinfo


Memory info
cat /proc/meminfo



Log 
--------
dmesg
lspci



/var/log/dpkg.log
================


================
Network
================
sudo dhclient -r
sudo dhclient eth0


-------
DNS
-------
apt-get install bind9
apt-get install dnsutils


Change Hostname
nano /etc/hostname
nano /etc/hosts
or
hostname ka

DNS lookup tool
dig

================

================
Security
================

sudo useradd -d /home/k -m k -s /bin/bash
sudo passwd k


usermod -G admin k
cat /etc/passwd
cat /etc/group

expire immediate
sudo -k

change to root
sudo -s
================

================
Miscellaneous
================
root password
create admin user

skpe
voip client
chrome
flashplayer

apt-get install  rssh
apt-get install vnc4server
apt-get install vncviewer
sudo apt-get install --no-install-recommends gnome-panel
================ 

Putty : http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter3.html

Followers