<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yohei-a</author_name>
  <author_url>https://blog.hatena.ne.jp/yohei-a/</author_url>
  <blog_title>ablog</blog_title>
  <blog_url>https://yohei-a.hatenablog.jp/</blog_url>
  <categories>
    <anon>Linux</anon>
  </categories>
  <description>OSレベルで sys のCPU使用率が高い場合に perf*1 を使って、何の処理の割合が高いか調べる方法です。 perf は 特定のプロセスだけでなくOS全体の統計を見れる カーネル（sys）とユーザー（user）の両方を見れる ところが非常に便利だと思う*2。 準備 ひたすら write システムコールを発行し続けるプログラムを作成する $ cat write_loop.c #include &lt;unistd.h&gt; int main(void) { while(1) { write(1, &quot;foo\n&quot;, 4); } } コンパイルする $ gcc write_loop.c -o write…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohei-a.hatenablog.jp%2Fentry%2F20131208%2F1386485282&quot; title=&quot;sysのCPU使用率が高い場合にその内訳を調べる方法 - ablog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2013-12-08 15:48:02</published>
  <title>sysのCPU使用率が高い場合にその内訳を調べる方法</title>
  <type>rich</type>
  <url>https://yohei-a.hatenablog.jp/entry/20131208/1386485282</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
