2016年4月27日水曜日

grep or 条件

grep -E '<検索文字1>|<検索文字2>'
grep -E "<検索文字1>|<検索文字2>"

'"どちらでも

watch "ls -la $DIR | grep -E '<検索文字1>|<検索文字2> '"
watch 'ls -la $DIR | grep -E "<検索文字1>|<検索文字2>"'

'"どちらでも

2016年4月22日金曜日

Fail over / Fail back / Switch over / Switch back / Take over / Give back

Fail over (フェイルオーバー)

異常事態が発生したとき、自動的に冗長な待機系コンピュータサーバ/システム/ネットワークに切り換える機能を意味する。

-人の意思が入らず、切り替わるのがFail over (だと理解)

Fail back(フェイルバック)

その後、元の稼動系の障害を取り除いて復旧した後、待機系から再び処理を引き継ぐのがフェイルバックである。

-人の意思を入れ、戻すが、切り替わった理由がFail overだと戻すときはFail back (だと理解)

Switch over(スイッチオーバー)

何らかの異常を察知して、人間が手動で切り替えを行うことをスイッチオーバーという。

-人の意思が入り、意図的に、切り替えるのがSwitch over (だと理解)

Switch back(スイッチバック)


-人の意思を入れ、戻す。切り替えた理由がSwitch overだと戻すときはSwitch back (だと理解) 


Take over (NetApp用語?)

HAペアにおいて、障害ノードのアイデンティティをテイクオーバー ノードがエミュレートすること。ギブバックの逆です。


Give back (NetApp用語?)

コントローラ フェイルオーバーの原因となった問題が解決されたあと、2つのストレージ システムが相手データの制御を返すことができるようにするテクノロジ。


Thanks
https://ja.wikipedia.org/wiki/%E3%83%95%E3%82%A7%E3%82%A4%E3%83%AB%E3%82%AA%E3%83%BC%E3%83%90%E3%83%BC

https://library.netapp.com/ecmdocs/ECMP1719718/html/GUID-0CF9FF10-DB9E-4C72-BB8F-AFEB95CB61F8.html

2016年4月20日水曜日

ntp 強制同期 "the NTP socket is in use, exiting"

time offsetがすごい値になっている。 ex.offset -32216.993555 sec
ntpd が起動しない。
ntpd がなんか変。
時刻がずれてる

■ntpサーバを確認する
cat /etc/ntp.conf

■ntpdの状態を確認する
service ntpd status

"ntpd dead but pid file exists"

"the NTP socket is in use, exiting"
(ntpd が実行中の場合、ntpdate コマンドを実行するとエラーが発生するため、先に ntpd を停止させる。)


■ntpdを止める
service ntpd stop

offsetが0.01以下になるまで
ntpdate -b -u [NTPSERVER]

ntpdate -b -u xxx.xxx.xxx.xxx
20 Apr 06:57:21 ntpdate[29413]: step time server xxx.xxx.xxx.xxx offset -32216.993555 sec
ntpdate -b -u xxx.xxx.xxx.xxx
20 Apr 06:57:24 ntpdate[29480]: step time server xxx.xxx.xxx.xxx offset -0.000006 sec


■ntpdを開始する
service ntpds start

■ntpの状態を確認する
ntpq -p




Thanks...
http://qiita.com/megu_ma/items/bb902740ee7de9ddd102
http://oshiete.goo.ne.jp/qa/2646427.html

2016年4月19日火曜日

vm mac

00:50:56

00:0C:29 (「自動」に設定した場合)

2016年4月14日木曜日

yum proxy

yum.conf に書き込む

# cat /etc/yum.conf
proxy=http://[PROXYIP]:[PORT]

ex.
proxy=http://192.168.0.1:8080/





[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 503"

2016年4月13日水曜日

drop-last-lf

https://access.redhat.com/documentation/ja-JP/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/s1-basic_configuration_of_rsyslog.html

query 間隔

interval minutes


(Working) 
2分毎
Every 1 hours at 0:0,2:0,4:0,6:0,8:0,10:0,12:0,14:0,16:0,18:0,20:0,22:0,24:0,26:0,28:0,30:0,32:0,34:0,36:0,38:0,40:0,42:0,44:0,46:0,48:0,50:0,52:0,54:0,56:0,58:0

 3分毎
 Every 1 hours at 0:0,3:0,6:0,9:0,12:0,15:0,18:0,21:0,24:0,27:0,30:0,33:0,36:0,39:0,42:0,45:0,48:0,51:0,54:0,57:0,

(Not working) 
Every hour/2:0

2016年4月12日火曜日

opsec_pull_cert

# ./opsec_pull_cert

CheckPoint 2001. Getting an object's certificate. Works once per certificate.

Usage: opsec_pull_cert -h host -n object-name -p passwd [-o cert_file] [-od dn_file]
        -p is the one-time-password given in the SmartDashboard when defining this entity.
        -o is for the output certificate file. default is "($OPSECDIR/)opsec.p12".
        -od is for the output sic name (one line text file).
        A relative path filename will be concatenated to OPSECDIR env variable (if exists).

2016年4月8日金曜日

nano 使い方

nano ライン表示

cp /usr/share/doc/nano-1.3.12/nanorc.sample /etc/nanorc

nano /etc/nanorc

## line number
set const

2016年4月5日火曜日

java バージョン 確認方法

java -version

java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)