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

Add "nix processes" command that is equivalent to "guix processes" #3751

Open
matthewbauer opened this issue Jun 25, 2020 · 14 comments
Open

Comments

@matthewbauer
Copy link
Member

Guix has a feature that is missing in Nix:

https://guix.gnu.org/manual/en/html_node/Invoking-guix-processes.html

guix processes is used to list derivations that are running by the daemon. It's useful to system administrators who want to know what is using up so much of their resources.

@kloenk
Copy link
Member

kloenk commented Jun 25, 2020

There is as an adhoc solution nix-top. But yeah, a real nix subcommand could be usefully (or at least protocol definition to query this info from the daemon)

@zimbatm
Copy link
Member

zimbatm commented Jul 1, 2020

Related to that, it would be great if nix would report back what is blocking a build when it is locked or waiting on a runner to become available.

@kloenk
Copy link
Member

kloenk commented Jul 7, 2020

One simple idea which would not be too complicated in implementing is writing the current build step into /nix/var/nix/userpool/${build-user}.

Is that a good idea?

@Atemu
Copy link
Member

Atemu commented Jul 10, 2020

I like the idea of it being discoverable via files. Though perhaps they should live in /run instead, this kind of information doesn't need to be held permanently.

@kloenk
Copy link
Member

kloenk commented Jul 10, 2020

I like the idea of it being discoverable via files. Though perhaps they should live in /run instead, this kind of information doesn't need to be held permanently.

Of course. My idea behind that was that it would make it easier to see if the look on the user is already held without calling flock. As the locks live under /nix/var/nix/userpool

matthewbauer added a commit to matthewbauer/nix that referenced this issue Jul 11, 2020
@matthewbauer
Copy link
Member Author

I made a quick proof of concept here:

#3800

I think handling build steps would be useful too. Right now you can check /proc for child processes, but it only works on systems with a procfs.

@Ericson2314
Copy link
Member

I assume we limit to trusted users?

@matthewbauer
Copy link
Member Author

matthewbauer commented Jul 12, 2020

userpool is only readable by root (or whoever owns NIX_STORE_DIR) so any new information we expose would have that restriction. I don’t think it’s worth letting trusted-users see it. There’s nothing stopping them from doing pstree $(pgrep nix-daemon) though.

@stale
Copy link

stale bot commented Feb 13, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Feb 13, 2021
@Atemu
Copy link
Member

Atemu commented Feb 13, 2021

Still important to me.

@stale stale bot removed the stale label Feb 13, 2021
@stale
Copy link

stale bot commented Aug 13, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Aug 13, 2021
@kloenk
Copy link
Member

kloenk commented Aug 21, 2021

Still important to me

@stale stale bot removed the stale label Aug 21, 2021
@stale
Copy link

stale bot commented Apr 16, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Apr 16, 2022
@Atemu
Copy link
Member

Atemu commented Apr 17, 2022

Still important to me.

@stale stale bot removed the stale label Apr 17, 2022
@stale stale bot added the stale label Oct 30, 2022
@stale stale bot removed the stale label Dec 5, 2022
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

No branches or pull requests

6 participants