Query ongoing builds

The “new” ui of nix build, which only displays a few statistics and a single log line, is less spammy than the old nix-build UI, but often I find that I want to have more information, often after I started a build. So I am thinking of a tool that I can fire separately and will show me more information about what’s going on right now: What builds are currently running, which are waiting, which are downloading, maybe even which builds other builds are waiting for, maybe with some interactivity, e.g. selecting ongoing builds to show their logs scroll by.

My question is now whether it is possible to write such a tool at the moment? Can I somehow connect to the nix daemon and ask for running builds etc? Or is that all orchestrated by the nix build processes that I spawn on the command line, with no easy way to get hold of?

2 Likes

There is GitHub - samueldr/nix-top

2 Likes

Maybe nix-output-monitor could be adapted to attach to a running build.

3 Likes

Thanks! It’s … a start :slight_smile:

Oh, pretty! Yes, if I could get that for a running build, that would be great!

it can’t because it needs to change the loggin option nix is run with.

And because it probably needs to see the history so far…

If nix (or nix-daemon, I don’t know who is responsible here) would get a way to query the current state of affairs, it might become possible.

1 Like

Not sure if that is enough. We would also need to change how logging is represented.

I realize this is an old thread but it came up in a search just now and it’s very nice to know I’m not the only one who’s wanted this. Also, great to know about nix-top.

2 Likes