タグ

2018年3月5日のブックマーク (2件)

  • logrotateの設定とファイルのアクセスモードについて

    忙しい人のために先にまとめログファイルのopen時のアクセスモードは os.O_WRONLY|os.O_APPEND|os.O_CREATE を指定するlogrotateの設定には nocreate を渡すlogrotateではファイルをmvした後に行う処理が書けるので、そこでアプリケーションに対してシグナルを送ることでlogrotateの処理を実装できるfluentdはログのローテートを頑張って検知している ファイルディスクリプタについてファイルを open するとファイルディスクリプタを得られます。ファイルに書き込む際にはファイルディスクリプタ経由で書き込みを行います。 Linuxシステムプログラミング 23pをちょっと長めに引用します。 ファイルを読み書きする前にはオープンする必要があります。カーネルはオープンしたファイルをプロセスごとに管理しており、これをプロセスのファ

  • Essential Go

    Essential Go is a free book about Go programming language. It's part of Essential Programming Books. It's written to provide clear and concise explanation of topics for both beginner and advanced programmers. Most examples are linked to online playground that allows you to change the code and re-run it. You can also quickly navigate to desired content using table of content on the left and search

    Essential Go