블로그 이미지
redkite

카테고리

분류 전체보기 (291)
00.SI프로젝트 산출물 (0)
00.센터 운영 문서 (0)
01.DBMS ============.. (0)
01.오라클 (117)
01.MS-SQL (15)
01.MySQL (30)
01.PostgreSql (0)
01.DB튜닝 (28)
====================.. (0)
02.SERVER ==========.. (0)
02.서버-공통 (11)
02.서버-Linux (58)
02.서버-Unix (12)
02.서버-Windows (2)
====================.. (0)
03.APPLICATION =====.. (11)
====================.. (0)
04.ETC =============.. (0)
04.보안 (5)
====================.. (0)
05.개인자료 (1)
06.캠핑관련 (0)
07.OA관련 (1)
Total
Today
Yesterday

달력

« » 2013.4
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

공지사항

최근에 올라온 글

'2013/04/22'에 해당되는 글 2건

  1. 2013.04.22 [유닉스]Solaris cron restart
  2. 2013.04.22 [유닉스]Clientmqueue 로그 삭제 관련

Service management details

svcs(1) command

System administrators can more easily monitor services using Solaris Service Manager’s service status information and service activation/deactivation interfaces based on the commands (svcs(1), svcadm(1) etc). Until Solaris 9, it was a complicated procedure to understand service status. Service level information was not provided and system administrators have to assume service status from their own analysis of kernel level information. A slow and error prone process.

svcadm(1M) command

Services and the services on which they depend are started in their appropriate order using the Solaris Service Manager svcadm(1) command. System administrators are longer required to run complicated service startup operations.

For example, if there are two services, Service A and Service B, and Service A depends on Service B, previously the system administrator needed to start the services paying close attention to their dependent relationship. Now with Solaris10, they only have to start Service A. Solaris Service Manager automatically detects that Service B needs to be started, and starts the services in the right sequence.

사용자 삽입 이미지

With Solaris 10 the traditional service stop procedure using the kill(1) or pkill(1) commands is no longer available. This is because, once stopped, Solaris Service Manager will automatically restart them. So a new command, svcadm (1M) is now used for stopping services.

References
 Solaris 9 or earlier versionsSolaris 10
Service statusps(1) command 
(only process information is shown)
svcs(1) or ps(1) command
Service stop# /etc/init.d/cron stop# svcadm disable -t 
system/cron:default
Service restart (temporary)# /etc/init.d cron start# svcadm enable -t 
system/cron:default
Service stop 
After service restart the service isn't started
(1)# /etc/init.d/cron stop 
(2)# mv /etc/rc2.d/S75cron /etc/rc2.d/_S75cron 
(Need to rename the service start script)
# svcadm disable -t 
system/cron:default
Service restart (permanent)(1) # /etc/init.d/cron stop 
(2) # /etc/init.d/cron start
# svcadm restart -t 
system/cron:default


- Solaris 10 간단한 재실행
# svcs cron
STATE          STIME    FMRI
online          4월_26  svc:/system/cron:default
svcadm restart cron
#
# svcs cron
STATE          STIME    FMRI
online         11:26:41 svc:/system/cron:default

Posted by redkite
, |

sendmail은 목적지를 확인하지 못한 메일을 clientmqueue에 임시로 저장했다가 목적지가 확인되면 mqueue로 보내서 메일을 발송하는 거라고 한다. 그런데 sendmail을 사용하지 않는 시스템에서 이러한 일이 발생하는 것은 logwatch에서 주요로그보고서를 메일로 발송하는 것 때문에 이러한 문제가 발생한다고 한다.

 

logwatch의 메일발송기능을 없애려면 /etc/contab의 내용에서 MAILTO=root의 내용에서 root로 지정된것을 뺴주면 된다고 한다.

 

엄청나게 많은 파일이 생긴 clientmqueue디렉토리는 한번에 지우기가 어려운데 아래의 명령으로 한번에 지울수 있다고 한다.

해당 디렉터리로 이동 후 아래 명령을 실행한다.
ls | xargs rm -f

 

아니면, 아예 폴더 자체를 날려버리고 새로 만들어도 상관 없다.

rm -rf /var/spool/clientmqueue

mkdir /var/spool/clientmqueue

chown smmsp.smmsp /var/spool/clientmqueue

 

주기적으로 지워지게 crontab에 삭제 명령어를 등록할 수도 있따.

$ crontab -e
30 0 * * * /usr/bin/find /var/spool/clientmqueue -mtime +30 | xargs rm -f 

Posted by redkite
, |

최근에 달린 댓글

최근에 받은 트랙백

글 보관함