Code Monkey home page Code Monkey logo

Comments (5)

SuperQ avatar SuperQ commented on May 22, 2024

Can you describe what you're looking to use this for? This library is mostly focused around metrics extractions. I'm asking because it seems like the cardinality of the fdinfo data is very high.

from procfs.

pirxthepilot avatar pirxthepilot commented on May 22, 2024

In my case I would like to keep track of the number of inotify watches. From the proc man page:

              For inotify file descriptors (see inotify(7)), we see (since
              Linux 3.8) the following fields:

                  pos: 0
                  flags:    00
                  mnt_id:   11
                  inotify wd:2 ino:7ef82a sdev:800001 mask:800afff ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:2af87e00220ffd73
                  inotify wd:1 ino:192627 sdev:800001 mask:800afff ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:27261900802dfd73

              Each of the lines beginning with "inotify" displays informa‐
              tion about one file or directory that is being monitored.  The
              fields in this line are as follows:

              wd     A watch descriptor number (in decimal).

              ino    The inode number of the target file (in hexadecimal).

              sdev   The ID of the device where the target file resides (in
                     hexadecimal).

              mask   The mask of events being monitored for the target file
                     (in hexadecimal).

from procfs.

grobie avatar grobie commented on May 22, 2024

@pirxthepilot I'd be happy to reasonable PR to add this functionality.

from procfs.

pirxthepilot avatar pirxthepilot commented on May 22, 2024

@grobie awesome, thank you! I'll work on it and try to submit a PR within the next week. Do you recommend adding the functionality in proc.go, or a new file altogether?

from procfs.

pgier avatar pgier commented on May 22, 2024

Fixed in #115

from procfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.