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

print_statistics is confusing. Disable it by default? #128

Open
joeytwiddle opened this issue Feb 28, 2023 · 0 comments
Open

print_statistics is confusing. Disable it by default? #128

joeytwiddle opened this issue Feb 28, 2023 · 0 comments

Comments

@joeytwiddle
Copy link

joeytwiddle commented Feb 28, 2023

The print_statistics feature bothers me, because it keeps showing me OLD information.

For example:

Feb 25 16:24:00 ____ nohang[25488]: What happened in the last 22d 4h 14min 36s:
Feb 25 16:24:00 ____ nohang[25488]: [ OK ] Sending SIGTERM to dotnet: 346
Feb 25 16:24:00 ____ nohang[25488]: [ OK ] Sending SIGKILL to dotnet: 346

When I'm reading logs, it looks like something happened on Feb 25, but on closer inspection, it's not really clear when it happened. It might have been on Feb 03! It also looks like there was no time between the TERM and the KILL signals. In fact, the time between is unknown.

From my point of view, I only want to see the actions logged when they occur, and never logged a second time. (I don't know any other services that repeatedly prints old logs.)

Perhaps nohang has a good reason for doing this. Perhaps this is helpful, if there is a danger that the info was not logged at the original time?

Here are some suggestions which might help:

  1. Comment in the config file what is the purpose of print_statistics and in which situations it is recommended to enable/disable it.
  2. When printing this old info, include timestamps, so it's clearer when this happened (and clear that it's not happening in the present moment).
  3. Disable print_statistics by default? Let sysadmins enable it only if they need it.
    This would make nohangs logging more like logging from other services.
  4. Extra: Add an extra marker to logs which happen in the moment, so I can find them easily, without finding print_statistics logs.
    For example, with a ### marker, I could search: /### Sending SIG
    Although I see now, what I should probably search for is /Implementing a corrective action
  5. Aside: Make present-moment logs say Sending SIGTERM to dotnet instead of to the victim
    This would make the present-moment logs more convenient to read, like the print_statistics logs are.

Thanks!

@joeytwiddle joeytwiddle changed the title Disable print_statistics by default? print_statistics is confusing. Disable it by default? Mar 1, 2023
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

1 participant