はじめに サーバを運用したり環境を構築したりしていて「あれ。あのプロセスで吐いてるログどこだっけ・・」など困るときがあります。 そんなときに頼りになるかもしれないコマンドを 3つご紹介します。 @madeth 師匠に教えていただきました。 1. proc でプロセスが使っているファイルを見る 困ったこと プロセスの吐くログのパスがどうしても分からない・・。 解決法 (編集 2014/09/10) 知りたいプロセスの ID を調べます。 $ ps aux | grep unicorn deploy 3335 xxx xxx xxx xxx X XX 15:14 0:07 unicorn master -c /var/www/myproject/unicorn/staging.rb -E staging -D プロセスID (この場合は 3335) をもとに root 権限でファイルディスクリ
cpuspeed がオンだと.... — はせがワン (@hasegaw) 2014, 5月 29 ミドルウェアのスループットを測ろうと思ったのですが cpuspeed などの設定をぜんぜんやっていませんでした。。。 経験上、チューニング過程でいじりたくなるようなパラメータを思い出してみます。 パワーマネジメントに関する設定はオフにする UEFIやBIOSにはパワーマネジメント設定がありますが、これらを無効にするとプロセッサなどが無条件で定格クロックで走り続けます。ピーク性能を高めたり瞬発力を上げるためにはパワーマネジメントはオフにします。当然ながらベースの消費電力やファンの騒音は増えますが、かわりにいくらかピーク性能の向上が見込めます。 Hyper Threading はレイテンシーとスループットのトレードオフ Hyper Threadingは、たぶん、コア内でパイプラインを取り合うから
定期的にこういう内容を書いて公開している気がする。昔の記事もあるのでそちらを読めばいいのだが、また書く必要性が生じてきたのであらためて書きます。 現代では AWS のようなクラウドや VPS など格安で手軽にインターネット上にサーバーを持てるようになった。しかしインターネットで誰でもアクセスできる環境でサーバーを稼働させるということは、常に人間やロボットの攻撃に晒されるということを同時に意味している。したがって初心者だからだとか、会社の中ではこうやって仕事をしているからといった言い訳は一切通用しない。セキュリティ設定をきちんとしなければ内部への侵入をたやすく許し、思わぬデータの漏洩につながるのである。とはいえセキュリティというのはトレードオフを考慮しなければいくらでも強化できるものでありキリがない。ここでは最低限これだけはやっておこうという現実的な落とし所を提示し、人々への啓蒙をはかるもの
こんにちは。斎藤です。 ITインフラの障害は、多くの場合「予期せぬ」タイミングで発生します。特に、CPUリソースを多量に消費したり、Disk I/Oが輻輳している場合、その切り分けは困難な状況に陥りやすいものです。 そこで、本日はITインフラ、特にOS・ミドルウェアを支えるにあたって、問題解決を助けてくれるであろう12個のコマンドを取り上げてみます。「必ず押さえておきたい」5つのものと「更に覚えると便利なコマンド」7つの2節に分けてお話しします。 ※CentOS 6.4 (64bit)を前提に取り上げます 必ず押さえておきたいコマンド もしITインフラ管理者になりたてな方はぜひ サーバサイドのプログラマをやっていたのだけれど、ある日突然「君、サーバ管理担当ね!」と、バトンを渡される方っていらっしゃると思います。私も以前はそのクチでした...。そうなってしまったとき、まずは覚えておきたい5つ
Linuxの起動処理は、これまでinit/upstartと呼ばれる仕組みで行われていました。Red Hat Enterprise Linux 7 (RHEL7)では、これが、systemdと呼ばれるまったく新しい仕組みに置き換わります。Fedoraでは、すでに先行してsystemdが採用されていますが、この連載(?)では、Fedora 17での実装をベースとして、systemdの考え方や仕組み、利用方法を説明していきます。今回は、systemdの動作の基礎となる「Unit」の概念を理解します。 systemdを採用したFedoraでLinuxの基礎を学びなそう!という方には、「「独習Linux専科」サーバ構築/運用/管理――あなたに伝えたい技と知恵と鉄則」がお勧めです。(^^/ systemdの考え方 参考資料 ・Rethinking PID 1:systemdの開発者であるLennart
今日会社の開発サーバでhitode君と遊んでて、動いているプロセスを調べていたのでメモ。 動いているプロセスを知りたい 基本的。 ps ax ps auxとかすると、メモリ使用量とかいろいろ見れる。 動いているプロセスの関係も含めて知りたい pstreeコマンドでできる。とりあえずどんな感じに実行されているかサマリーを知りたい時は以下のコマンド。 pstree いろいろ折りたたまれているので、それを展開したい時は-cをつける。 pstree -c コマンドの引数とかも表示したい時は-aつける pstree -ac pidを知りたい時は-pつける pstree -acp 表示してみると{}で囲まれているやつがあるけど、これは多分threadなんだろうと思う。linuxではthreadのidはpidのように管理されているみたい。 メモリやCPUを消費しているプロセスを知る topとかでいろいろ
サーバの動作に異常が発生した際に原因を探るためのLinuxコマンドで、自分用のメモです。 全てmanとかググったら出てくるので説明は適当です。思いついたら後で追記していくかもです。 対象はDebian Squeezeになります。 全てパッケージインストールできるもので、パッケージ名は [in packagename] としてあります。 各所よりコメントありがとうございます。 良さ気なコマンドは追記していきます。 <追加したコマンド> * telnet (+コメント wget, netcat) * arp (+コメント arpwatch) * pstree * fdisk コメントに gdisk * host, dig * watch * reboot
CentOS 5.x をインストールしたあと、いろいろと初期設定を行っています。今は、サーバ用途の場合 kickstart の %post セクションでいろいろな初期設定をまとめて行って自動化しています。kickstart は、別の機会に公開するとして、今回は %post セクションで行っている初期設定を順番に紹介します。紹介する順序は、順不同です。 NOZEROCONF を設定する 余計なネットワーク経路を作らないために、/etc/sysconfig/network に次の設定を追加します。APIPA という仕組みを使う場合は必要です。 NOZEROCONF=yes IPv6 を無効にする IPv6 を使っていないので、/etc/modprobe.conf に次の設定を追加します。 alias net-pf-10 off alias ipv6 off ifdown-eth にバッチをあて
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く