並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 11 件 / 11件

新着順 人気順

straceの検索結果1 - 11 件 / 11件

タグ検索の該当結果が少ないため、タイトル検索結果を表示しています。

straceに関するエントリは11件あります。 Linuxtechfeedlinux などが関連タグです。 人気エントリには 『Why strace doesn't work in Docker』などがあります。
  • Why strace doesn't work in Docker

    While editing the capabilities page of the how containers work zine, I found myself trying to explain why strace doesn’t work in a Docker container. The problem here is – if I run strace in a Docker container on my laptop, this happens: $ docker run -it ubuntu:18.04 /bin/bash $ # ... install strace ... root@e27f594da870:/# strace ls strace: ptrace(PTRACE_TRACEME, ...): Operation not permitted stra

    • 第762回 定番のデバッグ・調査ツールであるstraceでエラーインジェクション | gihyo.jp

      straceはユーザーランドアプリケーションの挙動の確認やデバッグに使える便利なツールです。どのシステムコールが、どのような引数で呼び出され、その結果どうなったのかをログとして残せます。不可解な挙動をするプログラムを調べる上で覚えておくと損はないツールです。今回はstraceの基本的な使い方に加えて、わざとシステムコールをエラー終了させる、エラーインジェクションについても紹介しましょう。 不可解なプログラムについて この世にあるソフトウェアはすべて何らかの不具合を抱えています。もし不具合のないソフトウェアが存在するとしたら、その事実自体が不具合と言えるかもしれません。そのまま放置しておくと、きっと将来なにがしかの不具合が顕現することでしょう。よってソフトウェアエンジニアと呼ばれる人たちは、日々ソフトウェア様のご機嫌を伺い、こびりついた不具合を削ぎ落とし、場合によってはあえて不具合を埋め込み

        第762回 定番のデバッグ・調査ツールであるstraceでエラーインジェクション | gihyo.jp
      • strace -c を使う際に -w オプションを使い分けよう - hibomaの日記

        strace を使う際に -c をつけると、システムコール呼び出しの統計を取れる vagrant@xenial:~$ strace -c find >/dev/null % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 47.43 0.033697 145 232 getdents 46.00 0.032676 141 232 newfstatat 6.08 0.004320 9 474 close 0.49 0.000349 0 1045 fcntl 0.00 0.000000 0 10 read 0.00 0.000000 0 4 write 0.00 0.000000 0 15 4 open 0.00 0.

          strace -c を使う際に -w オプションを使い分けよう - hibomaの日記
        • Linuxの識者がよく使うstrace(1)やopen(2)の数字の意味は?

          いちいち説明されないので知らない人もいるかもいるかもしれません。 Linuxの話をしていると識者が strace(1) とかopen(2)とか後ろに(数字)をつけることがあります。この数字はマニュアルの章の番号です。1がコマンド、2がシステムコール、3がライブラリです。コマンドとライブラリで名前が被っているものがあるために区別します。 例えば、printf(1)はコマンドでprintf(3)はライブラリです。それぞれのman を見るためには章番号を明示して、 man 1 printf や man 3 printf とします。 man man としてmanコマンドのマニュアルを見ると、全ての章の説明があります。 The table below shows the section numbers of the manual followed by the types of pages they

            Linuxの識者がよく使うstrace(1)やopen(2)の数字の意味は?
          • systemdのserviceをstraceする時のtips - 赤帽エンジニアブログ

            Red Hatの森若です。 この記事はRed Hat Advent Calendar 2023 の21日目です。 デバッグなどのためにsystemdのservice unitで起動されるプロセスにstraceを仕掛けたいとき、ちょっとしたハマり所があるのでその説明とワークアラウンドを紹介します。 目次 実行中のserviceをstraceする 実行開始からserviceをstraceする Type=forking 時の問題 参考文献 おまけの宣伝 実行中のserviceをstraceする この場合は特にハマるところはありません。 既に実行中のプロセスへのstraceは、cgroupで関連するプロセス一覧が管理されているので、それを利用します。関連する全てのプロセスを指定し、-fでforkも追跡することで、関連する全プロセスを指定します。 serviceに対応するcgroupを確認する。 $

              systemdのserviceをstraceする時のtips - 赤帽エンジニアブログ
            • GKEで動くPodのプロセスに対してstraceを打ち込む - CubicLouve

              GKEのNodeをCoreOSを使っていれば、CoreOS toolboxを使って1 回だけ必要なパッケージやツールを追加でインストールし実行することができます。 cloud.google.com このCoreOS toolboxを使ってstraceをワンタイムでインストールしてpodの状態を確認します。 straceで調べたいPodが動いているNodeを探す consoleからでもなんでもいいので調べます。 kubectl get pods -o wide のようにwideオプションつけると、Nodeも表示されます。 Nodeにsshで入る GCPのconsoleからgcloudのコマンドを表示して入ることが多いです。 Podのプロセスを探す ps auxwwf などでプロセスを出せば、Podで動いているプロセスも見れます。 ここでstraceを打ちたいPIDを控えておきます。 tool

                GKEで動くPodのプロセスに対してstraceを打ち込む - CubicLouve
              • シェルスクリプトでstraceとtcpdumpを取るときのTIPS

                curl から nginx への HTTP の通信を tcpdump でパケットキャプチャーしつつ、 strace で nginx のシステムコール呼び出しをトレースしたいということがあって シェルスクリプトを書きました。 その時に試行錯誤していくつか TIPS が出来たのでメモしておきます。 nginx のように複数プロセスの場合は strace の -ff と -o が便利 strace (1) に書いてある話ですが、つい最近まで知らなかったので書いておきます。

                  シェルスクリプトでstraceとtcpdumpを取るときのTIPS
                • strace 5.2 で追加された -z -Z オプション - hibomaの日記

                  strace.io strace 5.2 で追加された -z -Z オプションが面白かったので書いておきます (注意: この記事を書いた時点では 5.3 が最新です ) -Z 失敗したシステムコールだけフィルターしてくれるオプション root@xenial:~/strace-5.3# ./strace -Z ls >/dev/null access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) access

                    strace 5.2 で追加された -z -Z オプション - hibomaの日記
                  • Backtraces with strace

                    I discovered strace somewhere between my first part time web development part time job in 2005 and my first full time “software engineering” job in 2008, and it seemed like a superpower giving me x-ray vision into running infrastructure. When a process was stuck, or existing after a cryptic error message, instead of grepping around I could get a pretty good timeline of what the process was up to.

                    • Analyzing MySQL with strace

                      All of Percona’s open-source software products, in one place, to download as much or as little as you need.

                        Analyzing MySQL with strace
                      • What problems do people solve with strace?

                        Yesterday I asked on Twitter about what problems people are solving with strace and as usual everyone really delivered! I got 200 answers and then spent a bunch of time manually categorizing them into 9 categories of problems. All of the problems are about either finding files a program depends on, figuring out why a program is stuck or slow, or finding out why a program is failing. These generall

                        1

                        新着記事