#!/bin/bash
# 
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1
# 
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 ("License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.zimbra.com/license
# 
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
# 
# The Original Code is: Zimbra Collaboration Suite Server.
# 
# The Initial Developer of the Original Code is Zimbra, Inc.
# Portions created by Zimbra are Copyright (C) 2005, 2006 Zimbra, Inc.
# All Rights Reserved.
# 
# Contributor(s):
# 
# ***** END LICENSE BLOCK *****
# 
source /opt/zimbra/bin/zmshutil || exit 1
zmsetvars


echo "----------------"
date +%Y%m%d%H%M%S
echo "----------------"
id
echo "----------------"
uname -a
echo "----------------"
hostname
echo "----------------"
H=`/opt/zimbra/bin/zmhostname`
echo $H
echo "----------------"
host $H 
echo "----------------"
P=`/opt/zimbra/libexec/get_plat_tag.sh`
echo $P
echo "----------------"
df -h
echo "----------------"
/sbin/ifconfig
echo "----------------"

if [ x$P = "xMACOSX" -o "x$P" = "xMACOSXx86" ]; then
	ls -ld /Library/Receipts/zimbra-*
else
	rpm -qi zimbra-core
fi
echo "----------------"
ls -l /opt/zimbra
echo "----------------"
uptime
echo "----------------"
memkb=$(zmsysmemkb)
echo $memkb KB
echo "----------------"
if [ x$P != "xMACOSX" -a x$P != "xMACOSXx86" ]; then
	echo "----------------"
	freemem=`free -m`
	echo FREE $freemem KB
	echo "----------------"
fi
echo "----------------"
cat /etc/hosts
echo "----------------"
cat /etc/resolv.conf
echo "----------------"
cat /etc/nsswitch.conf
echo "----------------"
if [ -x "/usr/sbin/selinux" ]; then
  /usr/sbin/selinux
fi
echo "----------------"
ls -ld /usr/lib/libstdc++*
if [ -d "/usr/lib64" ]; then
  ls -ld /usr/lib64/libstdc++*
fi
echo "----------------"
  

