게시물 261건
   
[RedHat] SOSREPORT 실행시 Hang 걸렸을 경우
글쓴이 : 최장섭 날짜 : 2016-10-04 (화) 10:26 조회 : 3478
sosreport가 행이 걸렸을때, 어떻게 하면 좋을까요?
sosreport를 대신하여, 다음 스크립트를 작성하여 실행하여 주십시요.

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

sos_dir="/tmp/${host}_hungsos"
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}_hungsos.tar.bz2 $sos_dir

이름 패스워드
비밀글 (체크하면 글쓴이만 내용을 확인할 수 있습니다.)
왼쪽의 글자를 입력하세요.
   

miwit.com sir.co.kr DNS Powered by DNSEver.com DNS Powered by DNSEver.com