Create manual sos like report in Linux

#!/bin/bash
host=”$(hostname)”

sos_dir=”/tmp/${host}_serversos”
mkdir $sos_dir
cd $sos_dir
chkconfig –list > chkconfig
date > date
df > df
dmesg > dmesg
dmidecode > dmidecode
fdisk -l > fdisk
free > free
hostname –fqdn > hostname
ifconfig > ifconfig
lsmod > lsmod
lspci > lspci
cat /proc/mounts > mount
netstat -tlpn > netstat
ps auxww > ps
rpm -qa > rpm-qa
rpm -Va > rpm-Va #this command may take a while to run
ulimit -a > ulimit
uname -a > uname
uptime > uptime
cat /proc/meminfo > meminfo
cat /proc/cpuinfo > cpuinfo
mkdir etc
cd etc
cp /etc/fstab .
cp /etc/cluster/cluster.conf .
cp /etc/security/limits.conf .
cp /etc/redhat-release .
cp /etc/sysctl.conf .
cp /etc/modprobe.conf .
mkdir sysconfig/network-scripts -p
cd sysconfig
cp /etc/sysconfig/* . -R
cd $sos_dir
mkdir var/log -p
cp /var/log/* var/log -R
cd /tmp
tar -cvjf ${host}_server.tar.bz2 $sos_dir

from https://access.redhat.com/site/solutions/3592

Advertisements

How to install VMtools in Linux, CentOS, RHEL, Fedora

[root@Centos6 ]# mount /dev/cdrom /mnt
[root@Centos6 ]# cd /mnt
[root@Centos6 mnt]# cp VMwareTools-* /tmp
[root@Centos6 mnt]#cd /tmp
[root@Centos6 tmp]# tar -xzvf VMwareTools-*
[root@Centos6 tmp]# cd vmware-tools-distrib
[root@Centos6 vmware-tools-distrib]# ./vmware-install.pl

if needed:
yum install gcc kernel-devel

service network restart

more detail:

http://ithelpblog.com/cloudcomputing/vmware/howto-install-vmware-tools-on-centos-6-4-redhat-6-4-rhel-fedora-18/

http://www.thoughtpolice.co.uk/vmware/howto/centos-5-vmware-tools-install.html