Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCP: add File Descriptor Meter #992

Closed
wants to merge 2 commits into from
Closed

Conversation

smalinux
Copy link
Contributor

@smalinux smalinux commented May 4, 2022

Related: #990

Signed-off-by: Sohaib Mohamed sohaib.amhmd@gmail.com

@fasterit
Copy link
Member

fasterit commented May 4, 2022

You can get the same info from /proc/sys/fs/file-nr on a Linux system (#990).
BSD has sysctl kern.maxfiles and sysctl kern.openfiles.
Why not implement it to work outside PCP as well?

@natoscott
Copy link
Member

You can get the same info from /proc/sys/fs/file-nr on a Linux system (#990). BSD has sysctl kern.maxfiles and sysctl kern.openfiles. Why not implement it to work outside PCP as well?

I'm not sure what you mean @fasterit ... ? @BenBE has already implemented it "outside of PCP" for Linux, and has started on the BSD code AIUI - meanwhile this code from @smalinux using the (existing) PCP metrics looks on the right path to me for the PCP backend.

@smalinux
Copy link
Contributor Author

smalinux commented May 4, 2022

@fasterit That is a good idea, but the problem with this way is that it always assumes that the information will be available live all the time.
In the PCP case, on the other hand, it does not assume that. PCP could read this data from some archive logs or be read from another target machine.
That's the power of PCP: https://pcp.readthedocs.io/en/latest/UAG/IntroductionToPcp.html

@natoscott
Copy link
Member

@smalinux looks like you have a build failure there?

@smalinux
Copy link
Contributor Author

smalinux commented May 4, 2022

@natoscott yes, because #990 is still not merged yet and there is no FileDescriptorMeter.ch
I tested it and after adding it to myhtopsources will work perfectly :)

@fasterit
Copy link
Member

fasterit commented May 4, 2022

You can get the same info from /proc/sys/fs/file-nr on a Linux system (#990). BSD has sysctl kern.maxfiles and sysctl kern.openfiles. Why not implement it to work outside PCP as well?

I'm not sure what you mean @fasterit ... ? @BenBE has already implemented it "outside of PCP" for Linux, and has started on the BSD code AIUI - meanwhile this code from @smalinux using the (existing) PCP metrics looks on the right path to me for the PCP backend.

I meant to make sure we have the same meter on all (supported) platforms.

@BenBE
Copy link
Member

BenBE commented May 4, 2022

@natoscott yes, because #990 is still not merged yet […]

Just rebase onto my branch …

pcp/Platform.c Outdated Show resolved Hide resolved
@smalinux smalinux force-pushed the fdmeter branch 2 times, most recently from baa4376 to d6506ad Compare May 4, 2022 16:53
@smalinux
Copy link
Contributor Author

smalinux commented May 4, 2022

@natoscott yes, because #990 is still not merged yet […]

Just rebase onto my branch …

Done.

pcp/Platform.c Outdated Show resolved Hide resolved
Related: htop-dev#990

Signed-off-by: Sohaib Mohamed <sohaib.amhmd@gmail.com>
@smalinux
Copy link
Contributor Author

This PR was closed by #990 (bdb63a4)

@smalinux smalinux closed this Mar 24, 2023
@smalinux smalinux deleted the fdmeter branch March 24, 2023 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants