Apacheのapachectl (version 2.2) の引数について。

引数 説明
start apache 起動
stop apache 停止
restart apache が停止しているなら起動。apache が起動しているなら再起動。設定ファイルに間違いがあると、apache が停止したりする。
fullstatus mod_status モジュールが有効になっていて、かつhttpd.confに設定がしてあれば、状態を表示。CUIでログインしてる時に見たいなら別途テキストベースのブラウザが必要。もしくは、外からGUIのブラウザからでもみれる。
status fullstatusと同じ。上の方がちょっとだけ詳しい。
graceful apache が停止しているなら起動。apache が起動しているなら、処理中のリクエストの完結を待って apache 再起動
graceful-stop 処理中のリクエストの完結を待って apache 停止。
configtest 設定ファイル適用のテスト。正しければ「Syntax OK」、間違いがあれば教えてくれる。
startssl apacheSSLを有効にして起動。

kazmax.zpp.jp

Bashの[ -e /home/... ]による確認

[ -e filepath ] Returns true if file exists.
[ -x filepath ] Returns true if file exists and executable.
[ -S filepath ] Returns true if file exists and its a socket file.
[ expr1 -a expr2 ] Returns true if both the expression is true.
[ expr1 -o expr2 ] Returns true if either of the expression1 or 2 is true.

www.thegeekstuff.com

qiita.com

Pythonのコードの計測について(line-profiler)

@profile
def fizzbuzz(n):
    if n % 3 == 0 and n % 5 == 0:
        return 'FizzBuzz'
$ kernprof -l fizzbuzz.py
1
2
Fizz
...(省略)...
97
98
Fizz
Wrote profile results to fizzbuzz.py.lprof
$ python -m line_profiler fizzbuzz.py.lprof
Timer unit: 1e-06 s

Total time: 0.000275 s
File: fizzbuzz.py
Function: fizzbuzz at line 5

Line #      Hits         Time  Per Hit   % Time  Line Contents
==============================================================
     5                                           @profile
     6                                           def fizzbuzz(n):
     7        99          116      1.2     42.2      if n % 3 == 0 and n % 5 == 0:



blog.amedama.jp

その他の profile 手法がまとめてあった

qiita.com