1 / 23

기타 시스템 관리

기타 시스템 관리. SPARCS 10 채승우. 리눅스 부팅에 관한 설명 추가 case by Ubuntu. 리눅스 부팅 바이오스 → 부트로더 → 커널 부팅 → init 실행 → runlevel 에 맞는 프로세스 실행 → 사용자 로그인 우분투에서는 … init 대신 upstart 이용. Upstart - 이벤트 - 작업 기반 시스템 - 실행 중 장치가 추가 , 삭제 고려 (USB 등 ) - 비동기식 이벤트에 기반하여 비동기식으로 작동

lance
Télécharger la présentation

기타 시스템 관리

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 기타 시스템 관리 SPARCS 10 채승우

  2. 리눅스 부팅에 관한 설명 추가case by Ubuntu • 리눅스 부팅 바이오스 → 부트로더 → 커널 부팅 → init 실행 → runlevel에맞는 프로세스 실행 → 사용자 로그인 • 우분투에서는… init대신 upstart 이용

  3. Upstart - 이벤트-작업 기반 시스템 - 실행 중 장치가 추가, 삭제 고려(USB 등) - 비동기식 이벤트에 기반하여 비동기식으로 작동 - 데몬의 시작, 중지, 감시를 스스로함 - 데몬이 시작하기 전후, 중지되기 전후에 원하는 작업 설정 가능

  4. Scheduling Jobs Using croncron을 이용한 작업 스케줄링 • 자동화된 일 처리 • crontab명령 이용 • /var/spool/cron/crontabs/[username]에 저장 • crond라는 데몬에서 위 파일을 규칙적으로 읽어, 지정된 시간에 명령을 실행. • 실제로는 cron이라는 명령은 없고, crond라는 데몬과crontab라는 유틸리티로 구성 • 일부 시스템에서는 root만 사용가능

  5. cron은 콘솔에 아무 내용도 출력하지 않는다. • 다만, 출력 내용이나 에러메시지는 모두 crontab을 만든 사람의 메일로 보내진다. (다른 곳으로 보내고 싶은 경우, crontab파일 제일 상단에 MAILTO=aaa@aaa.aaa를 추가한다.) • cron에 추가된 작업 보기 $ crontab –l

  6. cron에 작업 추가하기 $ crontab –e • cron에 저장된 작업의 형태 분시일월요일 명령 예시: 0215jan,julsunshruncron

  7. 예1: 01*** [command] 예2: 011**[command] 예3: 01**mon [command] 예4: 011,15**[command] 예5: 011-15**[command] 예6: 01*/5**[command]

  8. $ crontab –r : 저장된 crontab삭제 # crontab –u [username] [옵션]: 다른 사용자의 crontab변경

  9. 01***find /tmp –atime 3 –exec ls -l {} \; >> /home/[username]/log • 01*** find /tmp –atime 3 –exec ls -l {} \; >> /home/[username]/log 2>&1 • crontab: 본 쉘 명령만 사용 가능 • $HOME, $USER, $SHELL 같은 환경 변수를 이용 • 명령이 길 때는 쉘 스크립트 이용

  10. - 작업을 한 번만 실행하기

  11. Managing System Logs시스템 로그 관리하기 • syslogd데몬이 관리 • /etc/syslog.conf에서 설정 가능 (최근 시스템에서는 /etc/rsyslog.conf에서 설정) facility.level(; facility.level … ) [파일] • facility: 메시지를생성하는 시스템 어플, 기능 • level: 메시지의 등급 정보

  12. facility: mail, kern, user, auth, *, … • level: debug, info, notice, warning, err, crit, alert, emerg

  13. log비우기: cat /dev/null > logfile • 재시작: kill –HUP `cat /var/run/rsyslog.pid`

  14. mv /var/log/messages /var/log/messages-backup cp /dev/null /var/log/messages CURDATE=‘date + “%m%d%y”’ mv /var/log/messages-backup /var/log/messages-$CURDATE gzip /var/log/messages-$CURDATE • 로그를 정리하는 쉘 스크립트

  15. 로그 관리 - 일정한 기간에 따라 - 일정 용량에 따라 • 그러나 압축은근본적인 해결방법이 아니다. • 로그 순환(log rotation): 오래된 로그 제거 • 일부 배포판에서는savelog나 logrotate와 같은 스크립트 제공

  16. Setting Terminal Attributes터미널 상태 설정하기 setterm명령(텍스트모드의 가상 콘솔에서만) • setterm –foreground white –background blue • setterm –store But • 스팍스 대부분의 사람은 Putty 이용 • X윈도우의 쉘은 다른 방법으로설정

  17. 감사합니다.

More Related