반응형

mysqlcheck 유틸리티 사용법(analyze, optimize, repair)

BY 서진우 · PUBLISHED 2013년 7월 9일 · UPDATED 2014년 12월 24일

mysqlcheck 유틸리티 사용법(analyze, optimize, repair)

mysqlcheck 유틸리티 사용법

cost 베이스 DB에서 DB전체를 한번에 analyze, optimize, repair 하기 위한 유틸리티 입니다.

파일위치 : mysql/bin

—————————————————-

전체 체크 및 자동 복구

mysqlcheck -Aa –auto-repair -u root -p

mysqlcheck -Ao –auto-repair -u root -p

—————————————————-

-A, –all-databases

-a, –analyze

-o, –optimize

-P 포트번호

—————————————————-

특정 데이터베이스만 체크 및 자동 복구

mysqlcheck –auto-repair -u root -p 데이터베이스명

—————————————————-

특정 테이블만 체크 및 자동 복구

mysqlcheck –auto-repair -u root -p 데이터베이스명 테이블명

—————————————————-

명령어 수정하여 사용하기

mysqlrepair = mysqlcheck –repair

mysqlanalyze = mysqlcheck –analyze

mysqloptimize = mysqlcheck –optimize

—————————————————-

mysql에 접속하여 개별적으로 하는 방법

mysql> use 데이터베이스명;

mysql> show tables;

mysql> check table 테이블명;

mysql> repair table 테이블명;

mysql> analyze table 테이블명;

mysql> optimize table 테이블명;

—————————————————-

##########################

OPTIMIZED table script PHP

##########################

$db = ‘database_name’;

$tables = mysql_list_tables($db);

while (list($table)name) = mysql_fetch_array($tables)) {

$sql = “OPTIMIZE TABLE $table_name”;

mysql_query($sql) or exit(mysql_error());

 

출처: <http://nblog.syszone.co.kr/archives/4922>

반응형
반응형

반응형
반응형

반응형

'정보보호' 카테고리의 다른 글

메일헤더 분석하기  (0) 2021.12.29
반응형

Zabbix use web monitoring for FTP check

Posted: July 10, 2012 | Author: Chris | Filed under: Zabbix |2 Comments

Zabbix web scenarios use cURL to check your web pages and cURL can be used to connect/download/upload to a FTP server, so I thought I could combine the two and see what happens. Well, this check works a lot better than the original FTP check I had created so I’d say it’s a success. As a bonus, you get download throughput and response time metrics for your FTP session checks.

Create web scenario

Here’s how you can set up web monitoring for FTP. First, create your web scenario under ConfigurationWeb. Select a host to assign this web check to and then select Create Scenario.

I kept everything at the default settings and created a single step to download a file from the FTP server as a test that everything is working properly.

Application - web (or something similar)
Name - FTP check
Authentication - none (I pass username/password in URL)
Update interval - 60
Agent - Internet Explorer 6.0 ( default, haven't tried other agents)
Status - active
Variables - empty
Steps -
     name - FTP check
     URL -
ftp://username:password@servername.domain.com
     post - empty
     timeout - 15
     required - filename (this is the file you want to check for on the FTP server)
     status codes - 226 (
FTP server response codes)

Trigger Configuration

Once your scenario is in place you can create a trigger to fire when something isn’t right. Select ConfigurationHost and select the host you created the web scenario under. Select Triggers and Create Trigger. Name your new trigger and choose the expression to trigger off of. I usually choose the ‘failed step of scenario…’ expression and set it to ‘last value NOT N’ with a value of zero. This way anything that isn’t a success will cause a trigger to fire.

name - FTP check
expression - {HOST_A:web.test.fail[FTP check].last(0)}#0
event generation - normal
severity - high

Once all of that is finished check your new monitor entry under MonitoringWeb. If you want to get a little more advanced with your FTP checks, you can add a trigger that fires when the response time is too long. Just a thought.

The web monitoring doesn’t have to be used only for monitoring actual web pages. cURL is very powerful and can allow for some great checks for your Zabbix environment. Learn more about cURL’s awesomeness here.

 

출처: <https://mypoorbraindump.wordpress.com/2012/07/10/zabbix-use-web-monitoring-for-ftp-check/>

반응형
반응형

우선 서버 로그를 확인 하고 오류를 확인 한다.

로그 위치는 :

 

/var/log/zabbix/zabbix_server.log

 

please increase cachesize configuration parameter zabbix

=> 메모리 부족 에러가 난다 기본은 8M 이다

 

Cache size 증설

이것을 32M 바꾸어 주니 해결이 되었다.

 

8G까지 확장 가능하다.

 

/etc/zabbix/zabbix_server.conf 내용을 수정하면 된다.

반응형
반응형

Ubuntu에서 timezone을 변경하는 방법에 대해서 알아본다. 현재 시간을 알아보는 명령어는 $ date 이다.

 

timezone을 변경하기 위해서는 아래의 명령을 실행한 뒤 Aisa > Seoul 을 차례로 선택하면 된다.

$ sudo dpkg-reconfigure tzdata

 

$ date
2017. 06. 08. (목) 18:37:46 KST

 

출처: <https://cjh5414.github.io/ubuntu-timezone/>

반응형
반응형

For v3.2 also please make sure that /etc/apace2/conf-enabled/zabbix.conf file should be amended as well. 

 

In <IfModule mod_php5.c> block, find entry php_value date.timezone Europe/Riga and change it according to your Timezone.

 

In <IfModule mod_php7.c> block, find entry php_value date.timezone Europe/Riga and change it according to your Timezone.

 

Ash

 

 

Appliance 경우 (중요)

 

/etc/apache2/conf-available/zabbix.conf 에서 값을 변경한다.

변경 서비스 시작 한다.

 

 

Asia/Seoul

반응형
반응형

rem =============================================

rem Make by bangja

rem Version 0.1

rem For Window Oracle listener.log Cutting

rem File Name : logcut.bat

rem =============================================

 

rem Variable area

 

set LOG_DIR=D:\oracle\ora92\network\log

 

set LOG_FILE=%LOG_DIR%\listener.log

 

cd %LOG_DIR%

 

rem copy source to dest listener log

 

copy %LOG_FILE% %LOG_FILE%.%date%.log

 

copy %LOG_DIR%\null.txt %LOG_FILE%

 

forfiles /P %LOG_DIR% /M *.log /D -20 /C "cmd /c del @file"

반응형

'데이터베이스' 카테고리의 다른 글

LVM을 이용한 MySQL 스냅샷 백업  (0) 2021.11.24
mysqlcheck 유틸리티 사용법  (0) 2021.11.24
Archive Mode 로 전환  (0) 2021.11.19
Oracle Table 의 Tablespace 변경 방법  (0) 2021.11.19
Oracle RMAN  (0) 2021.11.19

+ Recent posts