vSphere Web Access 503 Service Unavailable Error And Solution

Posted on in Categories vmware last updated May 21, 2010

By default vSphere does not provide client for Linux or OS X. You need to use Windows system to manage your VMware ESX server. However, it does provides vSphere Web Access which allows you to organize and share virtual machines using web browser. If you try to access vSphere Web Access you may get an error which read as follows:

503 Service Unavailable

You can fix this problem as follows.

FreeBSD Turn On Process Accounting – Track System Resources Used By Users

Posted on in Categories FreeBSD, Howto, Monitoring, Security, Sys admin, Tips, Troubleshooting, Tuning last updated January 8, 2009

I’ve already written about Linux process accounting under Linux ( see how to keep a detailed audit trail of what’s being done on your Linux systems). You can easily setup process accounting under FreeBSD. This tutorial expalins how to enable and utilizing FreeBSD process accounting including many other useful options are explained to keep track of system resources used, and their allocation among users.

IBM / Lenovo Computer Print Serial Number and Other Information from a Shell Command Prompt

Posted on in Categories Hardware, Howto, Linux, Linux desktop, Linux laptop last updated January 4, 2008

If you are a proud owner of IBM / Lenovo laptop / desktop computer use vpddecode command to print the “vital product data” information without opening your case or rebooting the system. This information is hardcoded on almost all IBM and Lenovo computers BIOS. It will show following information:

=> BIOS Build ID
=> Box Serial Number
=> Motherboard Serial Number
=> Machine Type/Model
=> BIOS Release Date
=> Default Flash Image File Name

Command to display BIOS information

WARNING! These examples only works on IBM/Lenovo Computer or Laptop systems

Open terminal and type the following command as the root user:

$ sudo vpddecode
OR
# vpddecode

How to: Check the bash shell script is being run by root or not

Posted on in Categories CentOS, Debian Linux, FreeBSD, Linux, RedHat/Fedora Linux, Shell scripting last updated November 12, 2007

Sometime it is necessary to find out if a shell script is being run as root user or not.

When user account created a user ID is assigned to each user. BASH shell stores the user ID in $UID variable. Your effective user ID is stored in $EUID variable. You can

Old way…

You can easily add a simple check at the start of a script:

Check the script is being run by root user

#!/bin/bash
# Init
FILE="/tmp/out.$$"
GREP="/bin/grep"
#....
# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
   echo "This script must be run as root" 1>&2
   exit 1
fi
# ...

New way: Using EUID

#!/bin/bash
# Init
FILE="/tmp/out.$$"
GREP="/bin/grep"
#....
# Make sure only root can run our script
if [[ $EUID -ne 0 ]]; then
   echo "This script must be run as root" 1>&2
   exit 1
fi
# ...

Mount /dev/sdb1 only if you are a root

#!/bin/bash
if [[ $EUID -ne 0 ]]; then
  echo "You must be a root user" 2>&1
  exit 1
else
  mount /dev/sdb1 /mnt/disk2
fi

Updated for accuracy and more examples.