{"id":43063791,"url":"https://github.com/m-grant-prg/swoc","last_synced_at":"2026-01-31T12:21:26.009Z","repository":{"id":46657498,"uuid":"127524722","full_name":"m-grant-prg/swoc","owner":"m-grant-prg","description":"Server Wait On Clients System.","archived":false,"fork":false,"pushed_at":"2026-01-15T10:18:28.000Z","size":29544,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"tip","last_synced_at":"2026-01-15T15:44:42.617Z","etag":null,"topics":["autotools","c","client-server","client-server-coordination","system-administration","system-programming","system-utility"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m-grant-prg.png","metadata":{"files":{"readme":"README","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-03-31T11:05:43.000Z","updated_at":"2026-01-15T10:19:20.000Z","dependencies_parsed_at":"2024-05-11T14:39:46.252Z","dependency_job_id":"bde4d5ce-0365-4a9b-99d0-c7083edd47c5","html_url":"https://github.com/m-grant-prg/swoc","commit_stats":null,"previous_names":[],"tags_count":120,"template":false,"template_full_name":null,"purl":"pkg:github/m-grant-prg/swoc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-grant-prg%2Fswoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-grant-prg%2Fswoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-grant-prg%2Fswoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-grant-prg%2Fswoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-grant-prg","download_url":"https://codeload.github.com/m-grant-prg/swoc/tar.gz/refs/heads/tip","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-grant-prg%2Fswoc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28942299,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T12:10:04.904Z","status":"ssl_error","status_checked_at":"2026-01-31T12:09:58.894Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autotools","c","client-server","client-server-coordination","system-administration","system-programming","system-utility"],"created_at":"2026-01-31T12:21:25.489Z","updated_at":"2026-01-31T12:21:26.004Z","avatar_url":"https://github.com/m-grant-prg.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"------------------------------------\nServer Wait On Clients (SWOC) System\n====================================\n\nAuthor - Copyright (C) 2018-2023, 2025 Mark Grant\n\n--------\nContents\n========\n\n1 ... Project Description\n\n2 ... AutoTools (configure and make) Installation\n\n3 ... Installation of Distro-Native Packages\n\n4 ... Utility Scripts\n\n5 ... Further Information\n\n\n\n-------------------------\n1 ... Project Description\n=========================\n\nSystem Synopsis\n---------------\nThe Server Wait On Clients (SWOC) system provides a mechanism for clients to\nregister locks on a server which the server can then watch and wait until all\nlocks are released before taking some action.\n\nIt is easier to show an example:\nOvernight, clients want to perform crontab work as a user and root, then do a\nbackup and then shutdown enabling the server to initiate its own shutdown.\n\nSo an example root crontab on the client:-\n\n\t# This line adds a lock, performs some work of unknown duration and\n\t# releases the lock.\n\t10 00 * * 0,1,2,3,4,5,6 date ; swocclient -l ; apt-get update -qq ; \\\n\tapt-get upgrade -d -q -y ; apt-get dist-upgrade -d -q -y ; \\\n\tswocclient -r ; date\n\n\t# This line adds a lock of its own, waits until this client has one lock\n\t# outstanding, ie its own, then performs a backup, releases the lock\n\t# and shuts down.\n\t15 00 * * 0,1,2,3,4,6 date ; swocclient -l ; swocclient -w1 ; date ; \\\n\tnetbckup -d ; swocclient -r ; date ; at -f shutdown now\n\nAt the same time, a user crontab on the client is using two crontab entries to\nrun some jobs each taking its own lock at the start and releasing it at the\nend. Both of these lines are of unknown and variable duration:-\n\n\t10 00 * * 0,1,2,3,4,6 swocclient -l ; \\\n\tget_iplayer --pvr 2\u003e/home/mgrant/Videos/iPlayer/VideosErr.log ; date ; \\\n\tswocclient -r\n\n\t10 00 * * 0,1,2,3,4,6 swocclient -l ; \\\n\tmget --quiet --sourcefile /home/mgrant/Downloads/MultiGetSource.txt \\\n\t--targetdir /home/mgrant/Downloads ; date ; swocclient -r\n\nMeanwhile on the server, it waits until it has no more registered locks and then\ninitiates a shutdown.\n\n\t20 00 * * 0,1,2,3,4,5,6 date ; swocserver -w ; date ; at -f shutdown now\n\nThis Project\n------------\nThis AutoTools project contains the Server Wait On Clients Server Programs.\n\nIf you are going to build against the SWOC Programs then you must install the\ndevelopment files from libswocclient-dev, libswoccommon-dev and\nlibswocserver-dev.\n\nRelated packages in this system are the dev and lib packages for libswoccommon\nSWOC Common Library, equivalent packages for the libswocserver Server Library,\nequivalent packages for the libswocclient Client Library, a package swocclient\nfor the client application, a package swocserver for the server application, an\nAPI  documentation package swoc-doc and a full documentation package\nswoc-int-doc. These Doxygen documentation packages are also available online at\n- https://m-grant-prg.github.io/swoc/\n\n\nN.B.\n----\nAt a source modification / development level, this project expects to reside in\na git environment. This manifests itself in 2 places:-\n1) ... .gitignore files are included in the source.\n2) ... The make target, 'srctarball', relies on the command 'git archive' so it\n\twill fail if git is not installed or it is not in a git repository.\n\n\n-------------------------------------------------\n2 ... AutoTools (configure and make) Installation\n=================================================\n\na) ... Download either the source or distribution tarball (the .tar.gz file)\n\tfrom:-\n\thttps://github.com/m-grant-prg/swoc/releases\n\nb) ... Extract the tarball preserving the directory structure.\n\nc) ... cd to the directory created.\n\nd) ... If you downloaded the source tarball type 'autoreconf -if'\n\ne) ... Documents can be registered with scrollkeeper but this process will\n\tconflict if the documents have already been installed via a package\n\tmanager. So, if the documents have not been installed by a package\n\tmanager (For further information please see\n\thttps://m-grant-prg.github.io/swoc/html-int/md_docs_doxygen_src_150_autotools_internal.html#doc_base ):-\n\n\tType './configure --enable-atonly'\n\n\tand if they have been installed via a package manager:-\n\n\tType './configure'\n\nf) ... As root or sudo, type 'make install clean'\n\ng) ... Edit the sysconfdir/swocserverd.conf, (usually /etc/swocserverd.conf), as\n\trequired.\n\nh) ... Update shared libraries links and cache. (For further information please\n\tsee https://m-grant-prg.github.io/swoc/html-int/md_docs_doxygen_src_150_autotools_internal.html#ldconfig )\n\n\tAs root or sudo, type 'ldconfig'\n\n(Quote marks are for textual clarity only).\n\nTo uninstall the package:\n\n1 ... cd to the directory created in the above install process.\n\n2 ... As root or sudo, type 'make uninstall clean'\n\n3 ... As root or sudo, type 'ldconfig'\n\n\n--------------------------------------------\n3 ... Installation of Distro-Native Packages\n============================================\nInstallation packages native to different distributions are available, please\nrefer to the relevant installation section on the wiki at:-\n\nhttps://github.com/m-grant-prg/swoc/wiki\n\n\n---------------------\n4 ... Utility Scripts\n=====================\nIn the project root directory there are 2 helper scripts; bootstrap.sh and\ngen-gnulib.sh.\n\nbootstrap.sh\n------------\nThis misleadingly named script bootstraps the project build and provides other\nuseful features. The main options are probably b, c, C, D and T.\n\nIn AutoTools it is usually advisable to perform parallel builds. This means you\nbuild somewhere other than the project root. This is because building creates\nfiles and they would confuse the project root downwards. I always create a build\ndirectory straight off the project root, cd to there and do all build and git\nwork from there, (.gitignore is already set to ignore such a directory).\n\nAssuming you adopt the preceding paragraph then a typical invocation of the\nscript would be:-\n\n../bootstrap.sh --config --build ..\n\nThe last '..' points the way to project root.\n\nFor the full list of arguments to bootstrap.sh, please refer to the options\nsection of the acmbuild wiki, the options are identical:-\n\nhttps://github.com/m-grant-prg/acmbuild/wiki\n\n\ngen-gnulib.sh\n-------------\nThis script generates or re-generates the gnulib requirements, I shan't go into\ndetail here. For further information please see https://m-grant-prg.github.io/swoc/html-int/md_docs_doxygen_src_150_autotools_internal.html#gnulib\n\nIt is useful when setting up the project initially, when you are actually\nbuilding in what is required and thinking about it, thereafter it is best to use\n../bootstrap.sh --gnulib ..\nas it determines whether to do a re-generate based on whether the cache file\nexists, i.e. it has been wanted before.\n\nsetup.sh\n--------\nIf the sysconfdir/swocserverd.conf configuration file is deleted, or, if\ncorrupted then delete it, and run setup.sh from the pkglibexec directory. To\nfind the script location on your system:-\n\ttype 'find / -path */swocserver/setup.sh 2\u003e/dev/null'.\nTypically in an AutoTools build pkglibexec is /usr/local/libexec/PACKAGE\nso as root or sudo you would type:-\n\t'/usr/local/libexec/swocserver/setup.sh'.\nAnswer the prompts from the setup script.\nSubsequent to running this script, config files can only be modified with an\neditor, setup.sh will not work unless the config file is deleted.\n\n-------------------------\n5 ... Further Information\n=========================\nFurther information can be found on the wiki at:-\n\nhttps://github.com/m-grant-prg/swoc/wiki\n\nProgrammer oriented documentation can for the latest stable release can be found\nat:-\n\nhttps://m-grant-prg.github.io/swoc/\n\nThe API link will provide documentation relevant to a consumer of the project,\nwhereas, the internal documentation provides that documentation plus\ndocumentation aimed at contributors to the project.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-grant-prg%2Fswoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-grant-prg%2Fswoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-grant-prg%2Fswoc/lists"}