Skip to content

upssched: Pass NOTIFYTYPE and UPSNAME into timer executions again, now with relevant values#3097

Merged
jimklimov merged 17 commits intonetworkupstools:masterfrom
jimklimov:issue-3092
Sep 23, 2025
Merged

upssched: Pass NOTIFYTYPE and UPSNAME into timer executions again, now with relevant values#3097
jimklimov merged 17 commits intonetworkupstools:masterfrom
jimklimov:issue-3092

Conversation

@jimklimov
Copy link
Copy Markdown
Member

Closes: #3092
Follow-up from: PR #2896 and issue #2890

@kennethso168 : can you please check if this PR reasonably answers your woes from that issue? And also if it runs and does not crash/leak, and does utilize envvar values from each call that begins a timer? And that the new feature for START-TIMER-SHARED works and can pass several (comma-separated) values? (So far I only tested that it compiles, and than ran out of time) :)

CC @aquette @clepple @NUT-RogetPrice : does this make sense architecturally?

…th global notify_type [networkupstools#3092]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…/upssched.conf.txt: let timers pass forward the UPSNAME and NOTIFYTYPE again - now with relevant values; introduce START-TIMER-SHARED [networkupstools#3092, networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov jimklimov added this to the 2.8.5 milestone Sep 22, 2025
@jimklimov jimklimov added bug enhancement upsmon upssched Questions and issues about upssched (timer helper for upsmon) impacts-release-2.8.3 Issues reported against NUT release 2.8.3 (maybe vanilla or with minor packaging tweaks) impacts-release-2.8.4 Issues reported against NUT release 2.8.4 (maybe vanilla or with minor packaging tweaks) labels Sep 22, 2025
Comment thread clients/upssched.c Fixed
Comment thread clients/upssched.c Dismissed
Comment thread clients/upssched.c Fixed
Comment thread clients/upssched.c Dismissed
Comment thread clients/upssched.c Fixed
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 22, 2025
…/upssched.conf.txt: let timers pass forward the UPSNAME and NOTIFYTYPE again - now with relevant values; introduce START-TIMER-SHARED [networkupstools#3092, networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…page section

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…onf.txt, NEWS.adoc: introduce support for DEBUG_MIN in upssched.conf [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…iption (indent them correctly) [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ched -l` mode [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…nnection loss due to a recent bug there [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Comment thread clients/upssched.c Dismissed
Comment thread clients/upssched.c Dismissed
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 22, 2025
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov
Copy link
Copy Markdown
Member Author

Now dev-tested more thoroughly, added some features (listing of timers) and weeded out some bugs.

Did not yet check START-TIMER-SHARED mode.

]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov jimklimov deleted the issue-3092 branch September 23, 2025 14:29
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 24, 2025
…e logging of self-assigned forked process tags [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 24, 2025
…d process tags [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 24, 2025
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 24, 2025
…ked process tags [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 24, 2025
…rked process tags [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 24, 2025
….c, drivers/upsdrvctl.c: move proctag_cleanup() into common code and auto-register during first use of setproctag() [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 24, 2025
…getpid()) calls with caching getmyprocname() and getmyprocbasename() [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 24, 2025
… setproctag() after setting up nut_debug_level [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 24, 2025
… around the fork() [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 24, 2025
…, doshutdown(), start_pipe() [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 24, 2025
…SHUTDOWNEXIT is non-trivial [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 25, 2025
…e logging of self-assigned forked process tags [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 25, 2025
…d process tags [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 25, 2025
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 25, 2025
…ked process tags [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 25, 2025
…rked process tags [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 25, 2025
….c, drivers/upsdrvctl.c: move proctag_cleanup() into common code and auto-register during first use of setproctag() [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 25, 2025
…getpid()) calls with caching getmyprocname() and getmyprocbasename() [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 25, 2025
… setproctag() after setting up nut_debug_level [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 25, 2025
… around the fork() [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 25, 2025
…, doshutdown(), start_pipe() [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Sep 25, 2025
…SHUTDOWNEXIT is non-trivial [networkupstools#3097]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov added a commit to jimklimov/nut that referenced this pull request Oct 2, 2025
jimklimov added a commit to jimklimov/nut that referenced this pull request Oct 2, 2025
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug enhancement impacts-release-2.8.3 Issues reported against NUT release 2.8.3 (maybe vanilla or with minor packaging tweaks) impacts-release-2.8.4 Issues reported against NUT release 2.8.4 (maybe vanilla or with minor packaging tweaks) upsmon upssched Questions and issues about upssched (timer helper for upsmon)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

upssched no longer passes the NOTIFYTYPE and UPSNAME environment variables into cmdscript

2 participants