<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>lufiabb</author_name>
  <author_url>https://blog.hatena.ne.jp/lufiabb/</author_url>
  <blog_title>Plan 9とGo言語のブログ</blog_title>
  <blog_url>https://blog.lufia.org/</blog_url>
  <categories>
    <anon>macOS</anon>
    <anon>Linux</anon>
  </categories>
  <description>CPUやメモリの統計は/proc以下のファイルを見れば調べられますが、ファイルシステムの容量などはどうやって取得しているんだろうと気になったでdf(1)のコードを眺めてみました。 coreutils: df.c coreutils: fusage.c macOS: df.c ライブラリの動作検証で用意したコードはこちら。 dfが何を使って出力しているのか調べたコード · GitHub Linuxの場合 Linuxでは、ファイルシステムの情報はstatvfs(3)で取得できるようです。これはstatfs(2)システムコールのラッパーという扱いですが、基本的にはstatvfs(3)を使うように推奨…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.lufia.org%2Fentry%2F2020%2F12%2F11%2F154312&quot; title=&quot;dfコマンドはどこからファイルシステムの統計を取得するのか - Plan 9とGo言語のブログ&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>2020-12-11 15:43:12</published>
  <title>dfコマンドはどこからファイルシステムの統計を取得するのか</title>
  <type>rich</type>
  <url>https://blog.lufia.org/entry/2020/12/11/154312</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
