You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.
Created by mfriedrich on 2012-07-26 18:19:18 +00:00
Assignee: mfriedrich
Status: Closed (closed on 2012-08-22 18:19:26 +00:00)
Target Version: exp
Last Update: 2012-08-22 18:19:26 +00:00 (in Redmine)
actually, the worker library isn't really a library, but shows some good examples how to use the api on spawning workers (remotely). other than that, it contains the on-top-implementation of kvvec, squeue, iocache and iobroker, merging the functionality together.
besides that, runcmd.c/.h is taken from the nagios plugins project, and might need some enhancements in the future. we might use a different implementation, but keep the apis intact.
this is experimental, and should only live in dev/* stages. further discussions what to happen. original author - Andreas Ericsson.
Changesets
2012-07-26 18:40:59 +00:00 by mfriedrich 9e586b1f9bd123ae50e82bb4b1e988e8f96a5d55
libicinga: add runcmd and worker libraries #2903
bound together using
* squeue/pqueue (creating a worker local scheduling queue = jobs queue)
- enter_worker (squeue_create, squeue_peek for timeouts)
- spawn_job (squeue_add)
- finish_job (squeue_remove)
* kvvec (logical key/value arrays to be worked on by job_ids and such)
keys:
- job_id
- command
- timeout
- error_msg
- outstd
- outerr
- start
- stop
- ru_utime
- ru_stime
- ru_minflt
- ru_majflt
- ru_nswap
- ru_inblock
- ru_oublock
- ru_nsignals
* iocache (receiving commands, on worker spawn)
- receive_command (iocache_create, iocache_read, io_cache_use_delim)
- spawn_worker (iocache_create)
* iobroker (polling fds to receive jobs/commands between workers)
- enter_worker (iobroker_create, iobroker_register (master_fd,
receive_command), iobroker_get_num_fds, iobroker_poll)
- worker_process (iobroker_max_usable_fds)
- fd_start_cmd (iobroker_register - stdout, stderr)
- receive_command (iobroker_close)
- finish_job (iobroker_close)
- gather_output (iobroker_close)
this adds the library code for the workers, to be used as an example for
polling the api, and also for the local workers which could be
implemented in the future.
furthermore, this adds runcmd inherited from nagios plugins project,
where Andreas Ericsson is the author as well. It uses a safe popen
implementation, which does not fork into a shell, lightweight execve so
to speak. we might adopt that in the future for performance, but keeping
the apis intact.
refs #2903
2012-07-26 18:53:26 +00:00 by mfriedrich 3ae5a0a624b08c77c7d5eddc3830d5a790e59326
libicinga: add the wproc example using worker library
refs #2903
This issue has been migrated from Redmine: https://dev.icinga.com/issues/2903
Created by mfriedrich on 2012-07-26 18:19:18 +00:00
Assignee: mfriedrich
Status: Closed (closed on 2012-08-22 18:19:26 +00:00)
Target Version: exp
Last Update: 2012-08-22 18:19:26 +00:00 (in Redmine)
actually, the worker library isn't really a library, but shows some good examples how to use the api on spawning workers (remotely). other than that, it contains the on-top-implementation of kvvec, squeue, iocache and iobroker, merging the functionality together.
besides that, runcmd.c/.h is taken from the nagios plugins project, and might need some enhancements in the future. we might use a different implementation, but keep the apis intact.
this is experimental, and should only live in dev/* stages. further discussions what to happen. original author - Andreas Ericsson.
Changesets
2012-07-26 18:40:59 +00:00 by mfriedrich 9e586b1f9bd123ae50e82bb4b1e988e8f96a5d55
2012-07-26 18:53:26 +00:00 by mfriedrich 3ae5a0a624b08c77c7d5eddc3830d5a790e59326
Relations:
The text was updated successfully, but these errors were encountered: