"리눅스 sosreport"의 두 판 사이의 차이

58번째 줄: 58번째 줄:
cat /etc/hosts > hosts.txt
cat /etc/hosts > hosts.txt
cat /etc/fstab > fstab.txt
cat /etc/fstab > fstab.txt
cat /boot/grub/grub.conf > grub.conf
cat /proc/partitions > partitions.txt
cat /etc/modprobe.conf > modprobe.conf.txt
df -h > df_-h.txt
df -h > df_-h.txt
cat /etc/modprobe.conf > modprobe.conf.txt
tar cvzf netconfig.tar.gz /etc/sysconfig/*
tar cvzf syslog.tar.gz /var/log/*
ps aux > ps_aux.txt
ps aux > ps_aux.txt
free -m > free_-m.txt
free -m > free_-m.txt
ifconfig > ifconfig.txt
chkconfig --list > chkconfig_--list.txt
chkconfig --list > chkconfig_--list.txt
ifconfig > ifconfig.txt
tar cvzf netconfig.tar.gz /etc/sysconfig/*
cat /boot/grub/grub.conf > grub.conf
tar cvzf syslog.tar.gz /var/log/*
cat /proc/partitions > partitions.txt
cd ..
cd ..
TODAY=`date +%Y%m%d`
TODAY=`date +%Y%m%d`

2012년 4월 12일 (목) 19:16 판

  • sosreport
  • 리눅스 SOS 보고서 생성
  • 리눅스 SOS REPORT 생성

1 개요

sosreport는 시스템에 대한 디버깅 정보(설정 정보)들을 수집하고 /tmp 폴더에 하나의 압축파일을 만들어 준다.

2 명령어

sosreport -o hardware -o kernel -o networking -o udev -o system -o rpm
  • sosreport는 /usr/sbin에 있다.

3 실행 예시

[root@localhost sbin]# sosreport -o hardware -o kernel -o networking -o udev -o system -o rpm

sosreport (version 2.1)

This utility will collect some detailed  information about the
hardware and setup of your Fedora system.
The information is collected and an archive is  packaged under
/tmp, which you can send to a support representative.
Fedora will use this information for diagnostic purposes ONLY
and it will be considered confidential information.

This process may take a while to complete.
No changes will be made to your system.

Press ENTER to continue, or CTRL-C to quit.

Enter 키 입력

Please enter your first initial and last name [localhost]: 
Please enter the case number that you are generating this report for:

Enter 키 2회 입력

  Running plugins. Please wait ...

  Completed [6/6] ...      
Creating compressed archive...

Your sosreport has been generated and saved in:
  /tmp/sosreport-localhost-20120330122910-0374.tar.xz

The md5sum is: 25b8f4ca1b950ef01ef2f88f14aa0374

Please send this file to your support representative.

/tmp 폴더에 sosreport-localhost-20120330122910-0374.tar.xz 라는 이름으로 보고서 파일이 생성되었다.

4 대체 명령어

sosreport 대신 아래 방법으로 유사한 자료를 수집할 수 있다.

mkdir my_sosreport
cd my_sosreport
cat /etc/hosts > hosts.txt
cat /etc/fstab > fstab.txt
cat /boot/grub/grub.conf > grub.conf
cat /proc/partitions > partitions.txt
cat /etc/modprobe.conf > modprobe.conf.txt
df -h > df_-h.txt
ps aux > ps_aux.txt
free -m > free_-m.txt
ifconfig > ifconfig.txt
chkconfig --list > chkconfig_--list.txt
tar cvzf netconfig.tar.gz /etc/sysconfig/*
tar cvzf syslog.tar.gz /var/log/*
cd ..
TODAY=`date +%Y%m%d`
tar cvzf my_sosreport.$HOSTNAME.$TODAY.tgz ./my_sosreport
rm -rf ./my_sosreport
ll my_sosreport*

my_sosreport.호스트명.날짜.tgz 라는 이름으로 생성된다.

5 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}